<div>
    <button class="button"  ng:click="selectImages()">{{$resource('images.select..')}}</button>
    <ul class="thumbnails">
        <li ng:repeat="select in selected"><img ng:src="/qusion/image/thumb/{{select}}?width=200&tickts={{ticks}}" alt="" /></li>
    </ul>
    <div qn:dialog="ui.dialogSelect" style="padding: 0">
        <div class="toolbar cfix">
            <div class="toolbar-group">
                <h3>{{$resource('images.select_images')}}</h3>
            </div>
            <div class="toolbar-group">
                <label class="checkbox"><input type="checkbox" ng:model="checked"/>Upload images</label>
            </div>
            <div class="toolbar-group right" ng:show="!checked">
                <select ng:Model="selectedLibrary">
                    <option value="0"  selected ng:click="getAll()">All galleries</option>
                    <option value="{{library.ID}}" ng:repeat="library in libraries">{{library.Title}}</option>
                </select>
            </div>
        </div>
        <div style="height: 400px; overflow: auto;" ng:show="!checked">
            <ul qn:Selector="options"  ng:model="images" class="thumbnails">
                <li ng:repeat="image in images" class="ui-state-default" style="padding: 5px">
                    <div style="height: 100px; width: 200px; overflow: hidden">
                        <img ng:src="/qusion/image/thumb/{{image.ID}}?width=200&tickts={{ticks}}" alt="" />
                    </div>
                </li>
                
            </ul>

             <div style="text-align: center">
              <button ng:click="loadMore()" ng:Show="canLoadMore == true">ЈОШ СЛИКА</button>
            </div>
        </div>
        <form name="myform" ng:show="checked"> 
            <div class="toolbar cfix">
                <div class="toolbar-group">
                    <h3>
                        <span class="circle circle-small blue"><span class="icon ui-icon-image"></span></span>
                        Upload images
                    </h3>
                </div>
                <div class="toolbar-group">
                    <div class="col2"> {{$resource('images.lib_name')}}</div> 
                    <div ng:show="addToExistig == true" class="toolbar-group">
                        <select ng:Model="libraryId" ng:options="library.ID as library.Title  for library in libraries" style="margin:0" ></select>
                        ili <button class="btn-link" ng:click="addToExistingLibrary()">Add new gallery</button>
                    </div>
                    <div ng:show="addToExistig == false" class="toolbar-group">
                        <input ng:Model="libraryTitle" type="text" />
                        ili <button class="btn-link" ng:click="addToExistingLibrary()">Add to existing gallery</button>
                    </div>
                </div>
                <div class="toolbar-group right">
                    <button class="button lightblue" ng:click="startUpload()"><i class="icon-upload"></i></button>
                </div>
            </div>
            <div>
                <input name="libraryId" type="hidden" value="{{libraryId}}">
                <input id="fileupload" type="file" name="file" data-url="/qusion/image/upload" multiple>
            </div>
        </form>
        <div style="margin-top: 15px" ng:show="!checked">
            <button class="button lightblue" ng:click="doneSelection()"><i class="icon-ok"></i> {{$resource('images.save')}}</button> &nbsp; <button class="button" ng:click="cancelSeletion()">Cancel</button>
        </div>
    </div>
</div>