summaryrefslogtreecommitdiff
path: root/modules/user/views
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-18 20:22:10 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-18 20:22:10 -0600
commit5f56cbf997c12ab1aaf14403873fd9dfc33690ef (patch)
tree0120ffbad2e7ac728fd830ccbb9d71db28ca48b1 /modules/user/views
parent91ab6f161fa1e118418922fbf0a42f1924d7df0e (diff)
Wrap all admin views in g-block and g-block content. This provides the means to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's.
Diffstat (limited to 'modules/user/views')
-rw-r--r--modules/user/views/admin_users.html.php159
1 files changed, 82 insertions, 77 deletions
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php
index 2f8d8673..aae39c8c 100644
--- a/modules/user/views/admin_users.html.php
+++ b/modules/user/views/admin_users.html.php
@@ -41,88 +41,93 @@
});
}
</script>
-<div class="g-block">
- <a href="<?= url::site("admin/users/add_user_form") ?>"
- class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all"
- title="<?= t("Create a new user")->for_html_attr() ?>">
- <span class="ui-icon ui-icon-circle-plus"></span>
- <?= t("Add a new user") ?>
- </a>
- <h2>
- <?= t("User Admin") ?>
- </h2>
+<div class="g-block">
+ <h1> <?= t("Users and Groups") ?> </h1>
<div class="g-block-content">
- <table id="g-user-admin-list">
- <tr>
- <th><?= t("Username") ?></th>
- <th><?= t("Full name") ?></th>
- <th><?= t("Email") ?></th>
- <th><?= t("Last login") ?></th>
- <th><?= t("Actions") ?></th>
- </tr>
+ <div class="g-block">
+ <a href="<?= url::site("admin/users/add_user_form") ?>"
+ class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all"
+ title="<?= t("Create a new user")->for_html_attr() ?>">
+ <span class="ui-icon ui-icon-circle-plus"></span>
+ <?= t("Add a new user") ?>
+ </a>
- <? foreach ($users as $i => $user): ?>
- <tr id="g-user-<?= $user->id ?>" class="<?= text::alternate("g-odd", "g-even") ?> user <?= $user->admin ? "admin" : "" ?>">
- <td id="user-<?= $user->id ?>" class="core-info g-draggable">
- <img src="<?= $user->avatar_url(20, $theme->url("images/avatar.jpg", true)) ?>"
- title="<?= t("Drag user onto group below to add as a new member")->for_html_attr() ?>"
- alt="<?= html::clean_attribute($user->name) ?>"
- width="20"
- height="20" />
- <?= html::clean($user->name) ?>
- </td>
- <td>
- <?= html::clean($user->full_name) ?>
- </td>
- <td>
- <?= html::clean($user->email) ?>
- </td>
- <td>
- <?= ($user->last_login == 0) ? "" : gallery::date($user->last_login) ?>
- </td>
- <td class="g-actions">
- <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>"
- open_text="<?= t("close") ?>"
- class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left">
- <span class="ui-icon ui-icon-pencil"></span><span class="g-button-text"><?= t("edit") ?></span></a>
- <? if (user::active()->id != $user->id && !$user->guest): ?>
- <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>"
- class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left">
- <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
- <? else: ?>
- <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>"
- class="g-button ui-state-disabled ui-corner-all ui-icon-left">
- <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></span>
- <? endif ?>
- </td>
- </tr>
- <? endforeach ?>
- </table>
- </div>
-</div>
+ <h2> <?= t("User Admin") ?> </h2>
-<div id="g-group-admin" class="g-block ui-helper-clearfix">
- <a href="<?= url::site("admin/users/add_group_form") ?>"
- class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all"
- title="<?= t("Create a new group")->for_html_attr() ?>">
- <span class="ui-icon ui-icon-circle-plus"></span>
- <?= t("Add a new group") ?>
- </a>
+ <div class="g-block-content">
+ <table id="g-user-admin-list">
+ <tr>
+ <th><?= t("Username") ?></th>
+ <th><?= t("Full name") ?></th>
+ <th><?= t("Email") ?></th>
+ <th><?= t("Last login") ?></th>
+ <th><?= t("Actions") ?></th>
+ </tr>
- <h2>
- <?= t("Group Admin") ?>
- </h2>
+ <? foreach ($users as $i => $user): ?>
+ <tr id="g-user-<?= $user->id ?>" class="<?= text::alternate("g-odd", "g-even") ?> user <?= $user->admin ? "admin" : "" ?>">
+ <td id="user-<?= $user->id ?>" class="core-info g-draggable">
+ <img src="<?= $user->avatar_url(20, $theme->url("images/avatar.jpg", true)) ?>"
+ title="<?= t("Drag user onto group below to add as a new member")->for_html_attr() ?>"
+ alt="<?= html::clean_attribute($user->name) ?>"
+ width="20"
+ height="20" />
+ <?= html::clean($user->name) ?>
+ </td>
+ <td>
+ <?= html::clean($user->full_name) ?>
+ </td>
+ <td>
+ <?= html::clean($user->email) ?>
+ </td>
+ <td>
+ <?= ($user->last_login == 0) ? "" : gallery::date($user->last_login) ?>
+ </td>
+ <td class="g-actions">
+ <a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>"
+ open_text="<?= t("close") ?>"
+ class="g-panel-link g-button ui-state-default ui-corner-all ui-icon-left">
+ <span class="ui-icon ui-icon-pencil"></span><span class="g-button-text"><?= t("edit") ?></span></a>
+ <? if (user::active()->id != $user->id && !$user->guest): ?>
+ <a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>"
+ class="g-dialog-link g-button ui-state-default ui-corner-all ui-icon-left">
+ <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
+ <? else: ?>
+ <span title="<?= t("This user cannot be deleted")->for_html_attr() ?>"
+ class="g-button ui-state-disabled ui-corner-all ui-icon-left">
+ <span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></span>
+ <? endif ?>
+ </td>
+ </tr>
+ <? endforeach ?>
+ </table>
+ </div>
+ </div>
- <div class="g-block-content">
- <ul>
- <? foreach ($groups as $i => $group): ?>
- <li id="group-<?= $group->id ?>" class="g-group <?= ($group->special ? "g-default-group" : "") ?>" />
- <? $v = new View("admin_users_group.html"); $v->group = $group; ?>
- <?= $v ?>
- </li>
- <? endforeach ?>
- </ul>
- </div>
+ <div id="g-group-admin" class="g-block ui-helper-clearfix">
+ <a href="<?= url::site("admin/users/add_group_form") ?>"
+ class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all"
+ title="<?= t("Create a new group")->for_html_attr() ?>">
+ <span class="ui-icon ui-icon-circle-plus"></span>
+ <?= t("Add a new group") ?>
+ </a>
+
+ <h2>
+ <?= t("Group Admin") ?>
+ </h2>
+
+ <div class="g-block-content">
+ <ul>
+ <? foreach ($groups as $i => $group): ?>
+ <li id="group-<?= $group->id ?>" class="g-group <?= ($group->special ? "g-default-group" : "") ?>" />
+ <? $v = new View("admin_users_group.html"); $v->group = $group; ?>
+ <?= $v ?>
+ </li>
+ <? endforeach ?>
+ </ul>
+ </div>
+ </div>
+ </div>
</div>