td.password, td.quota, td.displayName { width:12em; cursor:pointer; }
td.password>span, td.quota>span, rd.displayName>span { margin-right: 1.2em; color: #C7C7C7; }
span.usersLastLoginTooltip { white-space: nowrap; }
-th#headerLastLogin, td.lastLogin { display : none; }
-th#headerStorageLocation, td.storageLocation { display : none; }
+#userlist .storageLocation,
+#userlist .userBackend,
+#userlist .lastLogin {
+ display : none;
+}
td.remove { width:1em; padding-right:1em; }
tr:hover>td.password>span, tr:hover>td.displayName>span { margin:0; cursor:pointer; }
this.$el.find('.quota-user').singleSelect().on('change', this.onQuotaSelect);
},
- add: function (username, displayname, groups, subadmin, quota, storageLocation, lastLogin, sort) {
+ add: function (username, displayname, groups, subadmin, quota, storageLocation, lastLogin, sort, backend) {
var $tr = $userListBody.find('tr:first-child').clone();
// this removes just the `display:none` of the template row
$tr.removeAttr('style');
*/
$tr.find('td.storageLocation').text(storageLocation);
+ /**
+ * user backend
+ */
+ $tr.find('td.userBackend').text(backend);
+
/**
* last login
*/
if(UserList.has(user.name)) {
return true;
}
- var $tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, user.storageLocation, user.lastLogin, false);
+ var $tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, user.storageLocation, user.lastLogin, false, user.backend);
$tr.addClass('appear transparent');
trs.push($tr);
loadedUsers++;
}, 10000);
}
if(!UserList.has(username)) {
- UserList.add(username, username, result.groups, null, 'default', result.storageLocation, 0, true);
+ UserList.add(username, username, result.groups, null, 'default', result.storageLocation, 0, true, result.backend);
}
$('#newusername').focus();
GroupList.incEveryoneCount();
// Option to display/hide the "Storage location" column
$('#CheckboxStorageLocation').click(function() {
if ($('#CheckboxStorageLocation').is(':checked')) {
- $("#headerStorageLocation").show();
- $("#userlist td.storageLocation").show();
+ $("#userlist .storageLocation").show();
} else {
- $("#headerStorageLocation").hide();
- $("#userlist td.storageLocation").hide();
+ $("#userlist .storageLocation").hide();
}
});
// Option to display/hide the "Last Login" column
$('#CheckboxLastLogin').click(function() {
if ($('#CheckboxLastLogin').is(':checked')) {
- $("#headerLastLogin").show();
- $("#userlist td.lastLogin").show();
+ $("#userlist .lastLogin").show();
+ } else {
+ $("#userlist .lastLogin").hide();
+ }
+ });
+ // Option to display/hide the "Last Login" column
+ $('#CheckboxUserBackend').click(function() {
+ if ($('#CheckboxUserBackend').is(':checked')) {
+ $("#userlist .userBackend").show();
} else {
- $("#headerLastLogin").hide();
- $("#userlist td.lastLogin").hide();
+ $("#userlist .userBackend").hide();
}
});
<?php print_unescaped($this->inc('users/part.setquota')); ?>
<div id="userlistoptions">
- <p><label>
- <input type="checkbox" name="StorageLocation" value="StorageLocation" id="CheckboxStorageLocation">
+ <p>
+ <input type="checkbox" name="StorageLocation" value="StorageLocation" id="CheckboxStorageLocation">
+ <label for="CheckboxStorageLocation">
<?php p($l->t('Show storage location')) ?>
- </label></p>
- <p><label>
+ </label>
+ </p>
+ <p>
<input type="checkbox" name="LastLogin" value="LastLogin" id="CheckboxLastLogin">
- <?php p($l->t('Show last log in')) ?>
- </label></p>
+ <label for="CheckboxLastLogin">
+ <?php p($l->t('Show last log in')) ?>
+ </label>
+ </p>
+ <p>
+ <input type="checkbox" name="UserBackend" value="UserBackend" id="CheckboxUserBackend">
+ <label for="CheckboxUserBackend">
+ <?php p($l->t('Show user backend')) ?>
+ </label>
+ </p>
</div>
</div>
</div>
$user
->method('getHome')
->will($this->returnValue('/home/user'));
+ $user
+ ->expects($this->once())
+ ->method('getBackendClassName')
+ ->will($this->returnValue('bar'));
$this->container['UserManager']
->expects($this->once())
array(
'username' => 'foo',
'groups' => null,
- 'storageLocation' => '/home/user'
+ 'storageLocation' => '/home/user',
+ 'backend' => 'bar'
),
Http::STATUS_CREATED
);
$user
->method('getHome')
->will($this->returnValue('/home/user'));
+ $user
+ ->expects($this->once())
+ ->method('getBackendClassName')
+ ->will($this->returnValue('bar'));
$existingGroup = $this->getMockBuilder('\OCP\IGroup')
->disableOriginalConstructor()->getMock();
$existingGroup
array(
'username' => 'foo',
'groups' => array('NewGroup', 'ExistingGroup'),
- 'storageLocation' => '/home/user'
+ 'storageLocation' => '/home/user',
+ 'backend' => 'bar'
),
Http::STATUS_CREATED
);