<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="5">
					<i class="fa fa-search"></i>&nbsp;&nbsp;<input type="text" ng-model="query.search" id="search" tabindex="1" placeholder="Search communities">
				</td>
				<td colspan="2">
					<div class="page-title-nav">
						<a href="/community/new" ng-if="!account.user.isCommunityDirector"><button class="button button-green nav-button-green"><i class="fa fa-plus"></i><span>Add community</span></button></a>
						<a href="/communities/notes"><button class="button button-green nav-button-green"><i class="fa fa-file"></i><span>Notes</span></button></a>
					</div>
				</td>
			</tr>
			<tr ng-if="!account.user.isCommunityDirector">
				<th>Status</th>
				<td>
					<select ng-model="query.status" name="searchType" tabindex="2">
						<option value="all">All</option>
						<option value="active">Active</option>
						<option value="inactive">Inactive</option>
					</select>
				</td>
				<th>Open</th>
				<td>
					<select ng-model="query.open" name="searchType" tabindex="3">
						<option value="all">All</option>
						<option value="open">Open</option>
						<option value="closed">Closed</option>
					</select>
				</td>
		</table>
	</div>

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

	<ng-include src="'/assets/view/listview-communities.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>

	<ng-include src="'/assets/view/communities-community-open-close-form.html'"></ng-include>

</div>
