part.userlist.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <table id="userlist" class="hascontrols grid" data-groups="<?php p($_['allGroups']);?>">
  2. <thead>
  3. <tr>
  4. <?php if ($_['enableAvatars']): ?>
  5. <th id='headerAvatar'></th>
  6. <?php endif; ?>
  7. <th id='headerName'><?php p($l->t('Username'))?></th>
  8. <th id="headerDisplayName"><?php p($l->t( 'Full Name' )); ?></th>
  9. <th id="headerPassword"><?php p($l->t( 'Password' )); ?></th>
  10. <th id="headerGroups"><?php p($l->t( 'Groups' )); ?></th>
  11. <?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
  12. <th id="headerSubAdmins"><?php p($l->t('Group Admin')); ?></th>
  13. <?php endif;?>
  14. <th id="headerQuota"><?php p($l->t('Quota')); ?></th>
  15. <th id="headerStorageLocation"><?php p($l->t('Storage Location')); ?></th>
  16. <th id="headerLastLogin"><?php p($l->t('Last Login')); ?></th>
  17. <th id="headerRemove">&nbsp;</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <?php foreach($_["users"] as $user): ?>
  22. <tr data-uid="<?php p($user["name"]) ?>"
  23. data-displayname="<?php p($user["displayName"]) ?>">
  24. <?php if ($_['enableAvatars']): ?>
  25. <td class="avatar"><div class="avatardiv"></div></td>
  26. <?php endif; ?>
  27. <td class="name"><?php p($user["name"]); ?></td>
  28. <td class="displayName"><span><?php p($user["displayName"]); ?></span> <img class="svg action"
  29. src="<?php p(image_path('core', 'actions/rename.svg'))?>"
  30. alt="<?php p($l->t("change full name"))?>" title="<?php p($l->t("change full name"))?>"/>
  31. </td>
  32. <td class="password"><span>●●●●●●●</span> <img class="svg action"
  33. src="<?php print_unescaped(image_path('core', 'actions/rename.svg'))?>"
  34. alt="<?php p($l->t("set new password"))?>" title="<?php p($l->t("set new password"))?>"/>
  35. </td>
  36. <td class="groups">
  37. <select
  38. class="groupsselect"
  39. data-username="<?php p($user['name']) ;?>"
  40. data-user-groups="<?php p(json_encode($user['groups'])) ;?>"
  41. data-placeholder="groups" title="<?php p($l->t('Groups'))?>"
  42. multiple="multiple">
  43. <?php foreach($_["adminGroup"] as $adminGroup): ?>
  44. <option value="<?php p($adminGroup['name']);?>"><?php p($adminGroup['name']); ?></option>
  45. <?php endforeach; ?>
  46. <?php foreach($_["groups"] as $group): ?>
  47. <option value="<?php p($group['name']);?>"><?php p($group['name']);?></option>
  48. <?php endforeach;?>
  49. </select>
  50. </td>
  51. <?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
  52. <td class="subadmins">
  53. <select
  54. class="subadminsselect"
  55. data-username="<?php p($user['name']) ;?>"
  56. data-subadmin="<?php p(json_encode($user['subadmin']));?>"
  57. data-placeholder="subadmins" title="<?php p($l->t('Group Admin'))?>"
  58. multiple="multiple">
  59. <?php foreach($_["subadmingroups"] as $group): ?>
  60. <option value="<?php p($group);?>"><?php p($group);?></option>
  61. <?php endforeach;?>
  62. </select>
  63. </td>
  64. <?php endif;?>
  65. <td class="quota">
  66. <select class='quota-user' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>">
  67. <option
  68. <?php if($user['quota'] === 'default') print_unescaped('selected="selected"');?>
  69. value='default'>
  70. <?php p($l->t('Default'));?>
  71. </option>
  72. <option
  73. <?php if($user['quota'] === 'none') print_unescaped('selected="selected"');?>
  74. value='none'>
  75. <?php p($l->t('Unlimited'));?>
  76. </option>
  77. <?php foreach($_['quota_preset'] as $preset):?>
  78. <option
  79. <?php if($user['quota']==$preset) print_unescaped('selected="selected"');?>
  80. value='<?php p($preset);?>'>
  81. <?php p($preset);?>
  82. </option>
  83. <?php endforeach;?>
  84. <?php if($user['isQuotaUserDefined']):?>
  85. <option selected="selected" value='<?php p($user['quota']);?>'>
  86. <?php p($user['quota']);?>
  87. </option>
  88. <?php endif;?>
  89. <option value='other' data-new>
  90. <?php p($l->t('Other'));?>
  91. ...
  92. </option>
  93. </select>
  94. </td>
  95. <td class="storageLocation"><?php p($user["storageLocation"]); ?></td>
  96. <?php
  97. if($user["lastLogin"] === 0) {
  98. $lastLogin = $l->t('never');
  99. $lastLoginDate = $lastLogin;
  100. } else {
  101. $lastLogin = relative_modified_date($user["lastLogin"]);
  102. $lastLoginDate = \OC_Util::formatDate($user["lastLogin"]);
  103. }
  104. ?>
  105. <td class="lastLogin" title="<?php p('<span class="usersLastLoginTooltip">'.$lastLoginDate.'</span>'); ?>"><?php p($lastLogin); ?></td>
  106. <td class="remove">
  107. <?php if($user['name']!=OC_User::getUser()):?>
  108. <a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>">
  109. <img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" class="svg" />
  110. </a>
  111. <?php endif;?>
  112. </td>
  113. </tr>
  114. <?php endforeach; ?>
  115. </tbody>
  116. </table>