<div ng:controller="LibraryTypeMainController" class="row-fluid" id="body-main" qn:fillheight>
    <div class="col10">
        <div class="toolbar cfix">
            <div class="toolbar-group">
                <h3>
                    <span class="circle circle-small blue"><span class="icon icon-book"></span></span>
                    {{librarytype.Title}} <br /><br />
                </h3>
            </div>
            <div class="toolbar-group">
                <button title="{{$resource('utility.home')}}" class="button tooltip" ng:click="back()"><i class="icon-home"></i></button>
            </div>
            <div class="toolbar-group">
                <button title="{{$resource('utility.reset')}}" class="button tooltip" ng:show="isSearch()" ng:click="reset()"><i class="icon-angle-left"></i></button>
                <button title="{{$resource('utility.refresh')}}" class="button tooltip" ng:click="refresh()"><i class="icon-refresh"></i></button>
            </div>
            <div class="toolbar-group">
                <button title="{{$resource('utility.new')}}" class="button lightblue tooltip" ng:click="newOdjel()"><i class="icon icon-plus"></i></button>
            </div>
            <div class="toolbar-group right">
                <span class="info">{{pager.from}}-{{pager.to}} of {{pager.total}}</span>
                <button class="button prev" ng:disabled="!pager.canPrev()" ng:click="pager.prev()"><i class="icon-chevron-left"></i></button>
                <button class="button next" ng:disabled="!pager.canNext()" ng:click="pager.next()"><i class="icon-chevron-right"></i></button>
            </div>
        </div>
     <!--   <div class="table table-hover fillh">  
            <div>
                 <table>
                    <thead>
                        <tr>
                            <th class="icon"></th>
                             <th>{{$resource('documents.titlelib')}}</th>
                            <th>{{$resource('documents.created')}}</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tr ng:repeat="odjel in odjeli | filter : Title">
                        <td class="icon">
                            <div title="{{odjel.Status.DisplayName}}" class="circle status-{{odjel.Status.LowerName}}"><i class="icon-file-alt"></i></div>
                        </td>
                        <td class="title" ng:click="select(odjel)">
                            <div class="inner">
                                <h2>{{odjel.Title}}</h2>
                                 <h2>{{$resource('odjeljenja.nacelnik')}}:{{odjel.RadnikImePrezime || "Načelnik nije imenovan!"}}</h2>
                                <p class="info">{{odjel.CreatedBy}}</p>
                            </div>
                        </td>
                        <td>{{odjel.CreatedOn | date}}</td>
                        <td class="command icon">
                            <a title="{{$resource('utility.options')}}" class="trigger tooltip"><i class="icon-reorder"></i></a>
                            <div qn:popover="{position: {my: 'right top', at: 'left top'}}">
                                <ul>
                                    <li ng:click="removeOdjel(odjel, $index)"><a><i class="icon icon-trash"></i>{{$resource('odjeljenja.delete')}}</a></li>
                                    <li ng:click="editOdjel(odjel)"><a><i class="icon-edit"></i>{{$resource('odjeljenja.edit')}}</a></li>
                                </ul>
                            </div>
                        </td> 
                        <td class="command icon"><button title="{{$resource('utility.newRadnik')}}" class="button lightblue tooltip" ng:click="newRadnik(odjel)"><i class="icon icon-user"></i></button></td>
                        <td class="number">{{odjel.RadniciCount}}</td>
                        <td class="command icon"><button title="{{$resource('utility.newReferat')}}" class="button lightblue tooltip" ng:click="newReferat(odjel)"><i class="icon icon-book"></i></button></td>
                        <td class="number">{{odjel.ReferatiCount}}</td>
                    </tr>
                </table> 
            </div>
            <br />
            <div>
              <table ng-show="male">
                   <thead>
                        <tr>
                            <th class="icon"></th>
                            <th>{{$resource('odjeljenja.referati')}}</th>
                        </tr>
                    </thead>
                    <tr ng:repeat="referat in referati | filter:OdjelID | filter:Title ">
                        <td class="icon">
                            <div title="{{referat.Status.DisplayName}}" class="circle status-{{referat.Status.LowerName}}"><i class="icon-file-alt"></i></div>
                        </td>
                        <td class="title" ng:click="select(referat)">
                            <div class="inner">
                                <h2>{{referat.Title}}</h2>
                            </div>
                        </td>
                        <td>{{referat.CreatedOn | date}}</td>
                        <td>{{odjel.Title}}</td>
                        <td ></td>
                        <td class="command icon">
                            <a title="{{$resource('utility.options')}}" class="trigger tooltip"><i class="icon-reorder"></i></a>
                            <div qn:popover="{position: {my: 'right top', at: 'left top'}}">
                                <ul>
                                    <li ng:click="removeReferat(radnik, $index)"><a><i class="icon icon-trash"></i>{{$resource('odjeljenja.delete')}}</a></li>
                                    <li ng:click="editReferat(referat)"><a><i class="icon-edit"></i>{{$resource('odjeljenja.edit')}}</a></li>
                                </ul>
                            </div>
                        </td> 
                    </tr>
                </table> 
                </div>
            <div>
              <table ng-show="male">
                   <thead>
                        <tr>
                            <th class="icon"></th>
                            <th>{{$resource('odjeljenja.radnici')}}</th>
                        </tr>
                    </thead>
                    <tr ng:repeat="radnik in radnici | filter:OdjelID | filter:Title">
                        <td class="icon">
                            <div class="badges">
                                <img ng:show="radnik.AvatarID != null" ng:src="/qusion/image/thumb/{{radnik.AvatarID}}?width=40" alt=""/>
                                <div ng:show="radnik.AvatarID == null" class="circle blue"><i  class="icon-user"></i></div>
                                <div class="badge" ng:show="radnik.Status == NeAktivan"><i class="icon-lock"></i></div>
                            </div>
                        </td>
                        <td class="title" ng:click="selectRadnik(radnik)">
                            <div class="inner">
                                <h2>{{radnik.ImePrezime}}</h2>
                                <p class="info">{{radnik.CreatedBy}}</p>
                            </div>
                        </td>
                        <td>{{radnik.CreatedOn | date}}</td>
                        <td>{{odjel.Title}}</td>
                        <td>{{radnik.Status.DisplayName}}</td>
                        <td>{{radnik.ReferatTitle}}</td>
                        <td> <p title="showReferat(radnik.ReferatID)"></p></td>
                        <td class="command icon">
                            <a title="{{$resource('utility.options')}}" class="trigger tooltip"><i class="icon-reorder"></i></a>
                            <div qn:popover="{position: {my: 'right top', at: 'left top'}}">
                                <ul>

                                    <li ng:click="removeRadnik(radnik, $index)"><a><i class="icon icon-trash"></i>{{$resource('odjeljenja.delete')}}</a></li>
                                    <li ng:click="editRadnik(radnik)"><a><i class="icon-edit"></i>{{$resource('odjeljenja.edit')}}</a></li>
                                </ul>
                            </div>
                        </td> 
                    </tr>
                </table> 
            </div>
        </div>-->
    </div>
    <div class="col2 sidebar">
        <div class="toolbar toolbar-strip lightblue cfix">
            <div class="toolbar-group row-fluid">
                <button class="button lightblue col4"><i class="icon-star"></i></button>
                <button class="button lightblue col4"><i class="icon-tag"></i></button>
                <button class="button lightblue col4"><i class="icon-tasks"></i></button>
            </div>
        </div>
        <div class="inner fillh">
            <ul class="nav">
                <!--<li ng:class="{active: isCurrentView('odjel')}"><button class="button" ng:click="show('odjel')"><i class="icon-file"></i>Postovi</button></li>-->
            </ul>
        </div>
    </div>    
    <div qn:dialog="ui.dialogEditBlog" style="display: none;"></div>
</div>