event-info.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!-- show details of an Event -->
  2. <div class="container">
  3. <h1>{{event.title}}
  4. <button ng-if="event._id" ng-click="$state.go('event.edit', {id: event._id})" class="btn btn-success">
  5. <span class="glyphicon glyphicon-plus-sign"></span>
  6. {{'Edit' | translate}}
  7. </button>
  8. </h1>
  9. <div class="panel panel-primary table-striped top5">
  10. <div class="panel-heading">{{'Persons' | translate}}</div>
  11. <div class="panel-body">
  12. <form class="form-inline">
  13. <div class="form-group">
  14. <label for="query-persons">{{'Search:' | translate}}</label>
  15. <input type="text" id="query-persons" class="form-control" placeholder="{{'Name or email' | translate}}" ng-model="query">
  16. </div>
  17. <div class="form-group">
  18. <label for="persons-order">{{'Sort by:' | translate}}</label>
  19. <select id="persons-order" class="form-control" ng-model="orderProp">
  20. <option value="name" ng-selected="selected">{{'Alphabetical' | translate}}</option>
  21. <option value="_id">{{'ID' | translate}}</option>
  22. </select>
  23. </div>
  24. </form>
  25. <table class="table table-striped">
  26. <thead>
  27. <tr>
  28. <th>{{'Person' | translate}}</th>
  29. <th>{{'Attended' | translate}}</th>
  30. <th>{{'Actions' | translate}}</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <tr ng-repeat="person in event.persons | filter:query | orderBy:orderProp">
  35. <td><strong><a ui-sref="person.info({id: person.person_id})">{{person.name}} {{person.surname}}</a></strong></td>
  36. <td>
  37. <button class="btn btn-link" name="switch-attended" ng-click="updateAttendee(person, !person.attended)"><span class="glyphicon {{(person.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>
  38. </td>
  39. <td>
  40. <button ng-click="removeAttendee(person)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. </div>
  47. </div>