mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 09:52:17 +09:00
issue 70 menu auto setting completed
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8615 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f3df85dcca
commit
bfa45bfde4
12 changed files with 400 additions and 81 deletions
|
|
@ -46,9 +46,12 @@
|
|||
|
||||
}
|
||||
|
||||
function makeGnbUrl()
|
||||
function makeGnbUrl($module = 'admin')
|
||||
{
|
||||
global $lang;
|
||||
$oAdminAdminModel = &getAdminModel('admin');
|
||||
$lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
|
||||
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$menu_info = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__');
|
||||
|
||||
|
|
@ -59,7 +62,44 @@
|
|||
return;
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
|
||||
if(is_object($moduleActionInfo->menu))
|
||||
{
|
||||
$subMenuTitle = '';
|
||||
foreach($moduleActionInfo->menu AS $key=>$value)
|
||||
{
|
||||
if($value->acts && in_array(Context::get('act'), $value->acts))
|
||||
{
|
||||
$subMenuTitle = $value->title;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$parentSrl = 0;
|
||||
if(is_array($menu->list))
|
||||
{
|
||||
foreach($menu->list AS $key=>$value)
|
||||
{
|
||||
$parentMenu = $value;
|
||||
if(is_array($parentMenu['list']) && count($parentMenu['list']) > 0)
|
||||
{
|
||||
foreach($parentMenu['list'] AS $key2=>$value2)
|
||||
{
|
||||
$childMenu = $value2;
|
||||
if($subMenuTitle == $childMenu['text'])
|
||||
{
|
||||
$parentSrl = $childMenu['parent_srl'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('gnbUrlList', $menu->list);
|
||||
Context::set('parentSrl', $parentSrl);
|
||||
}
|
||||
|
||||
function loadSideBar()
|
||||
|
|
@ -372,6 +412,19 @@
|
|||
$this->setTemplateFile('config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display Admin Menu Configuration(settings) page
|
||||
* @return none
|
||||
**/
|
||||
function dispAdminMenuSetup()
|
||||
{
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__');
|
||||
|
||||
Context::set('menu_srl', $output->menu_srl);
|
||||
$this->setTemplateFile('menu_setup');
|
||||
}
|
||||
|
||||
function showSendEnv() {
|
||||
if(Context::getResponseMethod() != 'HTML') return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue