1
0

- Moved save button to bottom

- Modules are now being displayed with their friendly name
- List sometimes went out of the bottom of box
- Changed some wording and removed warning since we are not using IDs anymore
This commit is contained in:
hukoeth 2010-08-11 17:56:38 +08:00 committed by Tim Almdal
parent 9b55c39abb
commit 20615273c3
4 changed files with 11 additions and 16 deletions

View File

@ -24,7 +24,7 @@ class Admin_Moduleorder_Controller extends Admin_Controller {
private function _get_view() {
$view = new Admin_View("admin.html");
$view->page_title = t("Manage Module Order");
$view->page_title = t("Manage module order");
$view->content = new View("admin_moduleorder.html");
$view->content->csrf = access::csrf_token();
$view->content->available = new View("admin_moduleorder_blocks.html");

View File

@ -22,7 +22,7 @@ class moduleorder_event_Core {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("moduleorder_menu")
->label(t("Manage Module Order"))
->label(t("Module order"))
->url(url::site("admin/moduleorder")));
}
}

View File

@ -1,8 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
$(document).ready(function(){
$(".g-admin-blocks-list").height($(".g-admin-blocks-list").height());
});
$(function() {
$(".g-admin-blocks-list ul").sortable({
@ -25,21 +22,18 @@
</script>
<div id="g-block-admin" class="g-block ui-helper-clearfix">
<h1> <?= t("Manage Module Order") ?> </h1>
<h1> <?= t("Manage module order") ?> </h1>
<p>
<?= t("Select and drag blocks to change the order. Click 'Save' to save your changes.") ?>
</p>
<h2> <?= t("Important notes") ?> </h2>
<p>
<?= t("You will only need to change this order in rare circumstances (e.g. if two modules display content at the bottom of the image and you want to change the order in which this content is being shown). If everything on your Gallery Site is looking normal then please do not touch this.") ?>
</p>
<h2> <?= t("Notes") ?> </h2>
<p>
<?= t("The core module ('gallery') and the identity provider module (default is 'user') cannot be sorted and are therefore hidden from this list.") ?>
</p>
<div class="g-block-content">
<div id="g-site-blocks">
<div class="g-admin-blocks-list g-left">
<div class="g-admin-blocks-list g-left" style="float: none !important;">
<h3><?= t("Installed Modules") ?></h3>
<div>
<ul id="g-active-blocks" class="g-sortable-blocks">
@ -48,9 +42,9 @@
</div>
</div>
</div>
<form name="moduleorder" action="<?= url::site("admin/moduleorder/update?csrf={$csrf}") ?>" method="post">
<input type="hidden" name="modulelist" value="">
</form>
</div>
<form name="moduleorder" action="<?= url::site("admin/moduleorder/update?csrf={$csrf}") ?>" method="post">
<input type="hidden" name="modulelist" value="">
</form>
<a class="ui-state-default ui-corner-all" style="padding: 5px;" href="javascript: buildmodulelist()">Save</a>
</div>

View File

@ -1,9 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? $indent_provider = module::get_var("gallery", "identity_provider") ?>
<? foreach ($modules as $ref => $text): ?>
<? if ($text == "gallery" || $text == $indent_provider): ?>
<? $moduleinfo = module::info($text) ?>
<? if ($text == "gallery" || $text == $indent_provider || $moduleinfo->name == ""): ?>
<li style="background-color:#A8A8A8; margin:0.5em; padding:0.3em 0.8em; display: none" ref="<?= $ref ?>"><?= $text ?></li>
<? else: ?>
<li class="g-draggable" ref="<?= $ref ?>"><?= $text ?></li>
<li class="g-draggable" ref="<?= $ref ?>"><?= $moduleinfo->name ?></li>
<? endif ?>
<? endforeach ?>