<!-- LIST PAGE -->
<div class="container" id="list-container">
    <div class="row">
        <div class="col-md-8">
            <div class="component">
                <div class="title">
                    <div class="btn-group btn-group-sm pull-right">
                        <div class="btn-group btn-group-sm">
                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                                    translate="GENERAL.ACTION.SHOW-RESULTS" translate-value-size="{{'GENERAL.RESULT-SIZES.' + filter.resultSize | translate}}">
                                &nbsp;
                                <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu">
                            	<li ng-repeat="resultSize in config.filter.resultSizes"><a href="" ng-click="filter.setResultSize(resultSize)">{{'GENERAL.RESULT-SIZES.' + resultSize.toString() | translate}}</a></li>
                            </ul>
                        </div>
                        <button type="button" class="btn btn-default" ng-click="filter.toggleOrder()">
                        	<i class="glyphicon" ng-class="{'glyphicon-sort-by-attributes': filter.order == 'asc', 'glyphicon-sort-by-attributes-alt': filter.order == 'desc'}"></i>
                        </button>
                    </div>
                    <div class="btn-group btn-group-sm pull-right">
                    	<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
                                translate="GENERAL.ACTION.SORT-BY" translate-value-sort="{{filter.sort.name | translate}}">
                            &nbsp;
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                           <li ng-repeat="sort in filter.sortObjects"><a href="" ng-click="filter.setSort(sort)">{{sort.name | translate}}</a></li>
                        </ul>
                    </div>
                    <div class="btn-group btn-group-sm pull-right">
                        <a class="btn btn-default" role="button"
                           title="{{'GENERAL.ACTION.REFRESH-LIST' | translate}}"
                           ng-click="filter.refresh();">
                            <i class="glyphicon glyphicon-refresh"></i>
                        </a>
                    </div>
                    <div class="pull-right loading" ng-show="filter.loading">
                    	<i class="glyphicon glyphicon-refresh"></i>
                    </div>
                    <h2>{{'APP-DEFINITIONS.TITLE.MAIN' | translate:job}}</h2>
                </div>

                <div class="grid-wrapper" id="app-definitions">
                    <div class="grid-message" ng-if="appDefinitionsData.size > 0">
                         <span>{{'APP-DEFINITIONS.LIST-MESSAGE' | translate:appDefinitionsData}}</span>
                    </div>
                     <div class="grid-message" ng-if="appDefinitionsData.size == 0">
                        <span>{{'APP-DEFINITIONS.LIST-MESSAGE-EMPTY' | translate}}</span>
                    </div>
                    <div ng-grid="gridDefinitions" class="gridStyle" ng-if="gridDefinitions && appDefinitionsData.data" />
                </div>
            </div>
        </div>
        <div class="col-md-4">

            <!-- FILTERS -->
            <div class="component tip-left">
                <div class="title">
                    <div class="btn-group btn-group-sm pull-right">
                        <button type="button" class="btn btn-default" data-toggle="dropdown" ng-show="filter.supportedProperties.length > 0">
                            <i class="glyphicon glyphicon-plus"></i>
                        </button>
                        <ul class="dropdown-menu">
                            <li ng-repeat="prop in filter.supportedProperties"><a href="" ng-click="filter.addProperty(prop)">{{prop.name | translate}}</a></li>
                        </ul>
                    </div>
                    <div class="pull-right">
                        <a class="action" ng-click="filter.clear()" translate="GENERAL.ACTION.CLEAR-FILTERS"></a>
                    </div>
                    <h2>Filter</h2>
                </div>
                <div class="section" ng-if="filter.properties.latest !== undefined">
	              <div class="subtitle"><label for="filter-latest" translate="APP-DEFINITIONS.FILTER.LATEST"></label> </div>
               	  <div class="input-group input-group-sm">
               	  	<input type="checkbox" id="filter-latest" ng-model="filter.properties.latest" ng-change="toggleLatestVersion()" />&nbsp;<span class="check" translate="CASE-DEFINITIONS.FILTER.LATEST-HELP"></span>
	              </div>
	            </div>
                <div class="section" ng-if="filter.properties.nameLike !== undefined">
                    <div class="subtitle"><label for="filter-nameLike" translate="APP-DEFINITIONS.FILTER.NAME"></label> </div>
                    <div class="input-group input-group-sm">
                        <input ng-disabled="filter.properties.latest == true" id="filter-nameLike" type="text" class="form-control" value="" ng-model="filter.properties.nameLike" ng-change="filter.refreshDelayed()">
                    </div>
                </div>
                <div class="section" ng-if="filter.properties.keyLike !== undefined">
                    <div class="subtitle"><label for="filter-keyLike" translate="APP-DEFINITIONS.FILTER.KEY"></label> </div>
                    <div class="input-group input-group-sm">
                        <input id="filter-keyLike" type="text" class="form-control" value="" ng-model="filter.properties.keyLike" ng-change="filter.refreshDelayed()">
                    </div>
                </div>
                <div class="section" ng-if="filter.properties.deploymentId !== undefined">
                    <div class="subtitle"><label for="filter-deploymentId" translate="APP-DEFINITIONS.FILTER.DEPLOYMENT-ID"></label> </div>
                    <div class="input-group input-group-sm">
                        <input ng-disabled="filter.properties.latest == true" id="filter-deploymentId" type="text" class="form-control" value="" ng-model="filter.properties.deploymentId" ng-change="filter.refreshDelayed()">
                    </div>
                </div>
                <div class="section" ng-if="filter.properties.tenantIdLike !== undefined">
                    <div class="subtitle"><label for="filter-tenantId" translate="APP-DEFINITIONS.FILTER.TENANT-ID"></label> </div>
                    <div class="input-group input-group-sm">
                        <input id="filter-tenantId" type="text" class="form-control" value="" ng-model="filter.properties.tenantIdLike" ng-change="filter.refreshDelayed()">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>