<div>
	<div data-ng-hide="loading || data.length == 0">
		<table class="table table-hover table-striped table-condensed">
			<thead class="table-header">
				<th>ID</th>
				<th></th>
				<th>Assigned to</th>
				<th>Message</th>
				<th>Customer</th>
				<th>Contract</th>
				<th class="centered">Booked In</th>
				<th class="centered">Closed</th>
				<th>Status</th>
			</thead>
			<tbody>
				<tr data-ng-repeat="message in data">
					<td><a href="{!! URL::to('messages') !!}/{[{ message.id }]}">{[{ message.id }]}</a></td>
					<td>
						<span class="label label-danger" ng-show="message.severity_id == '4'">Gold Service</span>
						<span class="label label-warning" ng-show="message.severity_id == '3'">High</span>
						<span class="label label-info" ng-show="message.prebook == '1'" bs-tooltip="message.prebook_date">Prebook</span>
						<span class="label label-inverse" ng-show="message.return_id" bs-tooltip="message.return_id">Return</span>
					</td>
					<td><span class="label label-info">{[{ message.user.name }]}</span></td>
					<td>{[{ message.message | limitTo:30 }]}...</td>
					<td><i data-ng-class="{'fa fa-user': message.client_type == 'customer', 'fa fa-building-o': message.client_type == 'client'}"></i> {[{ message.client.name }]}</td>
					<td><span class="label label-success">{[{ message.client.contract.name }]}</span></td>
					<td class="centered"><span tooltip="{[{ message.created_at }]}">{[{ message.created_at | fromNow }]}</span></td>
					<td class="centered"><i class="fa fa-check" data-ng-show="message.closed == '1'"></i></td>
					<td>{[{ message.status }]}</td>
				</tr>
			</tbody>
		</table>
		<div data-paginator="paginator"></div>
	</div>
	<div class="alert alert-warning" data-ng-show="data.length == 0 && !loading">
		<i class="fa fa-meh-o"></i> Meh, nothing here...
	</div>
	<div class="row" data-ng-show="loading">
		<i class="fa fa-spinner fa-spin"></i> Loading, please wait...
	</div>
</div>