* Fix menu.
This commit is contained in:
@@ -380,10 +380,10 @@ $lang->company->menuOrder[30] = 'addUser';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany', 'exclude' => 'admin-safe');
|
||||
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
|
||||
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'subModule' => 'holiday');
|
||||
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'subModule' => 'custom');
|
||||
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-timezone');
|
||||
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
|
||||
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
|
||||
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
|
||||
@@ -426,7 +426,7 @@ $lang->admin->menu->system['subMenu'] = new stdclass();
|
||||
$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action');
|
||||
$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->safety|admin|safe", 'alias' => 'checkweak');
|
||||
$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron');
|
||||
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone", 'subModule' => 'custom');
|
||||
$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone");
|
||||
$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|");
|
||||
|
||||
$lang->admin->dividerMenu = ',company,message,system,';
|
||||
|
||||
@@ -662,14 +662,15 @@ class commonModel extends model
|
||||
$alias = isset($menuItem->alias) ? $menuItem->alias : '';
|
||||
$subModule = isset($menuItem->subModule) ? explode(',', $menuItem->subModule) : array();
|
||||
$class = isset($menuItem->class) ? $menuItem->class : '';
|
||||
$exclude = isset($menuItem->exclude) ? $menuItem->exclude : '';
|
||||
|
||||
$active = '';
|
||||
if($menuItem->name == $currentModule)
|
||||
if($menuItem->name == $currentModule and strpos(",$exclude,", ",$currentMethod,") === false)
|
||||
{
|
||||
$activeMenu = $menuItem->name;
|
||||
$active = 'active';
|
||||
}
|
||||
if($subModule and in_array($currentModule, $subModule))
|
||||
if($subModule and in_array($currentModule, $subModule) and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false)
|
||||
{
|
||||
$activeMenu = $menuItem->name;
|
||||
$active = 'active';
|
||||
@@ -687,7 +688,7 @@ class commonModel extends model
|
||||
if(isset($menuItem->link['module'])) $module = $menuItem->link['module'];
|
||||
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
|
||||
}
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false))
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false) and strpos(",$exclude,", ",$currentMethod,") === false)
|
||||
{
|
||||
$activeMenu = $menuItem->name;
|
||||
$active = 'active';
|
||||
|
||||
@@ -228,6 +228,7 @@ class customModel extends model
|
||||
$subModule = '';
|
||||
$subMenu = '';
|
||||
$alias = '';
|
||||
$exclude = '';
|
||||
|
||||
$link = (is_array($item) and isset($item['link'])) ? $item['link'] : $item;
|
||||
/* The variable of item has not link and is not link then ignore it. */
|
||||
@@ -258,6 +259,7 @@ class customModel extends model
|
||||
if(isset($item['subModule'])) $subModule = $item['subModule'];
|
||||
if(isset($item['subMenu'])) $subMenu = $item['subMenu'];
|
||||
if(isset($item['alias'])) $alias = $item['alias'];
|
||||
if(isset($item['exclude'])) $exclude = $item['exclude'];
|
||||
}
|
||||
|
||||
$hidden = isset($customMenuMap[$name]) && isset($customMenuMap[$name]->hidden) && $customMenuMap[$name]->hidden;
|
||||
@@ -292,6 +294,7 @@ class customModel extends model
|
||||
if($subModule)$menuItem->subModule = $subModule;
|
||||
if($subMenu) $menuItem->subMenu = $subMenu;
|
||||
if($alias) $menuItem->alias = $alias;
|
||||
if($exclude) $menuItem->exclude = $exclude;
|
||||
if($isTutorialMode) $menuItem->tutorial = true;
|
||||
|
||||
/* Hidden menu by config in mobile. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<!--div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('dev');?></div-->
|
||||
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('dev');?></div>
|
||||
</div>
|
||||
<script>$('#mainMenu #<?php echo $tab;?>').addClass('btn-active-text')</script>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('dev');?></div>
|
||||
<div class='btn-toolbar pull-left'><?php // common::printAdminSubMenu('dev');?></div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php echo html::a($this->createLink('entry', 'create'), "<i class='icon icon-plus'></i> {$lang->entry->create}", '', "class='btn btn-primary'"); ?>
|
||||
</div>
|
||||
|
||||
@@ -67,12 +67,7 @@ class stakeholder extends control
|
||||
|
||||
if($programID)
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'stakeholder';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
$this->loadModel('program')->setMenu($programID);
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user