Skip to content

Commit

Permalink
#1332 Add pagination widgets to user list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jul 22, 2020
1 parent 96d60d4 commit 7b78d9e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions frontend/app/views/components/org/user.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<div class="row" ng-if="$ctrl.users.total > 0">
<div class="col-md-12">
<psearch control="$ctrl.users"></psearch>

<table class="table table-striped case-list valigned">
<thead>
<tr>
Expand All @@ -34,6 +36,14 @@
<th>Password</th>
<th>API Key</th>
<th class="text-center" style="width: 100px" ng-if="$ctrl.mfaEnabled">MFA</th>
<th class="text-center" style="width: 120px">
<a href class="text-default" ng-click="$ctrl.sortByField('_updatedAt')">
Updated At
<i ng-show="$ctrl.sort.indexOf('+_updatedAt') === -1 && $ctrl.sort.indexOf('-_updatedAt') === -1" class="fa fa-sort"></i>
<i ng-show="$ctrl.sort.indexOf('+_updatedAt') !== -1" class="fa fa-caret-up"></i>
<i ng-show="$ctrl.sort.indexOf('-_updatedAt') !== -1" class="fa fa-caret-down"></i>
</a>
</th>
<th style="width: 100px"></th>
</tr>
</thead>
Expand Down Expand Up @@ -95,6 +105,7 @@
<button type="button" class="btn btn-danger btn-sm" ng-click="$ctrl.resetMfa(user)">Reset</button>
</span>
</td>
<td>{{user._updatedAt | shortDate}}</td>
<td>
<span class="clickable mr-xxs text-primary" ng-click="$ctrl.editUser(user)" uib-tooltip="Edit User">
<i class="text-20 fa fa-edit"></i>
Expand All @@ -115,6 +126,8 @@
</tr>
</tbody>
</table>

<psearch control="$ctrl.users"></psearch>
</div>
</div>
<script type="text/ng-template" id="permissionsPopoverTemplate.html">
Expand Down
8 changes: 7 additions & 1 deletion frontend/app/views/partials/admin/organisation/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3 class="box-title">
</span>
</uib-tab-heading>
<div if-permission="manageUser">
<div class="row mb-xs">
<div class="row">
<div class="col-md-12">
<div class="btn-toolbar" role="toolbar">
<button class="btn btn-sm btn-primary" type="button" ng-click="$vm.showUserDialog()">
Expand Down Expand Up @@ -88,8 +88,14 @@ <h3 class="box-title">
<div class="col-md-12">
<div class="mt-s filter-panel" ng-include="'views/partials/admin/organisation/list/filters.html'" ng-show="$vm.filtering.context.showFilters"></div>


<div class="row mt-s">
<div class="col-md-12 clearfix">
<div class="pull-left">
<h4>
User List ({{$vm.users.values.length || 0}} of {{$vm.users.total}})
</h4>
</div>

<filters-preview filters="$vm.filtering.context.filters"
on-clear-item="$vm.removeFilter(field)"
Expand Down

0 comments on commit 7b78d9e

Please sign in to comment.