summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-08-29 12:46:53 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-08-29 12:46:53 +0200
commit2764ceb14c14ff7bebfc3b5768147cd8a062c1a9 (patch)
tree4ace2ef6e22c59cdadd5c2b4ea99ef320bf40e74
parent9d6757654085dd3ec396bb9bb12af337e726cbac (diff)
parentba841d956160a83206449ab9d6345d5cd13f67e9 (diff)
downloadnextcloud-server-2764ceb14c14ff7bebfc3b5768147cd8a062c1a9.tar.gz
nextcloud-server-2764ceb14c14ff7bebfc3b5768147cd8a062c1a9.zip
Merge pull request #9684 from owncloud/fix-9367
Ability to show/hide last log in and storage location in user management
-rw-r--r--settings/css/settings.css12
-rw-r--r--settings/js/users/users.js23
-rw-r--r--settings/templates/users/main.php18
-rw-r--r--settings/templates/users/part.createuser.php2
-rw-r--r--settings/templates/users/part.setquota.php63
5 files changed, 72 insertions, 46 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css
index b9ce79bc3b8..a62a971b831 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -92,17 +92,14 @@ td.password>img,td.displayName>img, td.remove>a, td.quota>img { visibility:hidde
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; }
td.remove { width:1em; padding-right:1em; }
tr:hover>td.password>span, tr:hover>td.displayName>span { margin:0; cursor:pointer; }
tr:hover>td.remove>a, tr:hover>td.password>img,tr:hover>td.displayName>img, tr:hover>td.quota>img { visibility:visible; cursor:pointer; }
tr:hover>td.remove>a { float:right; }
-div.quota {
- margin: 10px;
- display: block;
-}
-div.quota-select-wrapper { position: relative; }
div.recoveryPassword { left:50em; display:block; position:absolute; top:-1px; }
input#recoveryPassword {width:15em;}
#controls select.quota {
@@ -111,11 +108,6 @@ input#recoveryPassword {width:15em;}
height: 37px;
}
select.quota-user { position:relative; left:0; top:0; width:10em; }
-div.quota>span {
- white-space: nowrap;
- color: #888;
- text-shadow: 0 1px 0 #fff;
-}
select.quota.active { background: #fff; }
input.userFilter {width: 200px;}
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 0f72746ee83..86ed43d958e 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -707,4 +707,27 @@ $(document).ready(function () {
);
});
+ // Option to display/hide the "Storage location" column
+ $('#CheckboxStorageLocation').click(function() {
+ if ($('#CheckboxStorageLocation').is(':checked')) {
+ $("#headerStorageLocation").show();
+ $("#userlist td.storageLocation").show();
+ } else {
+ $("#headerStorageLocation").hide();
+ $("#userlist td.storageLocation").hide();
+ }
+ });
+ // Option to display/hide the "Last Login" column
+ $('#CheckboxLastLogin').click(function() {
+ if ($('#CheckboxLastLogin').is(':checked')) {
+ $("#headerLastLogin").show();
+ $("#userlist td.lastLogin").show();
+ } else {
+ $("#headerLastLogin").hide();
+ $("#userlist td.lastLogin").hide();
+ }
+ });
+
+
+
});
diff --git a/settings/templates/users/main.php b/settings/templates/users/main.php
index c5805d53476..59284eaabd3 100644
--- a/settings/templates/users/main.php
+++ b/settings/templates/users/main.php
@@ -22,7 +22,23 @@ $userlistParams['subadmingroups'] = array_flip($items);
<div id="app-navigation">
<?php print_unescaped($this->inc('users/part.grouplist')); ?>
<div id="app-settings">
- <?php print_unescaped($this->inc('users/part.setquota')); ?>
+ <div id="app-settings-header">
+ <button class="settings-button" tabindex="0" data-apps-slide-toggle="#app-settings-content"></button>
+ </div>
+ <div id="app-settings-content">
+ <?php print_unescaped($this->inc('users/part.setquota')); ?>
+
+ <div id="userlistoptions">
+ <p><label>
+ <input type="checkbox" name="StorageLocation" value="StorageLocation" id="CheckboxStorageLocation">
+ <?php p($l->t('Show storage location')) ?>
+ </label></p>
+ <p><label>
+ <input type="checkbox" name="LastLogin" value="LastLogin" id="CheckboxLastLogin">
+ <?php p($l->t('Show last log in')) ?>
+ </label></p>
+ </div>
+ </div>
</div>
</div>
diff --git a/settings/templates/users/part.createuser.php b/settings/templates/users/part.createuser.php
index 3dfd27ee52d..edec7587eb5 100644
--- a/settings/templates/users/part.createuser.php
+++ b/settings/templates/users/part.createuser.php
@@ -31,4 +31,4 @@
<form autocomplete="off" id="usersearchform">
<input type="text" class="input userFilter" placeholder="<?php p($l->t('Search Users and Groups')); ?>" />
</form>
-</div> \ No newline at end of file
+</div>
diff --git a/settings/templates/users/part.setquota.php b/settings/templates/users/part.setquota.php
index afbbee82063..b58df49998a 100644
--- a/settings/templates/users/part.setquota.php
+++ b/settings/templates/users/part.setquota.php
@@ -1,39 +1,34 @@
-<div id="app-settings-header">
- <button class="settings-button" tabindex="0" data-apps-slide-toggle="#app-settings-content"></button>
-</div>
-<div id="app-settings-content">
- <div class="quota">
- <!-- Default storage -->
- <span><?php p($l->t('Default Quota'));?></span>
- <?php if((bool) $_['isAdmin']): ?>
- <select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-tipsy-gravity="s">
- <option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'>
- <?php p($l->t('Unlimited'));?>
- </option>
- <?php foreach($_['quota_preset'] as $preset):?>
- <?php if($preset !== 'default'):?>
- <option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'>
- <?php p($preset);?>
- </option>
- <?php endif;?>
- <?php endforeach;?>
- <?php if($_['defaultQuotaIsUserDefined']):?>
- <option selected="selected" value='<?php p($_['default_quota']);?>'>
- <?php p($_['default_quota']);?>
+<div class="quota">
+ <!-- Default storage -->
+ <span><?php p($l->t('Default Quota'));?></span>
+ <?php if((bool) $_['isAdmin']): ?>
+ <select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-tipsy-gravity="s">
+ <option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'>
+ <?php p($l->t('Unlimited'));?>
+ </option>
+ <?php foreach($_['quota_preset'] as $preset):?>
+ <?php if($preset !== 'default'):?>
+ <option <?php if($_['default_quota']==$preset) print_unescaped('selected="selected"');?> value='<?php p($preset);?>'>
+ <?php p($preset);?>
</option>
<?php endif;?>
- <option data-new value='other'>
- <?php p($l->t('Other'));?>
- ...
- </option>
- </select>
- <?php endif; ?>
- <?php if((bool) !$_['isAdmin']): ?>
- <select class='quota' disabled="disabled">
- <option selected="selected">
+ <?php endforeach;?>
+ <?php if($_['defaultQuotaIsUserDefined']):?>
+ <option selected="selected" value='<?php p($_['default_quota']);?>'>
<?php p($_['default_quota']);?>
</option>
- </select>
- <?php endif; ?>
- </div>
+ <?php endif;?>
+ <option data-new value='other'>
+ <?php p($l->t('Other'));?>
+ ...
+ </option>
+ </select>
+ <?php endif; ?>
+ <?php if((bool) !$_['isAdmin']): ?>
+ <select class='quota' disabled="disabled">
+ <option selected="selected">
+ <?php p($_['default_quota']);?>
+ </option>
+ </select>
+ <?php endif; ?>
</div>