prepare user table to show and edit display names

This commit is contained in:
Björn Schießle 2013-01-28 13:12:44 +01:00
parent 996b5cf368
commit 022a7b13b8
3 changed files with 10 additions and 5 deletions

View file

@ -62,7 +62,7 @@ class User {
/**
* @brief Get a list of all display names
* @returns array with all display names (key) and the correspondig uids (value)
* @returns array with all display names (value) and the correspondig uids (key)
*
* Get a list of all display names and user ids.
*/

View file

@ -79,6 +79,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<thead>
<tr>
<th id='headerName'><?php echo $l->t('Name')?></th>
<th id="headerDisplayName"><?php echo $l->t( 'Display Name' ); ?></th>
<th id="headerPassword"><?php echo $l->t( 'Password' ); ?></th>
<th id="headerGroups"><?php echo $l->t( 'Groups' ); ?></th>
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
@ -92,6 +93,10 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
<?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>">
<td class="name"><?php echo $user["name"]; ?></td>
<td class="displayName"><?php echo $user["displayName"]; ?> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>"
alt="change display name" title="change display name"/>
</td>
<td class="password"><span>●●●●●●●</span> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>"
alt="set new password" title="set new password"/>
@ -157,7 +162,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
</div>
</td>
<td class="remove">
<?php if($user['uid']!=OC_User::getUser()):?>
<?php if($user['name']!=OC_User::getUser()):?>
<a href="#" class="action delete" original-title="<?php echo $l->t('Delete')?>">
<img src="<?php echo image_path('core', 'actions/delete.svg') ?>" />
</a>

View file

@ -42,7 +42,7 @@ $defaultQuota=OC_Appconfig::getValue('files', 'default_quota', 'none');
$defaultQuotaIsUserDefined=array_search($defaultQuota, $quotaPreset)===false && array_search($defaultQuota, array('none', 'default'))===false;
// load users and quota
foreach($accessibleusers as $displayName => $uid) {
foreach($accessibleusers as $uid => $displayName) {
$quota=OC_Preferences::getValue($i, 'files', 'quota', 'default');
$isQuotaUserDefined=array_search($quota, $quotaPreset)===false && array_search($quota, array('none', 'default'))===false;
@ -52,8 +52,8 @@ foreach($accessibleusers as $displayName => $uid) {
}
$users[] = array(
"name" => $name,
"uid" => $uid,
"name" => $uid,
"displayName" => $displayName,
"groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($uid)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/),
'quota'=>$quota,
'isQuotaUserDefined'=>$isQuotaUserDefined,