summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/controllers/admin_sidebar.php28
-rw-r--r--modules/gallery/helpers/block_manager.php6
-rw-r--r--modules/gallery/libraries/Theme_View.php6
-rw-r--r--modules/gallery/module.info2
-rw-r--r--modules/gallery/views/admin_graphics.html.php1
-rw-r--r--modules/gallery/views/admin_graphics_gd.html.php4
-rw-r--r--modules/gallery/views/admin_graphics_graphicsmagick.html.php2
-rw-r--r--modules/gallery/views/admin_graphics_imagemagick.html.php2
-rw-r--r--modules/gallery/views/admin_languages.html.php2
-rw-r--r--modules/gallery/views/admin_maintenance.html.php28
-rw-r--r--modules/gallery/views/admin_maintenance_task.html.php2
-rw-r--r--modules/gallery/views/admin_sidebar.html.php9
-rw-r--r--modules/gallery/views/l10n_client.html.php2
-rw-r--r--modules/gallery/views/welcome_message.html.php2
14 files changed, 70 insertions, 26 deletions
diff --git a/modules/gallery/controllers/admin_sidebar.php b/modules/gallery/controllers/admin_sidebar.php
new file mode 100644
index 00000000..7e71426a
--- /dev/null
+++ b/modules/gallery/controllers/admin_sidebar.php
@@ -0,0 +1,28 @@
+<?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 Admin_Sidebar_Controller extends Admin_Controller {
+ public function index() {
+ $view = new Admin_View("admin.html");
+ $view->content = new View("admin_sidebar.html");
+ print $view;
+ }
+
+}
+
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>