eventman/angular_app/persons-list.html

43 lines
1.7 KiB
HTML
Raw Normal View History

2015-03-22 09:08:38 +01:00
<!-- show a list of Persons -->
2015-03-22 17:08:25 +01:00
<div class="container">
2015-04-05 17:36:29 +02:00
<form class="form-inline">
<div class="form-group">
<label for="query-persons">{{'Search:' | translate}}</label>
2015-04-05 17:58:39 +02:00
<input type="text" id="query-persons" class="form-control" placeholder="{{'Name or email' | translate}}" ng-model="query">
2015-03-22 09:08:38 +01:00
</div>
2015-04-05 17:36:29 +02:00
<div class="form-group">
<label for="persons-order">{{'Sort by:' | translate}}</label>
<select id="persons-order" class="form-control" ng-model="orderProp">
<option value="name">{{'Alphabetical' | translate}}</option>
<option value="_id">{{'ID' | translate}}</option>
</select>
</div>
<div class="form-group">
<button ng-click="$state.go('person.new')" class="btn btn-success">
<span class="glyphicon glyphicon-plus-sign"></span>
{{'Add person' | translate}}
</button>
</div>
</form>
2015-03-14 17:32:16 +01:00
2015-04-05 09:28:08 +02:00
<table class="table table-striped">
2015-03-22 17:08:25 +01:00
<thead>
<tr>
2015-04-05 17:58:39 +02:00
<td><strong>{{'Name' | translate}}</strong></td>
<td><strong>{{'Actions' | translate}}</strong></td>
2015-03-22 17:08:25 +01:00
</tr>
</thead>
<tbody>
<tr ng-repeat="person in persons | filter:query | orderBy:orderProp">
<td>
2015-04-05 17:36:29 +02:00
<span><strong><a ui-sref="person.info({id: person._id})"><span>{{person.name}}</span>&nbsp;<span>{{person.surname}}</span></a></strong></span>
2015-03-22 17:08:25 +01:00
<p>{{person.email}}</p>
</td>
<td>
2015-04-05 11:20:57 +02:00
<button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
2015-03-22 17:08:25 +01:00
</td>
</tr>
</tbody>
</table>
</div>