20615273c3
- 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
51 lines
1.6 KiB
PHP
51 lines
1.6 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<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>
|
|
|
|
<div id="g-block-admin" class="g-block ui-helper-clearfix">
|
|
<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("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" style="float: none !important;">
|
|
<h3><?= t("Installed Modules") ?></h3>
|
|
<div>
|
|
<ul id="g-active-blocks" class="g-sortable-blocks">
|
|
<?= $available ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<form name="moduleorder" action="<?= url::site("admin/moduleorder/update?csrf={$csrf}") ?>" method="post">
|
|
<input type="hidden" name="modulelist" value="">
|
|
</form>
|
|
</div>
|
|
<a class="ui-state-default ui-corner-all" style="padding: 5px;" href="javascript: buildmodulelist()">Save</a>
|
|
</div>
|