diff options
Diffstat (limited to 'modules')
30 files changed, 193 insertions, 117 deletions
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 455cd714..ec5ad7b2 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -116,7 +116,7 @@ title="<?= html::clean_attribute($comment->author_email()) ?>"> <?= html::clean($comment->author_name()) ?> </a></p> </td> <td> - <div class="right"> + <div class="g-right"> <? $item = $comment->item() ?> <div class="gItem gPhoto"> <a href="<?= $item->url() ?>"> @@ -139,7 +139,7 @@ <? if ($comment->state != "unpublished"): ?> <li> <a href="javascript:set_state('unpublished',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-check"></span> <?= t("Unapprove") ?> </a> @@ -148,7 +148,7 @@ <? if ($comment->state != "published"): ?> <li> <a href="javascript:set_state('published',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-check"></span> <?= t("Approve") ?> </a> @@ -157,7 +157,7 @@ <? if ($comment->state != "spam"): ?> <li> <a href="javascript:set_state('spam',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-cancel"></span> <?= t("Spam") ?> </a> @@ -166,14 +166,14 @@ <!-- <li> <a href="javascript:reply(<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-arrowreturnthick-1-w"></span> <?= t("Reply") ?> </a> </li> <li> <a href="javascript:Edit(<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-pencil"></span> <?= t("Edit") ?> </a> @@ -181,7 +181,7 @@ --> <li> <a href="javascript:set_state('deleted',<?=$comment->id?>)" - class="gButtonLink ui-state-default ui-icon-left"> + class="g-button ui-state-default ui-icon-left"> <span class="ui-icon ui-icon-trash"></span> <?= t("Delete") ?> </a> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index dd706a23..ee4a8ad6 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a href="<?= url::site("form/add/comments/{$item->id})") ?>" id="gAddCommentButton" - class="gButtonLink ui-corner-all ui-icon-left ui-state-default right"> + class="g-button ui-corner-all ui-icon-left ui-state-default right"> <span class="ui-icon ui-icon-comment"></span> <?= t("Add a comment") ?> </a> diff --git a/modules/exif/views/exif_sidebar.html.php b/modules/exif/views/exif_sidebar.html.php index 60c0e1d4..23ecab03 100644 --- a/modules/exif/views/exif_sidebar.html.php +++ b/modules/exif/views/exif_sidebar.html.php @@ -1,6 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <a id="gExifDataLink" href="<?= url::site("exif/show/{$item->id}") ?>" title="<?= t("Photo Details")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-info"></span> <?= t("View more information") ?> </a> diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 23ff27a8..91b723ad 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -84,7 +84,7 @@ </div> <p> - <a class="gButtonLink gDialogLink ui-state-default ui-corner-all" + <a class="g-button gDialogLink ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/start/g2_import_task::import?csrf=$csrf") ?>"> <?= t("Begin import!") ?> </a> diff --git a/modules/info/helpers/info_installer.php b/modules/gallery/controllers/admin_sidebar.php index d77908d0..7e71426a 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/gallery/controllers/admin_sidebar.php @@ -17,16 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class info_installer { - static function install() { - block_manager::add("site.sidebar", "info", "metadata"); - module::set_version("info", 2); +class Admin_Sidebar_Controller extends Admin_Controller { + public function index() { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_sidebar.html"); + print $view; } - static function upgrade($version) { - if ($version == 1) { - block_manager::add("site.sidebar", "info", "metadata"); - module::set_version("info", 2); - } - } } + diff --git a/modules/gallery/helpers/block_manager.php b/modules/gallery/helpers/block_manager.php index 87563b32..b99a6571 100644 --- a/modules/gallery/helpers/block_manager.php +++ b/modules/gallery/helpers/block_manager.php @@ -66,8 +66,10 @@ class block_manager_Core { foreach ($active as $id => $desc) { if (method_exists("$desc[0]_block", "get")) { $block = call_user_func(array("$desc[0]_block", "get"), $desc[1], $theme); - $block->id = $id; - $result .= $block; + if (!empty($block)) { + $block->id = $id; + $result .= $block; + } } } return $result; diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 5a16236e..ab25a4b6 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -157,7 +157,11 @@ class Theme_View_Core extends Gallery_View { * Print out the sidebar. */ public function sidebar_blocks() { - return block_manager::get_html("site.sidebar", $this); + $sidebar = block_manager::get_html("site.sidebar", $this); + if (empty($sidebar) && user::active()->admin) { + $sidebar = new View("no_sidebar.html"); + } + return $sidebar; } /** diff --git a/modules/gallery/module.info b/modules/gallery/module.info index bffcb1c6..f509ff08 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 14 +version = 15 diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index f64c7f80..f4c300ae 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -1,6 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(document).ready(function() { + $(".gAvailable .gBlock").equal_heights(); select_toolkit = function(el) { if (!$(this).hasClass("gUnavailable")) { window.location = <?= html::js_string(url::site("admin/graphics/choose/__TK__?csrf=$csrf")) ?> diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php index 010a31b4..08c19234 100644 --- a/modules/gallery/views/admin_graphics_gd.html.php +++ b/modules/gallery/views/admin_graphics_gd.html.php @@ -11,7 +11,7 @@ <?= t("You have GD version %version.", array("version" => $tk->version)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> <? elseif ($tk->installed): ?> <? if ($tk->error): ?> @@ -20,7 +20,7 @@ </p> <? endif ?> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> <? else: ?> <div class="gModuleStatus gInfo"> diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php index 97624850..6ee15bc3 100644 --- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php +++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php @@ -11,7 +11,7 @@ <?= t("GraphicsMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> </p> <? else: ?> <div class="gModuleStatus gWarning"> diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php index cdff7c2c..aeef4919 100644 --- a/modules/gallery/views/admin_graphics_imagemagick.html.php +++ b/modules/gallery/views/admin_graphics_imagemagick.html.php @@ -11,7 +11,7 @@ <?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </div> <p> - <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> + <a class="g-button ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> </p> <? elseif ($tk->error): ?> <div class="gModuleStatus gWarning"> diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index fb30c7ba..d6f50516 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -88,7 +88,7 @@ <p><?= t("<strong>Step 3:</strong> Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></p> <a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>" - class="gButtonLink ui-state-default ui-corner-all ui-icon-left"> + class="g-button ui-state-default ui-corner-all ui-icon-left"> <span class="ui-icon ui-icon-power"></span> <? if (Session::instance()->get("l10n_mode", false)): ?> <?= t("Stop translation mode") ?> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index ce693d73..8c3917b6 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -30,7 +30,7 @@ </td> <td> <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"> <?= t("run") ?> </a> </td> @@ -61,10 +61,10 @@ <?= t("Owner") ?> </th> <th> - <?= t("Action") ?> <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> <?= t("cancel all") ?></a> + <?= t("Action") ?> </th> </tr> <? $i = 0; ?> @@ -95,16 +95,16 @@ <?= html::clean($task->owner()->name) ?> </td> <td> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + <?= t("cancel") ?> + </a> <? if ($task->state == "stalled"): ?> - <a class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all" + <a class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all" href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> <?= t("resume") ?> </a> <? endif ?> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> - <?= t("cancel") ?> - </a> </td> </tr> <? $i++ ?> @@ -134,10 +134,10 @@ <?= t("Owner") ?> </th> <th> - <?= t("Action") ?> <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" - class="gButtonLink ui-icon-left ui-state-default ui-corner-all right"> + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> <span class="ui-icon ui-icon-trash"></span><?= t("remove all finished") ?></a> + <?= t("Action") ?> </th> </tr> <? $i = 0; ?> @@ -166,19 +166,19 @@ </td> <td> <? if ($task->done): ?> - <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> <?= t("remove") ?> </a> <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button ui-state-default ui-corner-all"> <?= t("browse log") ?> </a> <? endif ?> <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink gButtonLink" ui-state-default ui-corner-all> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="gDialogLink g-button" ui-state-default ui-corner-all> <?= t("resume") ?> </a> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="gButtonLink ui-state-default ui-corner-all"> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> <?= t("cancel") ?> </a> <? endif ?> diff --git a/modules/gallery/views/admin_maintenance_task.html.php b/modules/gallery/views/admin_maintenance_task.html.php index ddd5bd17..c0bc0d43 100644 --- a/modules/gallery/views/admin_maintenance_task.html.php +++ b/modules/gallery/views/admin_maintenance_task.html.php @@ -57,7 +57,7 @@ <div id="gStatus"> <?= t("Starting up...") ?> </div> - <div class="txtright"> + <div class="g-txt-right"> <button id="gPauseButton" class="ui-state-default ui-corner-all" onclick="dismiss()"><?= t("Pause") ?></button> <button id="gDoneButton" class="ui-state-default ui-corner-all" style="display: none" onclick="dismiss()"><?= t("Close") ?></button> </div> diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php new file mode 100644 index 00000000..32386f5d --- /dev/null +++ b/modules/gallery/views/admin_sidebar.html.php @@ -0,0 +1,9 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> + +<h1> <?= t("Arrange Sidebar") ?> </h1> +<p> + <?= t("Select and drag blocks from the available column to the active column to add to the sidebar; remove by dragging the other way.") ?> +</p> + +<div id="gSiteBlocks"> +</div>
\ No newline at end of file diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php index b0f424be..a7f001aa 100644 --- a/modules/gallery/views/l10n_client.html.php +++ b/modules/gallery/views/l10n_client.html.php @@ -68,7 +68,7 @@ </div> <input type="submit" name="l10n-edit-save" value="<?= t("Save translation")->for_html_attr() ?>"/> <a href="javascript: Gallery.l10nClient.copySourceText()" - class="gButtonLink ui-state-default ui-corner-all"><?= t("Copy source text") ?></a> + class="g-button ui-state-default ui-corner-all"><?= t("Copy source text") ?></a> </form> </div> </div> diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 5515c3dc..021e5772 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -18,7 +18,7 @@ <a href="<?= url::site("form/edit/users/{$user->id}") ?>" title="<?= t("Edit Your Profile")->for_html_attr() ?>" id="gAfterInstallChangePasswordLink" - class="gButtonLink ui-state-default ui-corners-all"> + class="g-button ui-state-default ui-corners-all"> <?= t("Change Password Now") ?> </a> <script> diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php index 261e5848..d0402eb6 100644 --- a/modules/image_block/helpers/image_block_block.php +++ b/modules/image_block/helpers/image_block_block.php @@ -23,7 +23,7 @@ class image_block_block_Core { } static function get($block_id, $theme) { - $block = new Block(); + $block = ""; switch ($block_id) { case "random_image": $block = new Block(); diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 558c32f1..3a853609 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -23,7 +23,7 @@ class info_block_Core { } static function get($block_id, $theme) { - $block = new Block(); + $block = ""; switch ($block_id) { case "metadata": if ($theme->item()) { diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index cbc2e4f9..87f12be9 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -31,7 +31,7 @@ </div> <div id="gOrganizeControls"> <a id="gOrganizeClose" href="#" ref="done" - class="gButtonLink ui-corner-all ui-state-default"><?= t("Close") ?></a> + class="g-button ui-corner-all ui-state-default"><?= t("Close") ?></a> <form> <?= t("Sort order") ?> <?= form::dropdown(array("id" => "gOrganizeSortColumn"), album::get_sort_order_options(), $album->sort_column) ?> diff --git a/modules/rss/helpers/rss_block.php b/modules/rss/helpers/rss_block.php new file mode 100644 index 00000000..43043f5f --- /dev/null +++ b/modules/rss/helpers/rss_block.php @@ -0,0 +1,49 @@ +<?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 rss_block_Core { + static function get_site_list() { + return array("rss_feeds" => t("Available RSS Feeds")); + } + + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "rss_feeds": + $feeds = array(); + foreach (module::active() as $module) { + $class_name = "{$module->name}_rss"; + if (method_exists($class_name, "available_feeds")) { + $feeds = array_merge($feeds, + call_user_func(array($class_name, "available_feeds"), $theme->item(), $theme->tag())); + } + } + if (!empty($feeds)) { + $block = new Block(); + $block->css_id = "gRss"; + $block->title = t("Available RSS Feeds"); + $block->content = new View("rss_block.html"); + $block->content->feeds = $feeds; + } + break; + } + + return $block; + } +} diff --git a/modules/rss/helpers/rss_theme.php b/modules/tag/helpers/tag_block.php index 3d1b9a29..bbcc5fd1 100644 --- a/modules/rss/helpers/rss_theme.php +++ b/modules/tag/helpers/tag_block.php @@ -17,24 +17,29 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class rss_theme_Core { - static function sidebar_blocks($theme) { - $block = new Block(); - $block->css_id = "gRss"; - $block->title = t("Available RSS Feeds"); - $block->content = new View("rss_block.html"); - $block->content->feeds = array(); - foreach (module::active() as $module) { - $class_name = "{$module->name}_rss"; - if (method_exists($class_name, "available_feeds")) { - $block->content->feeds = array_merge( - $block->content->feeds, - call_user_func(array($class_name, "available_feeds"), $theme->item(), $theme->tag())); - } - } +class tag_block_Core { + static function get_site_list() { + return array("tag" => t("Popular Tags")); + } - if ($block->content->feeds) { - return $block; + static function get($block_id, $theme) { + $block = ""; + switch ($block_id) { + case "tag": + $block = new Block(); + $block->css_id = "gTag"; + $block->title = t("Popular Tags"); + $block->content = new View("tag_block.html"); + $block->content->cloud = tag::cloud(30); + + if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { + $controller = new Tags_Controller(); + $block->content->form = tag::get_add_form($theme->item()); + } else { + $block->content->form = ""; + } + break; } + return $block; } -} +}
\ No newline at end of file diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php index 1bce9bd8..4f22d2ac 100644 --- a/modules/tag/helpers/tag_theme.php +++ b/modules/tag/helpers/tag_theme.php @@ -28,25 +28,6 @@ class tag_theme_Core { $theme->script("tag.js"); } - static function sidebar_blocks($theme) { - // @todo this needs to be data driven - - $block = new Block(); - $block->css_id = "gTag"; - $block->title = t("Popular Tags"); - $block->content = new View("tag_block.html"); - $block->content->cloud = tag::cloud(30); - - if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { - $controller = new Tags_Controller(); - $block->content->form = tag::get_add_form($theme->item()); - } else { - $block->content->form = ""; - } - - return $block; - } - static function sort_by_name($tag1, $tag2) { return strcasecmp($tag1->name, $tag2->name); } diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 8f3693aa..b7344cda 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -23,7 +23,7 @@ <? $column_tag_count = 0 ?> <table id="gTagAdmin" class="gBlockContent"> - <caption class="understate"> + <caption class="g-understate"> <?= t2("There is one tag", "There are %count tags", $tags->count()) ?> </caption> <tr> @@ -48,9 +48,9 @@ <li> <span id="gTag-<?= $tag->id ?>" class="gEditable tag-name"><?= html::clean($tag->name) ?></span> - <span class="understate">(<?= $tag->count ?>)</span> + <span class="g-understate">(<?= $tag->count ?>)</span> <a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>" - class="gDialogLink delete-link gButtonLink"> + class="gDialogLink delete-link g-button"> <span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a> </li> 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> diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php index ac69d21d..3790030d 100644 --- a/modules/watermark/views/admin_watermarks.html.php +++ b/modules/watermark/views/admin_watermarks.html.php @@ -8,7 +8,7 @@ <? if (empty($name)): ?> <a href="<?= url::site("admin/watermarks/form_add") ?>" title="<?= t("Upload a watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a> <? else: ?> <h2> <?= t("Active Watermark") ?> </h2> <p> @@ -27,10 +27,10 @@ <div class="controls"> <a href="<?= url::site("admin/watermarks/form_edit") ?>" title="<?= t("Edit Watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a> <a href="<?= url::site("admin/watermarks/form_delete") ?>" title="<?= t("Delete Watermark")->for_html_attr() ?>" - class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> + class="gDialogLink g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a> </div> </div> <? endif ?> |