42 lines
1.6 KiB
HTML
42 lines
1.6 KiB
HTML
<!-- show a list of Persons -->
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<form class="form-inline">
|
|
<div class="form-group">
|
|
<label for="query-persons">Search:</label>
|
|
<input type="text" id="query-persons" class="form-control" placeholder="Name or email" ng-model="query">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="persons-order">Sort by:</label>
|
|
<select id="persons-order" class="form-control" ng-model="orderProp">
|
|
<option value="name">Alphabetical</option>
|
|
<option value="_id">ID</option>
|
|
</select>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<td><strong>Name</strong></td>
|
|
<td><strong>Actions</strong></td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="person in persons | filter:query | orderBy:orderProp">
|
|
<td>
|
|
<span><strong><a href="/#/persons/{{person._id}}"><span>{{person.name}}</span> <span>{{person.surname}}</span></a></strong></span>
|
|
<p>{{person.email}}</p>
|
|
</td>
|
|
<td>
|
|
<button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash" aria-hidden="true"></button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|