summaryrefslogtreecommitdiff
path: root/modules/user/views/admin_users_group.html.php
blob: bfd79dba500d0079018d0941002218e826e72cb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php defined("SYSPATH") or die("No direct script access.") ?>
<h4>
  <?= p::clean($group->name) ?>
  <? if (!$group->special): ?>
  <a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>"
    title="<?= t("Delete the %name group", array("name" => p::clean($group->name))) ?>"
    class="gDialogLink gButtonLink ui-state-default ui-corner-all">
    <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
  <? else: ?>
  <a title="<?= t("This default group cannot be deleted") ?>"
     class="gDialogLink gButtonLink ui-state-disabled ui-corner-all ui-icon-left">
    <span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
  <? endif ?>
</h4>

<? if ($group->users->count() > 0): ?>
<ul>
  <? foreach ($group->users as $i => $user): ?>
  <li class="gUser">
    <?= p::clean($user->name) ?>
    <? if (!$group->special): ?>
    <a href="javascript:remove_user(<?= $user->id ?>, <?= $group->id ?>)"
       class="gButtonLink ui-state-default ui-corner-all ui-icon-left"
       title="<?= t("Remove %user from %group group",
              array("user" => p::clean($user->name), "group" => p::clean($group->name))) ?>">
      <span class="ui-icon ui-icon-closethick"><?= t("remove") ?></span>
    </a>
    <? endif ?>
  </li>
  <? endforeach ?>
</ul>
<? else: ?>
<div>
  <p>
    <?= t("Drag &amp; drop users from the User Admin above into this group box to add group members.") ?>
  </p>
</div>
<? endif ?>