diff options
Diffstat (limited to 'modules/gallery/views')
-rw-r--r-- | modules/gallery/views/admin_advanced_settings.html.php | 6 | ||||
-rw-r--r-- | modules/gallery/views/admin_dashboard.html.php | 8 | ||||
-rw-r--r-- | modules/gallery/views/upgrader.html.php | 173 |
3 files changed, 182 insertions, 5 deletions
diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 77aff050..b4dedaef 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -6,7 +6,7 @@ </p> <ul id="gMessage"> <li class="gWarning"> - <b><?= t("Change these values at your own risk!</b>") ?> + <b><?= t("Change these values at your own risk!") ?> </li> </ul> @@ -25,7 +25,11 @@ <a href="<?= url::site("admin/advanced_settings/edit/$var->module_name/" . p::clean($var->name)) ?>" class="gDialogLink" title="<?= t("Edit %var (%module_name)", array("var" => p::clean($var->name), "module_name" => $var->module_name)) ?>"> + <? if ($var->value): ?> <?= p::clean($var->value) ?> + <? else: ?> + <i> <?= t("empty") ?> </i> + <? endif ?> </a> </td> </tr> diff --git a/modules/gallery/views/admin_dashboard.html.php b/modules/gallery/views/admin_dashboard.html.php index c266d7e1..5b8cae2e 100644 --- a/modules/gallery/views/admin_dashboard.html.php +++ b/modules/gallery/views/admin_dashboard.html.php @@ -10,23 +10,23 @@ }; $(document).ready(function(){ - $("#gAdminDashboard .gBlock *:first").addClass("gDraggable"); + $("#gAdminDashboard .gBlock .ui-widget-header").addClass("gDraggable"); $("#gAdminDashboard").sortable({ connectWith: ["#gAdminDashboardSidebar"], containment: "document", cursor: "move", - handle: $("div:first"), + handle: $(".ui-widget-header"), opacity: 0.6, placeholder: "gDropTarget", stop: update_blocks }); - $("#gAdminDashboardSidebar .gBlock *:first").addClass("gDraggable"); + $("#gAdminDashboardSidebar .gBlock .ui-widget-header").addClass("gDraggable"); $("#gAdminDashboardSidebar").sortable({ connectWith: ["#gAdminDashboard"], containment: "document", cursor: "move", - handle: $("div:first"), + handle: $(".ui-widget-header"), opacity: 0.6, placeholder: "gDropTarget", stop: update_blocks diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php new file mode 100644 index 00000000..6b9a0110 --- /dev/null +++ b/modules/gallery/views/upgrader.html.php @@ -0,0 +1,173 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<html> + <head> + <title><?= t("Gallery3 Upgrader") ?></title> + </head> + <style> + body { + background: #eee; + font-family: Trebuchet MS; + font-size: 1.1em; + } + div#outer { + width: 650px; + background: white; + border: 1px solid #999; + margin: 0 auto; + padding: -10px; + } + div#inner { + padding: 0 1em 0 1em; + margin: 0px; + } + div#footer { + border-top: 1px solid #ccc; + margin: 1em; + } + td.name { + text-align: left; + padding-left: 30px; + } + td { + text-align: center; + border-bottom: 1px solid #eee; + } + tr.current td { + color: #999; + font-style: italic; + } + tr.current td.gallery { + color: #00d; + } + tr.upgradeable td { + font-weight: bold; + } + tr.upgradeable td.gallery { + color: #00d; + } + table { + width: 600px; + margin-bottom: 10px; + } + p { + font-size: .9em; + } + ul { + font-size: .9em; + list-style: none; + } + li { + display: inline; + } + li:before { + content: "\00BB \0020"; + } + div.button { + margin: 0 auto; + width: 120px; + text-align: center; + border: 1px solid #999; + background: #eee; + } + div.button a { + text-decoration: none; + } + div.button:hover { + background: #ccc; + } + div#confirmation { + position: fixed; + top: 400px; + left: 325px; + background: blue; + z-index: 1000; + margin: 10px; + text-align: center; + } + div#confirmation div { + margin: 2px; + padding: 20px; + border: 2px solid #999; + background: white; + } + .gray_on_done { + opacity: <?= $done ? "0.5" : "1" ?>; + } + </style> + <body> + <div id="outer"> + <img src="<?= url::file("modules/gallery/images/gallery.png") ?>" /> + <div id="inner"> + <? if ($done): ?> + <div id="confirmation"> + <div> + <h1> <?= t("That's it!") ?> </h1> + <p> + <?= t("Your <a href=\"%url\">Gallery</a> is up to date.", + array("url" => url::site("albums/1"))) ?> + </p> + </div> + </div> + <? endif ?> + <p class="gray_on_done"> + <?= t("Welcome to the Gallery upgrader. One click and you're done!") ?> + </p> + <table> + <tr class="gray_on_done"> + <th> <?= t("Module name") ?> </th> + <th> <?= t("Installed version") ?> </th> + <th> <?= t("Available version") ?> </th> + </tr> + + <? foreach ($available as $id => $module): ?> + <? if ($module->active): ?> + <tr class="<?= $module->version == $module->code_version ? "current" : "upgradeable" ?>" > + <td class="name <?= $id ?>"> + <?= $module->name ?> + </td> + <td> + <?= $module->version ?> + </td> + <td> + <?= $module->code_version ?> + </td> + </tr> + <? else: ?> + <? @$inactive++ ?> + <? endif ?> + <? endforeach ?> + </table> + + <div class="button gray_on_done"> + <a href="<?= url::site("upgrader/upgrade") ?>"> + <?= t("Upgrade all") ?> + </a> + </div> + + <? if (@$inactive): ?> + <p class="gray_on_done"> + <?= t("The following modules are inactive and don't require an upgrade.") ?> + </p> + <ul class="gray_on_done"> + <? foreach ($available as $module): ?> + <? if (!$module->active): ?> + <li> + <?= $module->name ?> + </li> + <? endif ?> + <? endforeach ?> + </p> + <? endif ?> + </div> + <div id="footer"> + <p> + <i> + <?= t("Did something go wrong? Try the <a href=\"%faq_url\">FAQ</a> or ask in the <a href=\"%forums_url\">Gallery forums</a>.</i>", + array("faq_url" => "http://codex.gallery2.org/Gallery3:FAQ", + "forums_url" => "http://gallery.menalto.com/forum")) ?> + </i> + </p> + </div> + </div> + </body> +</html> |