users-list.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!-- show the list of Users -->
  2. <div class="container">
  3. <div class="panel panel-primary table-striped top5">
  4. <div class="panel-heading">
  5. <h1>
  6. {{'Users' | translate}}
  7. <button ng-click="$state.go('login')" class="btn btn-success">
  8. <span class="fa fa-plus-circle vcenter"></span>
  9. {{'Add user' | translate}}
  10. </button>
  11. </h1>
  12. </div>
  13. <div class="panel-body">
  14. <form class="form-inline">
  15. <div class="form-group">
  16. <label for="query-users">{{'Search:' | translate}}</label>
  17. <input userman-focus type="text" id="query-users" class="form-control" placeholder="{{'Username or email' | translate}}" ng-model="query" ng-model-options="{debounce: 350}">
  18. </div>
  19. <div class="form-group">
  20. <label for="users-order">Sort by:</label>
  21. <select id="users-order" class="form-control" ng-model="usersOrderProp">
  22. <option value="username">{{'Username' | translate}}</option>
  23. <option value="-username">{{'Username (descending)' | translate}}</option>
  24. <option value="email">{{'Email' | translate}}</option>
  25. <option value="-email">{{'Email (descending)' | translate}}</option>
  26. </select>
  27. </div>
  28. </form>
  29. <div ng-include=" 'modal-confirm-action.html' " class="hidden"></div>
  30. <uib-pagination ng-model="currentPage" total-items="filteredUsersLength" items-per-page="itemsPerPage"
  31. direction-links="false" boundary-links="true" boundary-link-numbers="true" max-size="maxPaginationSize">
  32. </uib-pagination>
  33. <table class="table table-striped">
  34. <thead>
  35. <tr>
  36. <th class="text-right nowrap">#</th>
  37. <th><strong>{{'User' | translate}}</strong></th>
  38. <th><strong>{{'Actions' | translate}}</strong></th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr ng-repeat="user in shownItems">
  43. <td class="text-right">{{$index + 1 + ((currentPage-1)*itemsPerPage)}}</td>
  44. <td>
  45. <span>
  46. <strong>
  47. <a ui-sref="user.edit({id: user._id})">{{user.username}}</a><span ng-if="user.email && user.email != user.username"> &lt;{{user.email}}&gt;</a>
  48. </strong>
  49. </span>
  50. </td>
  51. <td>
  52. <button ng-if="hasPermission('user|delete')" ng-click="deleteUser(user._id)" type="button" class="btn btn-danger" title="{{'Delete' | translate}}"><span class="fa fa-trash"></span> {{'Delete' | translate}}</button>
  53. </td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <uib-pagination ng-model="currentPage" total-items="filteredUsersLength" items-per-page="itemsPerPage"
  58. direction-links="false" boundary-links="true" boundary-link-numbers="true" max-size="maxPaginationSize">
  59. </uib-pagination>
  60. </div>
  61. </div>
  62. </div>