<div class="top-pad"></div>

<div class="content-padding">
	<div class="box-content2 box-content-table box-search-bar table-sticky-dependant">
		<table>
			<tr>
				<td colspan="6">
					<div title="More options" class="search-bar-options" ng-class="{'orange':show_more_options}" ng-click="moreOptions()">
						<i class="fa" ng-class="{'fa-search':show_more_options, 'fa-search-plus':!show_more_options}"></i>
					</div>&nbsp;&nbsp;<input type="text" ng-model="query.search" id="search" tabindex="1" placeholder="Search tickets">
				</td>
			</tr>
			<tr ng-if="show_more_options">
				<th>Staff</th>
					<td nowrap="nowrap">
						<ui-select ng-model="query.admin" theme="select2" close-on-select="true" style="width:200px;" title="Select a staff">
							<ui-select-match placeholder="Select a staff">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="admin.id_admin as admin in staff | propsFilter: {name: $select.search}">
								{{admin.name}}
							</ui-select-choices>
						</ui-select>
						<a ng-show="query.admin" ng-click="query.admin=null" href=""><button class="button button-small button-empty button-green"><i class="fa fa-trash-o"></i></button></a>
				</td>
				<th>Status</th>
				<td>
					<select ng-model="query.status" name="searchType" tabindex="3">
						<option value="all">All</option>
						<option value="open">Open</option>
						<option value="closed">Closed</option>
					</select>
				</td>
				<th>Type</th>
				<td>
					<select ng-model="query.type" name="searchType" tabindex="3">
						<option value="all">All</option>
						<option value="system">System</option>
					</select>
				</td>
			</tr>
		</table>
	</div>

	<div class="bar-loader bar-loader-search" ng-class="{'bar-loader-loading': loading}"></div>

	<ng-include src="'/assets/view/listview-tickets.html'"></ng-include>
	<div sticky-bottom="47" class="table-sticky-dependant" ng-show="pages > 1 || more || query.page > 1">
		<div class="no-box-content-color">
			<ng-include src="'/assets/view/listview-paging.html'"></ng-include>
		</div>
	</div>
</div>
