diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-10-18 20:22:10 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-10-18 20:22:10 -0600 |
commit | 5f56cbf997c12ab1aaf14403873fd9dfc33690ef (patch) | |
tree | 0120ffbad2e7ac728fd830ccbb9d71db28ca48b1 /modules/gallery | |
parent | 91ab6f161fa1e118418922fbf0a42f1924d7df0e (diff) |
Wrap all admin views in g-block and g-block content. This provides the means to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's.
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/controllers/admin_languages.php | 3 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics.html.php | 30 | ||||
-rw-r--r-- | modules/gallery/views/admin_languages.html.php | 187 | ||||
-rw-r--r-- | modules/gallery/views/admin_maintenance.html.php | 368 | ||||
-rw-r--r-- | modules/gallery/views/admin_modules.html.php | 52 | ||||
-rw-r--r-- | modules/gallery/views/admin_sidebar.html.php | 43 | ||||
-rw-r--r-- | modules/gallery/views/admin_theme_options.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/admin_themes.html.php | 139 |
8 files changed, 426 insertions, 400 deletions
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 8af1dd85..ccc631c7 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -112,7 +112,8 @@ class Admin_Languages_Controller extends Admin_Controller { $server_link = l10n_client::server_api_key_url(); $group->input("api_key") ->label(empty($api_key) - ? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.", + ? t("This is a unique key that will allow you to send translations to the remote + server. To get your API key go to %server-link.", array("server-link" => html::mark_clean(html::anchor($server_link)))) : t("API Key")) ->value($api_key) diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 95d0618c..0f4c0dd8 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -12,26 +12,28 @@ }); </script> -<div id="g-admin-graphics"> +<div id="g-admin-graphics" class="g-block ui-helper-clearfix"> <h1> <?= t("Graphics Settings") ?> </h1> <p> <?= t("Gallery needs a graphics toolkit in order to manipulate your photos. Please choose one from the list below.") ?> </p> - <h2> <?= t("Active Toolkit") ?> </h2> - <? if ($active == "none"): ?> - <?= new View("admin_graphics_none.html") ?> - <? else: ?> - <?= new View("admin_graphics_$active.html", array("tk" => $tk->$active, "is_active" => true)) ?> - <? endif ?> - - <div class="g-available"> - <h2> <?= t("Available Toolkits") ?> </h2> - <? foreach (array_keys((array)$tk) as $id): ?> - <? if ($id != $active): ?> - <?= new View("admin_graphics_$id.html", array("tk" => $tk->$id, "is_active" => false)) ?> + <div class="g-block-content"> + <h2> <?= t("Active Toolkit") ?> </h2> + <? if ($active == "none"): ?> + <?= new View("admin_graphics_none.html") ?> + <? else: ?> + <?= new View("admin_graphics_$active.html", array("tk" => $tk->$active, "is_active" => true)) ?> <? endif ?> - <? endforeach ?> + + <div class="g-available"> + <h2> <?= t("Available Toolkits") ?> </h2> + <? foreach (array_keys((array)$tk) as $id): ?> + <? if ($id != $active): ?> + <?= new View("admin_graphics_$id.html", array("tk" => $tk->$id, "is_active" => false)) ?> + <? endif ?> + <? endforeach ?> + </div> </div> </div> diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 74f48b76..311672de 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -1,103 +1,112 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-languages"> - <h1> <?= t("Languages") ?> </h1> - <p> - <?= t("Install new languages, update installed ones and set the default language for your Gallery.") ?> - </p> +<script type="text/javascript"> + var old_default_locale = <?= html::js_string($default_locale) ?>; - <form id="g-languages-form" method="post" action="<?= url::site("admin/languages/save") ?>"> - <?= access::csrf_form_field() ?> - <table> - <tr> - <th> <?= t("Installed") ?> </th> - <th> <?= t("Language") ?> </th> - <th> <?= t("Default language") ?> </th> - </tr> - <? $i = 0 ?> - <? foreach ($available_locales as $code => $display_name): ?> - <? if ($i == (count($available_locales)/2)): ?> - <table> - <tr> - <th> <?= t("Installed") ?> </th> - <th> <?= t("Language") ?> </th> - <th> <?= t("Default language") ?> </th> - </tr> - <? endif ?> + $("input[name='installed_locales[]']").change(function (event) { + if (this.checked) { + $("input[type='radio'][value='" + this.value + "']").enable(); + } else { + if ($("input[type='radio'][value='" + this.value + "']").selected()) { // if you deselect your default language, switch to some other installed language + $("input[type='radio'][value='" + old_default_locale + "']").attr("checked", "checked"); + } + $("input[type='radio'][value='" + this.value + "']").attr("disabled", "disabled"); + } + }); - <tr class="<?= (isset($installed_locales[$code])) ? "installed" : "" ?><?= ($default_locale == $code) ? " default" : "" ?>"> - <td> <?= form::checkbox("installed_locales[]", $code, isset($installed_locales[$code])) ?> </td> - <td> <?= $display_name ?> </td> - <td> - <?= form::radio("default_locale", $code, ($default_locale == $code), ((isset($installed_locales[$code]))?'':'disabled="disabled"') ) ?> - </td> - </tr> - <? $i++ ?> + $("g-languages-form").ajaxForm({ + dataType: "json", + success: function(data) { + if (data.result == "success") { + el = $('<a href="' + <?= html::js_string(url::site("admin/maintenance/start/gallery_task::update_l10n?csrf=$csrf")) ?> + '"></a>'); // this is a little hack to trigger the update_l10n task in a dialog + el.gallery_dialog(); + el.trigger('click'); + } + } + }); +</script> - <? endforeach ?> - </table> - <input type="submit" value="<?= t("Update languages")->for_html_attr() ?>" /> - </form> +<div class="g-block"> + <h1> <?= t("Languages and Translation") ?> </h1> - <script type="text/javascript"> - var old_default_locale = <?= html::js_string($default_locale) ?>; + <div class="g-block-content"> - $("input[name='installed_locales[]']").change(function (event) { - if (this.checked) { - $("input[type='radio'][value='" + this.value + "']").enable(); - } else { - if ($("input[type='radio'][value='" + this.value + "']").selected()) { // if you deselect your default language, switch to some other installed language - $("input[type='radio'][value='" + old_default_locale + "']").attr("checked", "checked"); - } - $("input[type='radio'][value='" + this.value + "']").attr("disabled", "disabled"); - } - }); - - $("g-languages-form").ajaxForm({ - dataType: "json", - success: function(data) { - if (data.result == "success") { - el = $('<a href="' + <?= html::js_string(url::site("admin/maintenance/start/gallery_task::update_l10n?csrf=$csrf")) ?> + '"></a>'); // this is a little hack to trigger the update_l10n task in a dialog - el.gallery_dialog(); - el.trigger('click'); - } - } - }); - </script> -</div> - -<div id="g-translations"> - <h1> <?= t("Translations") ?> </h1> - <p> - <?= t("Create your own translations and share them with the rest of the Gallery community.") ?> - </p> + <div id="g-languages" class="g-block"> + <h2> <?= t("Languages") ?> </h2> + <p> + <?= t("Install new languages, update installed ones and set the default language for your Gallery.") ?> + </p> - <h3><?= t("Translating Gallery") ?></h3> + <div class="g-block-content ui-helper-clearfix"> + <form id="g-languages-form" method="post" action="<?= url::site("admin/languages/save") ?>"> + <?= access::csrf_form_field() ?> + <table class="g-left"> + <tr> + <th> <?= t("Installed") ?> </th> + <th> <?= t("Language") ?> </th> + <th> <?= t("Default language") ?> </th> + </tr> + <? $i = 0 ?> + <? foreach ($available_locales as $code => $display_name): ?> + <? if ($i == (count($available_locales)/2)): ?> + <table> + <tr> + <th> <?= t("Installed") ?> </th> + <th> <?= t("Language") ?> </th> + <th> <?= t("Default language") ?> </th> + </tr> + <? endif ?> + <tr class="<?= (isset($installed_locales[$code])) ? "g-installed" : "" ?><?= ($default_locale == $code) ? " g-default" : "" ?>"> + <td> <?= form::checkbox("installed_locales[]", $code, isset($installed_locales[$code])) ?> </td> + <td> <?= $display_name ?> </td> + <td> + <?= form::radio("default_locale", $code, ($default_locale == $code), ((isset($installed_locales[$code]))?'':'disabled="disabled"') ) ?> + </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + <input type="submit" value="<?= t("Update languages")->for_html_attr() ?>" /> + </form> + </div> + </div> - <div class="g-block"> - <a href="http://codex.gallery2.org/Gallery3:Localization" target="_blank" - class="g-doc-link ui-state-default ui-corner-all ui-icon ui-icon-help" - title="<?= t("Localization documentation")->for_html_attr() ?>"> - <?= t("Localization documentation") ?> - </a> + <div id="g-translations" class="g-block"> + <h2> <?= t("Translations") ?> </h2> + <p> + <?= t("Create your own translations and share them with the rest of the Gallery community.") ?> + </p> - <p><?= t("<strong>Step 1:</strong> Make sure the target language is installed and up to date (check above).") ?></p> + <div class="g-block-content"> + <a href="http://codex.gallery2.org/Gallery3:Localization" target="_blank" + class="g-right ui-state-default ui-corner-all ui-icon ui-icon-help" + title="<?= t("Localization documentation")->for_html_attr() ?>"> + <?= t("Localization documentation") ?> + </a> - <p><?= t("<strong>Step 2:</strong> Make sure you have selected the right target language (currently %default_locale).", - array("default_locale" => locales::display_name())) ?></p> + <h3><?= t("Translating Gallery") ?></h3> - <p><?= t("<strong>Step 3:</strong> Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></p> + <p><?= t("Follow these steps to begin translating Gallery.") ?></p> - <a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>" - 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") ?> - <? else: ?> - <?= t("Start translation mode") ?> - <? endif ?> - </a> -</div> + <ul> + <li><?= t("Make sure the target language is installed and up to date (check above).") ?></li> + <li><?= t("Make sure you have selected the right target language (currently %default_locale).", + array("default_locale" => locales::display_name())) ?></li> + <li><?= t("Start the translation mode and the translation interface will appear at the bottom of each Gallery page.") ?></li> + </ul> + <a href="<?= url::site("l10n_client/toggle_l10n_mode?csrf=".access::csrf_token()) ?>" + 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") ?> + <? else: ?> + <?= t("Start translation mode") ?> + <? endif ?> + </a> -<h3><?= t("Sharing your translations") ?></h3> - <?= $share_translations_form ?> + <h3><?= t("Sharing your translations") ?></h3> + <?= $share_translations_form ?> + </div> + </div> + + </div> </div> diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 94582dc8..73a4bef8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,193 +1,195 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-admin-maintenance"> +<div id="g-admin-maintenance" class="g-block"> <h1> <?= t("Maintenance Tasks") ?> </h1> <p> <?= t("Occasionally your Gallery will require some maintenance. Here are some tasks you can use to keep it running smoothly.") ?> </p> - <div id="g-available-tasks"> - <h2> <?= t("Available Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Description") ?> - </th> - <th> - <?= t("Action") ?> - </th> - </tr> - <? $i = 0; ?> - <? foreach ($task_definitions as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= log::severity_class($task->severity) ?>"> - <td class="<?= log::severity_class($task->severity) ?>"> - <?= $task->name ?> - </td> - <td> - <?= $task->description ?> - </td> - <td> - <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - <?= t("run") ?> - </a> - </td> - </tr> - <? $i++ ?> - <? endforeach ?> - </table> - </div> - - <? if ($running_tasks->count()): ?> - <div id="g-running-tasks"> - <h2> <?= t("Running Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Last Updated") ?> - </th> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Status") ?> - </th> - <th> - <?= t("Info") ?> - </th> - <th> - <?= t("Owner") ?> - </th> - <th> - <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - <?= t("cancel all") ?></a> - <?= t("Action") ?> - </th> - </tr> - <? $i = 0; ?> - <? foreach ($running_tasks as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "stalled" ? "g-warning" : "" ?>"> - <td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>"> - <?= gallery::date_time($task->updated) ?> - </td> - <td> - <?= $task->name ?> - </td> - <td> - <? if ($task->done): ?> - <? if ($task->state == "cancelled"): ?> - <?= t("Cancelled") ?> - <? endif ?> - <?= t("Close") ?> - <? elseif ($task->state == "stalled"): ?> - <?= t("Stalled") ?> - <? else: ?> - <?= t("%percent_complete% Complete", array("percent_complete" => $task->percent_complete)) ?> - <? endif ?> - </td> - <td> - <?= $task->status ?> - </td> - <td> - <?= 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="g-dialog-link 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 ?> - </td> - </tr> - <? $i++ ?> - <? endforeach ?> - </table> - </div> - <? endif ?> + <div class="g-block-content"> + <div id="g-available-tasks"> + <h2> <?= t("Available Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Description") ?> + </th> + <th> + <?= t("Action") ?> + </th> + </tr> + <? $i = 0; ?> + <? foreach ($task_definitions as $task): ?> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= log::severity_class($task->severity) ?>"> + <td class="<?= log::severity_class($task->severity) ?>"> + <?= $task->name ?> + </td> + <td> + <?= $task->description ?> + </td> + <td> + <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> + <?= t("run") ?> + </a> + </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + </div> - <? if ($finished_tasks->count()): ?> - <div id="g-finished-tasks"> - <h2> <?= t("Finished Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Last Updated") ?> - </th> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Status") ?> - </th> - <th> - <?= t("Info") ?> - </th> - <th> - <?= t("Owner") ?> - </th> - <th> - <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" + <? if ($running_tasks->count()): ?> + <div id="g-running-tasks"> + <h2> <?= t("Running Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Last Updated") ?> + </th> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Status") ?> + </th> + <th> + <?= t("Info") ?> + </th> + <th> + <?= t("Owner") ?> + </th> + <th> + <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" 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; ?> - <? foreach ($finished_tasks as $task): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "success" ? "g-success" : "g-error" ?>"> - <td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>"> - <?= gallery::date_time($task->updated) ?> - </td> - <td> - <?= $task->name ?> - </td> - <td> - <? if ($task->state == "success"): ?> - <?= t("Success") ?> - <? elseif ($task->state == "error"): ?> - <?= t("Failed") ?> - <? elseif ($task->state == "cancelled"): ?> - <?= t("Cancelled") ?> - <? endif ?> - </td> - <td> - <?= $task->status ?> - </td> - <td> - <?= html::clean($task->owner()->name) ?> - </td> - <td> - <? if ($task->done): ?> - <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="g-dialog-link 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="g-dialog-link g-button" ui-state-default ui-corner-all> - <?= t("resume") ?> - </a> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> - <?= t("cancel") ?> - </a> - <? endif ?> - </ul> - </td> - </tr> - <? endforeach ?> - <? $i++ ?> - </table> + <?= t("cancel all") ?></a> + <?= t("Action") ?> + </th> + </tr> + <? $i = 0; ?> + <? foreach ($running_tasks as $task): ?> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "stalled" ? "g-warning" : "" ?>"> + <td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>"> + <?= gallery::date_time($task->updated) ?> + </td> + <td> + <?= $task->name ?> + </td> + <td> + <? if ($task->done): ?> + <? if ($task->state == "cancelled"): ?> + <?= t("Cancelled") ?> + <? endif ?> + <?= t("Close") ?> + <? elseif ($task->state == "stalled"): ?> + <?= t("Stalled") ?> + <? else: ?> + <?= t("%percent_complete% Complete", array("percent_complete" => $task->percent_complete)) ?> + <? endif ?> + </td> + <td> + <?= $task->status ?> + </td> + <td> + <?= 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="g-dialog-link 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 ?> + </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + </div> + <? endif ?> + + <? if ($finished_tasks->count()): ?> + <div id="g-finished-tasks"> + <h2> <?= t("Finished Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Last Updated") ?> + </th> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Status") ?> + </th> + <th> + <?= t("Info") ?> + </th> + <th> + <?= t("Owner") ?> + </th> + <th> + <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" + 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; ?> + <? foreach ($finished_tasks as $task): ?> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "success" ? "g-success" : "g-error" ?>"> + <td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>"> + <?= gallery::date_time($task->updated) ?> + </td> + <td> + <?= $task->name ?> + </td> + <td> + <? if ($task->state == "success"): ?> + <?= t("Success") ?> + <? elseif ($task->state == "error"): ?> + <?= t("Failed") ?> + <? elseif ($task->state == "cancelled"): ?> + <?= t("Cancelled") ?> + <? endif ?> + </td> + <td> + <?= $task->status ?> + </td> + <td> + <?= html::clean($task->owner()->name) ?> + </td> + <td> + <? if ($task->done): ?> + <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="g-dialog-link 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="g-dialog-link g-button" ui-state-default ui-corner-all> + <?= t("resume") ?> + </a> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + <?= t("cancel") ?> + </a> + <? endif ?> + </ul> + </td> + </tr> + <? endforeach ?> + <? $i++ ?> + </table> + </div> + <? endif ?> </div> - <? endif ?> </div> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 75f4f0c5..4c4976f8 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -1,32 +1,34 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-modules"> +<div class="g-block ui-helper-clearfix"> <h1> <?= t("Gallery Modules") ?> </h1> <p> <?= t("Power up your Gallery by adding more modules! Each module provides new cool features.") ?> </p> - <form method="post" action="<?= url::site("admin/modules/save") ?>"> - <?= access::csrf_form_field() ?> - <table> - <tr> - <th> <?= t("Installed") ?> </th> - <th> <?= t("Name") ?> </th> - <th> <?= t("Version") ?> </th> - <th> <?= t("Description") ?> </th> - </tr> - <? $i = 0 ?> - <? foreach ($available as $module_name => $module_info): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> - <? $data = array("name" => $module_name); ?> - <? if ($module_info->locked) $data["disabled"] = 1; ?> - <td> <?= form::checkbox($data, '1', module::is_active($module_name)) ?> </td> - <td> <?= t($module_info->name) ?> </td> - <td> <?= $module_info->version ?> </td> - <td> <?= t($module_info->description) ?> </td> - </tr> - <? $i++ ?> - <? endforeach ?> - </table> - <input type="submit" value="<?= t("Update")->for_html_attr() ?>"/> - </form> + <div class="g-block-content"> + <form method="post" action="<?= url::site("admin/modules/save") ?>"> + <?= access::csrf_form_field() ?> + <table> + <tr> + <th> <?= t("Installed") ?> </th> + <th> <?= t("Name") ?> </th> + <th> <?= t("Version") ?> </th> + <th> <?= t("Description") ?> </th> + </tr> + <? $i = 0 ?> + <? foreach ($available as $module_name => $module_info): ?> + <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> + <? $data = array("name" => $module_name); ?> + <? if ($module_info->locked) $data["disabled"] = 1; ?> + <td> <?= form::checkbox($data, '1', module::is_active($module_name)) ?> </td> + <td> <?= t($module_info->name) ?> </td> + <td> <?= $module_info->version ?> </td> + <td> <?= t($module_info->description) ?> </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + <input type="submit" value="<?= t("Update")->for_html_attr() ?>" /> + </form> + </div> </div> diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php index b4f339ae..ea950b54 100644 --- a/modules/gallery/views/admin_sidebar.html.php +++ b/modules/gallery/views/admin_sidebar.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <script type="text/javascript"> $(function() { - $(".g-admin-blocks-list ul").sortable({ + $(".g-blocks-list ul").sortable({ connectWith: ".g-sortable-blocks", opacity: .7, placeholder: "g-target", @@ -11,7 +11,7 @@ $("ul#g-active-blocks li").each(function(i) { active_blocks += "&block["+i+"]="+$(this).attr("ref"); }); - $.getJSON($("#g-site-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { + $.getJSON($("#g-admin-blocks").attr("ref").replace("__ACTIVE__", active_blocks), function(data) { if (data.result == "success") { $("ul#g-available-blocks").html(data.available); $("ul#g-active-blocks").html(data.active); @@ -22,25 +22,28 @@ }).disableSelection(); }); </script> -<h1> <?= t("Manage 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="g-site-blocks" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> - <div class="g-admin-blocks-list"> - <div><h3><?= t("Available Blocks") ?></h3></div> - <div> - <ul id="g-available-blocks" class="g-sortable-blocks"> - <?= $available ?> - </ul> +<div class="g-block"> + <h1> <?= t("Manage 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="g-admin-blocks" class="g-block-content ui-helper-clearfix" ref="<?= url::site("admin/sidebar/update?csrf={$csrf}__ACTIVE__") ?>"> + <div class="g-block g-left"> + <h3><?= t("Available Blocks") ?></h3> + <div class="g-blocks-list g-block-content"> + <ul id="g-available-blocks" class="g-sortable-blocks"> + <?= $available ?> + </ul> + </div> </div> - </div> - <div class="g-admin-blocks-list"> - <div><h3><?= t("Active Blocks") ?></h3></div> - <div> - <ul id="g-active-blocks" class="g-sortable-blocks"> - <?= $active ?> - </ul> + <div class="g-block g-left"> + <h3><?= t("Active Blocks") ?></h3> + <div class="g-blocks-list g-block-content"> + <ul id="g-active-blocks" class="g-sortable-blocks"> + <?= $active ?> + </ul> + </div> </div> </div> </div> diff --git a/modules/gallery/views/admin_theme_options.html.php b/modules/gallery/views/admin_theme_options.html.php index e09be728..a4bf1c4e 100644 --- a/modules/gallery/views/admin_theme_options.html.php +++ b/modules/gallery/views/admin_theme_options.html.php @@ -1,6 +1,8 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-admin-theme-options"> +<div class="g-block"> <h1> <?= t("Theme Options") ?> </h1> + <div class="g-block-content"> <?= $form ?> + </div> </div> diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index f7e77a01..dda18265 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -7,83 +7,88 @@ } </script> -<h1> <?= t("Theme Choice") ?> </h1> -<p> - <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?> -</p> +<div class="g-block ui-helper-clearfix"> + <h1> <?= t("Theme Choice") ?> </h1> + <p> + <?= t("Gallery allows you to choose a theme for browsing your Gallery, as well as a special theme for the administration interface. Click a theme to preview and activate it.") ?> + </p> -<div id="g-site-theme"> - <h2> <?= t("Gallery theme") ?> </h2> - <div class="g-block g-selected ui-helper-clearfix"> - <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>" - alt="<?= html::clean_attribute($themes[$site]->name) ?>" /> - <h3> <?= $themes[$site]->name ?> </h3> - <p> - <?= $themes[$site]->description ?> - </p> - </div> + <div class="g-block-content"> + <div id="g-site-theme"> + <h2> <?= t("Gallery theme") ?> </h2> + <div class="g-block g-selected ui-helper-clearfix"> + <img src="<?= url::file("themes/{$site}/thumbnail.png") ?>" + alt="<?= html::clean_attribute($themes[$site]->name) ?>" /> + <h3> <?= $themes[$site]->name ?> </h3> + <p> + <?= $themes[$site]->description ?> + </p> + </div> - <h2> <?= t("Available Gallery themes") ?> </h2> - <div class="g-available"> - <? $count = 0 ?> - <? foreach ($themes as $id => $info): ?> - <? if (!$info->site) continue ?> - <? if ($id == $site) continue ?> - <div class="g-block ui-helper-clearfix"> - <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> - <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" - alt="<?= html::clean_attribute($info->name) ?>" /> - <h3> <?= $info->name ?> </h3> + <h2> <?= t("Available Gallery themes") ?> </h2> + <div class="g-available"> + <? $count = 0 ?> + <? foreach ($themes as $id => $info): ?> + <? if (!$info->site) continue ?> + <? if ($id == $site) continue ?> + <div class="g-block ui-helper-clearfix"> + <a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" + alt="<?= html::clean_attribute($info->name) ?>" /> + <h3> <?= $info->name ?> </h3> + <p> + <?= $info->description ?> + </p> + </a> + </div> + <? $count++ ?> + <? endforeach ?> + + <? if (!$count): ?> <p> - <?= $info->description ?> + <?= t("There are no other site themes available.") ?> </p> - </a> + <? endif ?> + </div> </div> - <? $count++ ?> - <? endforeach ?> - <? if (!$count): ?> - <p> - <?= t("There are no other site themes available.") ?> - </p> - <? endif ?> - </div> -</div> + <div id="g-admin-theme"> + <h2> <?= t("Admin theme") ?> </h2> + <div class="g-block g-selected ui-helper-clearfix"> + <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>" + alt="<?= html::clean_attribute($themes[$admin]->name) ?>" /> + <h3> <?= $themes[$admin]->name ?> </h3> + <p> + <?= $themes[$admin]->description ?> + </p> + </div> -<div id="g-admin-theme"> - <h2> <?= t("Admin theme") ?> </h2> - <div class="g-block g-selected ui-helper-clearfix"> - <img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>" - alt="<?= html::clean_attribute($themes[$admin]->name) ?>" /> - <h3> <?= $themes[$admin]->name ?> </h3> - <p> - <?= $themes[$admin]->description ?> - </p> - </div> + <h2> <?= t("Available admin themes") ?> </h2> + <div class="g-available"> + <? $count = 0 ?> + <? foreach ($themes as $id => $info): ?> + <? if (!$info->admin) continue ?> + <? if ($id == $admin) continue ?> + <div class="g-block ui-helper-clearfix"> + <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> + <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" + alt="<?= html::clean_attribute($info->name) ?>" /> + <h3> <?= $info->name ?> </h3> + <p> + <?= $info->description ?> + </p> + </a> + </div> + <? $count++ ?> + <? endforeach ?> - <h2> <?= t("Available admin themes") ?> </h2> - <div class="g-available"> - <? $count = 0 ?> - <? foreach ($themes as $id => $info): ?> - <? if (!$info->admin) continue ?> - <? if ($id == $admin) continue ?> - <div class="g-block ui-helper-clearfix"> - <a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>"> - <img src="<?= url::file("themes/{$id}/thumbnail.png") ?>" - alt="<?= html::clean_attribute($info->name) ?>" /> - <h3> <?= $info->name ?> </h3> + <? if (!$count): ?> <p> - <?= $info->description ?> + <?= t("There are no other admin themes available.") ?> </p> - </a> + <? endif ?> + </div> </div> - <? $count++ ?> - <? endforeach ?> - - <? if (!$count): ?> - <p> - <?= t("There are no other admin themes available.") ?> - </p> - <? endif ?> + </div> </div>
\ No newline at end of file |