<div class="clearfix">
	<div class="task-group-inner">
		<a ng-click="showDeviceModal()" href="#" data-eat-click>Add a new device</a>
		<div class="pull-right">
			<span><a href="#" ng-class="{muted: view != 'all'}" ng-click="view = 'selected';" data-eat-click>Selected</a> <span class="muted">/</span> <a href="#" ng-class="{muted: view == 'all'}" ng-click="view = 'all';" data-eat-click>All customer's devices</a></span>
		</div>
		<hr>
	</div>
</div>
<div class="task-group-inner">
	<span ng-hide="getDevices().length > 0"><i class="fa fa-meh-o"></i> No devices</span>
	<ul class="media-list" ng-if="getDevices().length > 0">
		<li class="media" ng-repeat="device in getDevices()" style="border-bottom: 1px solid #EAEAEA;">
			<div class="pull-left text-center" style="width: 45px;">
				<i class="media-object fa-3x" ng-class="getDeviceClass(device)"></i>
			</div>
			<div class="media-body">
				<div class="row">
					<div class="col-sm-3">
						<h4 class="media-heading">{[{ device.model_number.manufacturer.name }]}</h4>
						<small class="muted">{[{ device.model_number.model_number }]}</small>
					</div>
					<div class="col-sm-6">
						<small class="muted">PSU: {[{ device.psu == '1' ? 'Yes' : 'No' }]} &nbsp;&middot;&nbsp; Case: {[{ device.case == '1' ? 'Yes' : 'No' }]}</small>
						<p><small>VI: {[{ device.visual_inspection }]}</small></p>
					</div>
					<div class="col-sm-3 text-right">
						<a href="#" ng-click="showDeviceModal(device)" data-eat-click>Edit</a><br>
						<div class="btn btn-mini" ng-click="selectDevice(device)"><i class="fa fa-check" ng-if="device.selected"></i> {[{ device.selected ? 'Deselect' : 'Select' }]}</div>
					</div>
				</div>
			</div>
		</li>
	</ul>
	<div data-paginator="paginator" data-show-pages="false" ng-if="devices.length > 0 && view == 'all'"></div>
	<p ng-if="changed" class="text-center"><i class="fa fa-info-circle"></i> <small class="text-warning">The devices have changed. Don't forget to save changes</small></p>
	<div class="button text-right" ng-hide="true">
		<button class="btn btn-default"><i class="fa fa-plus"></i> Add device</button>
	</div>
</div>