<ol class="breadcrumb">
	<li><a href="#/">Dashboard</a></li>
	<li>Settings</li>
	<li class="active">Tags</li>
</ol>

<div class="container-fluid">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-midnightblue">
				<div class="panel-heading">
					<h2>Tags</h2>
					<div class="panel-ctrls">
						<a class="button-icon" ng-click="vm._downloadCSV()" title="Download CSV"><i class="ti ti-save"></i></a>
						<a class="button-icon" ng-click="vm._reload()" title="Reload"><i class="ti ti-reload"></i></a>
						<a href="#/tags/new" class="button-icon" title="New Tag"><i class="ti ti-plus"></i></a>
					</div>
				</div>
				<div class="panel-body">
					<p><input type="text" class="form-control" ng-model="searchInput" placeholder="Search here..."></p>
					<table class="table table-striped">
						<thead>
							<tr>
								<th>Name</th>
								<th class="hidden-xs">Color</th>
								<th width="15%">Actions</th>
							</tr>
						</thead>
						<tbody>
							<tr dir-paginate="tag in vm.tags | filter: searchInput | itemsPerPage: 10">
								<td>
									<a href="#/tags/{{tag.id}}">
										{{tag.name}}
									</a>
								</td>
								<td class="hidden-xs"><span style="display: block; width: 20px; height: 20px; background-color: {{tag.color}}"></span></td>
								<td>
									<div class="btn-group">
										<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
											<i class="ti ti-settings"></i>&nbsp;&nbsp;<span class="caret"></span>
										</button>
										<ul class="dropdown-menu" role="menu">
											<li><a href="#/tags/{{tag.id}}/edit">Edit</a></li>
											<li><a ng-click="vm._destroy(tag.id)">Delete</a></li>
										</ul>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
					<p class="text-center" ng-show="vm.tags.length == 0">No records found</p>
					<div class="row">
						<div class="col-sm-12 text-center">
							<dir-pagination-controls></dir-pagination-controls>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
