2010-08-03 17:26:22 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2010-08-11 12:32:43 +00:00
|
|
|
<? if (module::get_version("gallery") > 31): ?>
|
2010-08-03 17:26:22 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$(".g-admin-blocks-list ul").sortable({
|
|
|
|
connectWith: ".g-sortable-blocks",
|
|
|
|
opacity: .7,
|
|
|
|
placeholder: "g-target",
|
|
|
|
update: function(event,ui) {
|
|
|
|
}
|
|
|
|
}).disableSelection();
|
|
|
|
});
|
|
|
|
|
|
|
|
function buildmodulelist () {
|
|
|
|
var active_modules = "";
|
|
|
|
$("ul#g-active-blocks li").each(function(i) {
|
|
|
|
active_modules += "&modules["+i+"]="+$(this).attr("ref");
|
|
|
|
});
|
|
|
|
document.moduleorder.modulelist.value = active_modules;
|
|
|
|
document.moduleorder.submit();
|
|
|
|
}
|
|
|
|
</script>
|
2010-08-11 12:32:43 +00:00
|
|
|
<? endif ?>
|
2010-08-03 17:26:22 +00:00
|
|
|
|
|
|
|
<div id="g-block-admin" class="g-block ui-helper-clearfix">
|
2010-08-11 09:56:38 +00:00
|
|
|
<h1> <?= t("Manage module order") ?> </h1>
|
2010-08-11 12:32:43 +00:00
|
|
|
<? if (module::get_version("gallery") < 32): ?>
|
|
|
|
<h2> <?= t("Warning") ?> </h2>
|
|
|
|
<p>
|
|
|
|
<?= t("You must have Gallery core version of 32 or higher installed to use this module. Please update your installation.") ?>
|
|
|
|
</p>
|
|
|
|
<? else: ?>
|
2010-08-03 17:26:22 +00:00
|
|
|
<p>
|
|
|
|
<?= t("Select and drag blocks to change the order. Click 'Save' to save your changes.") ?>
|
|
|
|
</p>
|
2010-08-11 09:56:38 +00:00
|
|
|
<h2> <?= t("Notes") ?> </h2>
|
2010-08-03 17:26:22 +00:00
|
|
|
<p>
|
2010-08-04 15:16:52 +00:00
|
|
|
<?= t("The core module ('gallery') and the identity provider module (default is 'user') cannot be sorted and are therefore hidden from this list.") ?>
|
2010-08-03 17:26:22 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="g-block-content">
|
|
|
|
<div id="g-site-blocks">
|
2010-08-11 09:56:38 +00:00
|
|
|
<div class="g-admin-blocks-list g-left" style="float: none !important;">
|
2010-08-03 17:26:22 +00:00
|
|
|
<h3><?= t("Installed Modules") ?></h3>
|
|
|
|
<div>
|
|
|
|
<ul id="g-active-blocks" class="g-sortable-blocks">
|
|
|
|
<?= $available ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2010-08-11 09:56:38 +00:00
|
|
|
<form name="moduleorder" action="<?= url::site("admin/moduleorder/update?csrf={$csrf}") ?>" method="post">
|
|
|
|
<input type="hidden" name="modulelist" value="">
|
|
|
|
</form>
|
2010-08-03 17:26:22 +00:00
|
|
|
</div>
|
2010-08-11 12:32:43 +00:00
|
|
|
<a class="ui-state-default ui-corner-all" style="padding: 5px;" href="javascript: buildmodulelist()">Save</a>
|
|
|
|
<? endif ?>
|
2010-08-03 17:26:22 +00:00
|
|
|
</div>
|