* Add menuorder for custom setting.

This commit is contained in:
tanghucheng
2022-06-21 10:10:25 +08:00
parent 0f0fd55ba3
commit 98d4d45079
3 changed files with 60 additions and 20 deletions
+14 -10
View File
@@ -2,18 +2,22 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
foreach($lang->custom->object as $object => $name)
{
if(strpos('story|todo|block', $object) !== false) echo "<span class='divider'></span>";
if(strpos('execution|product|kanban', $object) !== false) common::printLink('custom', $object, "", "<span class='text'>{$lang->custom->$object}</span>", '', "class='btn btn-link' id='{$object}Tab'");
if(strpos('execution|product|kanban', $object) === false) common::printLink('custom', 'set', "module=$object&field=" . key($lang->custom->{$object}->fields), "<span class='text'>{$name}</span>", '', "class='btn btn-link' id='{$object}Tab'");
if($object == 'user') common::printLink('custom', 'required', "", "<span class='text'>{$lang->custom->required}</span>", '', "class='btn btn-link' id='requiredTab'");
}
$menuOrder = $lang->custom->menuOrder;
ksort($menuOrder);
foreach($lang->custom->system as $sysObject)
foreach($menuOrder as $order => $object)
{
if($sysObject == 'required') continue;
common::printLink('custom', $sysObject, "", "<span class='text'>{$lang->custom->$sysObject}</span>", '', "class='btn btn-link' id='{$sysObject}Tab'");
$name = $lang->custom->object[$object];
if(strpos($lang->custom->dividerMenu, $object) !== false) echo "<span class='divider'></span>";
if(strpos($lang->custom->separatePage, $object))
{
common::printLink('custom', $object, "", "<span class='text'>{$lang->custom->$object}</span>", '', "class='btn btn-link' id='{$object}Tab'");
}
else
{
common::printLink('custom', 'set', "module=$object&field=" . key($lang->custom->{$object}->fields), "<span class='text'>{$name}</span>", '', "class='btn btn-link' id='{$object}Tab'");
}
if($object == 'user') common::printLink('custom', 'required', "", "<span class='text'>{$lang->custom->required}</span>", '', "class='btn btn-link' id='requiredTab'");
}
if($config->systemMode == 'classic') common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");