<div class="modal-header">
	<button type="button" class="close" data-ng-click="cancel()">×</button>
	<h3 class="modal-title"><i class="fa fa-rss-square"></i> Subscribers</h3>
</div>
<div class="modal-body">

	<p class="lead text-center" ng-pluralize count="subscribers.length" when="{'0': 'There are no subscribers for this task.',
																'1': 'There is one person subscribed to this task.',
																'other': 'There are {} people subscribed to this task.'}">
	</p>

	<div class="form-group">
		<div class="input-group">
			<input type="text" class="form-control" placeholder="Filter by name" ng-model="search">
			<span class="input-group-addon"><i class="fa fa-search"></i></span>
		</div>
	</div>
	<table class="table table-striped">
		<tbody>
			<tr ng-repeat="user in users | filter:search">
				<td>{[{ ($index+1) + '. ' + user.name }]}</td>
				<td>
					<span class="btn btn-default btn-sm pull-right" ng-if="user.subscribed" ng-click="unsubscribe(user)" ng-disabled="user.saving"><i class="fa fa-spinner fa-spin" ng-if="user.saving"></i> <i class="fa fa-check" ng-hide="user.saving"></i> Unsubscribe</span>
					<span class="btn btn-default btn-sm pull-right" ng-if="!user.subscribed" ng-click="subscribe(user)" ng-disabled="user.saving"><i class="fa fa-spinner fa-spin" ng-if="user.saving"></i> Subscribe</span>
				</td>
			</tr>
		</tbody>
	</table>

</div>
<div class="modal-footer">
	<button class="btn" data-ng-click="cancel()" eat-click>Close</button>
</div>