mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Finish integrating the move of the user edit/update functions into the user module. The premise is that the plugable user module will provide the update screens if the user backend supports updates.
This commit is contained in:
@@ -43,14 +43,12 @@
|
||||
}
|
||||
</script>
|
||||
<div class="g-block">
|
||||
<? if (!empty($writable)): ?>
|
||||
<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>
|
||||
<? endif ?>
|
||||
|
||||
<h2>
|
||||
<?= t("User Admin") ?>
|
||||
@@ -68,7 +66,7 @@
|
||||
|
||||
<? 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 <?= !empty($writable) ? "g-draggable" : "" ?> ">
|
||||
<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) ?>"
|
||||
@@ -90,18 +88,16 @@
|
||||
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">
|
||||
<?= (!empty($writable)) ? t("edit") : t("display") ?>
|
||||
<?= t("edit") ?>
|
||||
</span></a>
|
||||
<? if (!empty($writable)): ?>
|
||||
<? 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 ?>
|
||||
<? 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>
|
||||
@@ -111,14 +107,12 @@
|
||||
</div>
|
||||
|
||||
<div id="g-group-admin" class="g-block g-clearfix">
|
||||
<? if (!empty($writable)): ?>
|
||||
<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>
|
||||
<? endif ?>
|
||||
|
||||
<h2>
|
||||
<?= t("Group Admin") ?>
|
||||
@@ -127,9 +121,8 @@
|
||||
<div class="g-block-content">
|
||||
<ul>
|
||||
<? foreach ($groups as $i => $group): ?>
|
||||
<? $class = !empty($writable) ? "" : "g-group-disable" ?>
|
||||
<li id="group-<?= $group->id ?>" class="g-group <?= $class ?> <?= ($group->special ? "g-default-group" : "") ?>" />
|
||||
<? $v = new View("admin_users_group.html"); $v->group = $group; $v->writable = !empty($writable) ?>
|
||||
<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 ?>
|
||||
|
||||
Reference in New Issue
Block a user