Improve users search in Administration module

pull/186/head
Francis Lachapelle 2015-11-25 16:15:41 -05:00
parent 4edb87978b
commit 418d30193b
4 changed files with 27 additions and 8 deletions

View File

@ -13,3 +13,12 @@
/* Modules descriptions */
"ACLs_description" = "<p>The Access Control Lists administration module allows to change the ACLs of each user's Calendars and Address books.</p><p>To modify the ACLs of a user's folder, type the name of the user in the search field at the top of the window and double-click on the desired folder.</p>";
/* Rights module: initial search message */
"Start a search to edit the rights" = "Start a search to edit the rights";
/* Rights module: Empty search result */
"No matching user" = "No matching user";
/* Rights module: no selection */
"No resource selected" = "No resource selected";

View File

@ -59,6 +59,15 @@
</md-toolbar>
<md-content id="usersList" layout="column" class="md-flex">
<md-subheader ng-show="app.service.$query">
<span ng-switch="app.users.length">
<span ng-switch-when="0"><var:string label:value="No matching user"/></span>
<span ng-switch-default="true">{{app.users.length}} <var:string label:value="users found"/></span>
</span>
</md-subheader>
<md-subheader ng-hide="app.service.$query">
<var:string label:value="Start a search to edit the rights"/>
</md-subheader>
<md-list class="sg-section-list">
<div ng-repeat="user in app.users">
<md-list-item ng-class="{ 'sg-collapsed': user.uid != app.selectedUser.uid,
@ -110,10 +119,11 @@
ng-class="{ 'sg-close': !app.selectedUser.selectedFolder }"
ui-view="acl">
<md-toolbar class="md-whiteframe-z1 hide-sm"><!-- empty toolbar --></md-toolbar>
<md-content class="hide-sm md-flex layout-fill md-hue-1" layout="column">
<md-input-container layout-align="center center">
<label class="sg-md-title"><var:string label:value="No resource selected"/></label>
</md-input-container>
<md-content class="hide-sm md-flex layout-fill md-hue-1"
layout="column" layout-align="center center">
<div class="md-default-theme md-background md-fg md-hue-3 sg-md-title">
<var:string label:value="No resource selected"/>
</div>
</md-content>
</div>
</div>

View File

@ -7,11 +7,11 @@
/**
* @ngInject
*/
AdministrationController.$inject = ['$state', '$mdToast', 'Dialog', 'encodeUriFilter', 'User', 'Administration'];
function AdministrationController($state, $mdToast, Dialog, encodeUriFilter, User, Administration) {
AdministrationController.$inject = ['$state', '$mdToast', 'Dialog', 'encodeUriFilter', 'User'];
function AdministrationController($state, $mdToast, Dialog, encodeUriFilter, User) {
var vm = this;
vm.administration = Administration;
vm.service = User;
vm.selectedUser = null;
vm.users = User.$users;

View File

@ -4,7 +4,7 @@
[id="usersList"] > md-list {
// Since the users list doesn't use the virtual repeater, force the vertical scroll
position: absolute;
top: 0;
top: $touch-zone-width;
bottom: 0;
left: 0;
right: 0;