eventman/angular_app/person-info.html

51 lines
2.8 KiB
HTML
Raw Normal View History

2015-04-05 22:16:11 +02:00
<!-- show details of a Person -->
<div class="container">
2015-04-05 17:36:29 +02:00
<h1>{{person.name}} {{person.surname}}
<button ng-if="person._id" ng-click="$state.go('person.edit', {id: person._id})" class="btn btn-success">
2015-04-06 11:58:44 +02:00
<span class="glyphicon glyphicon-edit"></span>
2015-04-05 17:36:29 +02:00
{{'Edit' | translate}}
</button>
</h1>
<div class="panel panel-primary table-striped top5">
<div class="panel-heading">Events</div>
2015-04-05 00:55:59 +02:00
<div class="panel-body">
<form class="form-inline">
<div class="form-group">
<label for="query-persons">{{'Search:' | translate}}</label>
2015-04-18 15:49:28 +02:00
<input eventman-focus type="text" id="query-persons" class="form-control" placeholder="{{'Name or email' | translate}}" ng-model="query">
2015-04-05 00:55:59 +02:00
</div>
<div class="form-group">
<label for="events-order">{{'Sort by:' | translate}}</label>
<select id="events-order" class="form-control" ng-model="eventsOrderProp">
<option value="title">{{'Title' | translate}}</option>
<option value="-title">{{'Title (descending)' | translate}}</option>
<option value="begin-date">{{'Date' | translate}}</option>
<option value="-begin-date">{{'Date (descending)' | translate}}</option>
2015-04-05 00:55:59 +02:00
</select>
</div>
</form>
<table class="table">
<thead>
<tr>
<th>{{'Event' | translate}}</th>
<th>{{'Registered' | translate}}</th>
<th>{{'Attended' | translate}}</th>
2015-04-05 00:55:59 +02:00
</tr>
</thead>
<tbody>
<tr ng-repeat="event in events | splittedFilter:query | orderBy:eventsOrderProp">
2015-04-05 17:36:29 +02:00
<td><strong><a ui-sref="event.info({id: event._id})">{{event.title}}</a></strong></td>
<td>
<button class="btn btn-link" name="switch-registered" ng-click="switchRegistered(event, person, !event.person_data.person_id)"><span class="glyphicon {{(event.person_data.person_id) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
</td>
2015-04-05 00:55:59 +02:00
<td>
<button ng-disabled="!event.person_data.person_id" class="btn btn-link" name="switch-attended" ng-click="updateAttendee(event, !event.person_data.attended)"><span class="glyphicon {{(event.person_data.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
2015-04-05 00:55:59 +02:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
2015-03-21 16:48:00 +01:00
</div>