summaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/helpers/user_block.php46
-rw-r--r--modules/user/helpers/user_theme.php17
-rw-r--r--modules/user/views/admin_users.html.php10
-rw-r--r--modules/user/views/admin_users_group.html.php6
4 files changed, 54 insertions, 25 deletions
diff --git a/modules/user/helpers/user_block.php b/modules/user/helpers/user_block.php
new file mode 100644
index 00000000..e7671f06
--- /dev/null
+++ b/modules/user/helpers/user_block.php
@@ -0,0 +1,46 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2009 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class user_block_Core {
+ static function get_site_list() {
+ return array("language" => t("Language Preference"));
+ }
+
+ static function get($block_id, $theme) {
+ $block = "";
+ switch ($block_id) {
+ case "language":
+ $locales = locales::installed();
+ foreach ($locales as $locale => $display_name) {
+ $locales[$locale] = SafeString::of_safe_html($display_name);
+ }
+ if (count($locales) > 1) {
+ $block = new Block();
+ $block->css_id = "gUserLanguageBlock";
+ $block->title = t("Language Preference");
+ $block->content = new View("user_languages_block.html");
+ $block->content->installed_locales =
+ array_merge(array("" => t("« none »")), $locales);
+ $block->content->selected = (string) user::cookie_locale();
+ }
+ break;
+ }
+ return $block;
+ }
+} \ No newline at end of file
diff --git a/modules/user/helpers/user_theme.php b/modules/user/helpers/user_theme.php
index 098d87fd..69d63eaf 100644
--- a/modules/user/helpers/user_theme.php
+++ b/modules/user/helpers/user_theme.php
@@ -33,21 +33,4 @@ class user_theme_Core {
return $view->render();
}
}
-
- static function sidebar_blocks($theme) {
- $locales = locales::installed();
- foreach ($locales as $locale => $display_name) {
- $locales[$locale] = SafeString::of_safe_html($display_name);
- }
- if (count($locales) > 1) {
- $block = new Block();
- $block->css_id = "gUserLanguageBlock";
- $block->title = t("Language Preference");
- $block->content = new View("user_languages_block.html");
- $block->content->installed_locales =
- array_merge(array("" => t("« none »")), $locales);
- $block->content->selected = (string) user::cookie_locale();
- return $block;
- }
- }
}
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php
index c065e4b1..5ee62fae 100644
--- a/modules/user/views/admin_users.html.php
+++ b/modules/user/views/admin_users.html.php
@@ -43,7 +43,7 @@
</script>
<div class="gBlock">
<a href="<?= url::site("admin/users/add_user_form") ?>"
- class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all"
+ class="gDialogLink 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") ?>
@@ -85,15 +85,15 @@
<td class="gActions">
<a href="<?= url::site("admin/users/edit_user_form/$user->id") ?>"
open_text="<?= t("close") ?>"
- class="gPanelLink gButtonLink ui-state-default ui-corner-all ui-icon-left">
+ class="gPanelLink g-button ui-state-default ui-corner-all ui-icon-left">
<span class="ui-icon ui-icon-pencil"></span><span class="gButtonText"><?= t("edit") ?></span></a>
<? if (user::active()->id != $user->id && !$user->guest): ?>
<a href="<?= url::site("admin/users/delete_user_form/$user->id") ?>"
- class="gDialogLink gButtonLink ui-state-default ui-corner-all ui-icon-left">
+ class="gDialogLink 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="gButtonLink ui-state-disabled ui-corner-all ui-icon-left">
+ 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>
@@ -105,7 +105,7 @@
<div id="gGroupAdmin" class="gBlock">
<a href="<?= url::site("admin/users/add_group_form") ?>"
- class="gDialogLink gButtonLink right ui-icon-left ui-state-default ui-corner-all"
+ class="gDialogLink g-button 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") ?>
diff --git a/modules/user/views/admin_users_group.html.php b/modules/user/views/admin_users_group.html.php
index 476e0817..6f2496f8 100644
--- a/modules/user/views/admin_users_group.html.php
+++ b/modules/user/views/admin_users_group.html.php
@@ -4,11 +4,11 @@
<? if (!$group->special): ?>
<a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>"
title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>"
- class="gDialogLink gButtonLink ui-state-default ui-corner-all">
+ class="gDialogLink g-button 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")->for_html_attr() ?>"
- class="gDialogLink gButtonLink ui-state-disabled ui-corner-all ui-icon-left">
+ class="gDialogLink g-button ui-state-disabled ui-corner-all ui-icon-left">
<span class="ui-icon ui-icon-trash"><?= t("delete") ?></span></a>
<? endif ?>
</h4>
@@ -20,7 +20,7 @@
<?= html::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"
+ class="g-button ui-state-default ui-corner-all ui-icon-left"
title="<?= t("Remove %user from %group group",
array("user" => $user->name, "group" => $group->name))->for_html_attr() ?>">
<span class="ui-icon ui-icon-closethick"><?= t("remove") ?></span>