mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
issue 2619 model to view
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11879 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
945c3f34fd
commit
32bf25b332
3 changed files with 39 additions and 68 deletions
|
|
@ -11,13 +11,13 @@
|
||||||
<action name="dispMenuAdminMidList" type="view" standalone="true" />
|
<action name="dispMenuAdminMidList" type="view" standalone="true" />
|
||||||
<action name="dispMenuAdminSiteMap" type="view" standalone="true" admin_index="true" menu_name="siteMap" menu_index="true" />
|
<action name="dispMenuAdminSiteMap" type="view" standalone="true" admin_index="true" menu_name="siteMap" menu_index="true" />
|
||||||
<action name="dispMenuAdminSiteDesign" type="view" standalone="true" menu_name="siteDesign" menu_index="true" />
|
<action name="dispMenuAdminSiteDesign" type="view" standalone="true" menu_name="siteDesign" menu_index="true" />
|
||||||
|
<action name="dispMenuAdminSkinSetup" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="getMenuAdminTplInfo" type="model" standalone="true" />
|
<action name="getMenuAdminTplInfo" type="model" standalone="true" />
|
||||||
<action name="getMenuAdminItemInfo" type="model" standalone="true" />
|
<action name="getMenuAdminItemInfo" type="model" standalone="true" />
|
||||||
<action name="getMenuAdminSiteMap" type="model" standalone="true" />
|
<action name="getMenuAdminSiteMap" type="model" standalone="true" />
|
||||||
<action name="getMenuAdminInstalledMenuType" type="model" standalone="true" />
|
<action name="getMenuAdminInstalledMenuType" type="model" standalone="true" />
|
||||||
<action name="getMenuAdminDetailSetup" type="model" standalone="true" />
|
<action name="getMenuAdminDetailSetup" type="model" standalone="true" />
|
||||||
<action name="getMenuAdminModuleSkin" type="model" standalone="true" />
|
|
||||||
|
|
||||||
<action name="procMenuAdminInsert" type="controller" standalone="true" ruleset="insertMenu" />
|
<action name="procMenuAdminInsert" type="controller" standalone="true" ruleset="insertMenu" />
|
||||||
<action name="procMenuAdminUpdate" type="controller" standalone="true" ruleset="updateMenuTitle" />
|
<action name="procMenuAdminUpdate" type="controller" standalone="true" ruleset="updateMenuTitle" />
|
||||||
|
|
|
||||||
|
|
@ -336,73 +336,6 @@
|
||||||
return $moduleInfoList;
|
return $moduleInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return module skin setting page (html type)
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function getMenuAdminModuleSkin()
|
|
||||||
{
|
|
||||||
$menuItemSrl = Context::get('menu_item_srl');
|
|
||||||
$skin = Context::get('skin');
|
|
||||||
|
|
||||||
if(!$menuItemSrl || !$skin)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_invalid_request');
|
|
||||||
}
|
|
||||||
|
|
||||||
$menuItemInfo = $this->getMenuItemInfo($menuItemSrl);
|
|
||||||
if(!$menuItemInfo->menu_item_srl)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_invalid_request');
|
|
||||||
}
|
|
||||||
|
|
||||||
// If menu type is not module
|
|
||||||
if(empty($menuItemInfo->url) || preg_match('/^http/i', $menuItemInfo->url))
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_invalid_request');
|
|
||||||
}
|
|
||||||
|
|
||||||
$oModuleModel = &getModel('module');
|
|
||||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItemInfo->url);
|
|
||||||
|
|
||||||
$modulePath = './modules/'.$moduleInfo->module;
|
|
||||||
$skinInfo = $oModuleModel->loadSkinInfo($modulePath, $skin);
|
|
||||||
$skinVars = $oModuleModel->getModuleSkinVars($moduleInfo->module_srl);
|
|
||||||
|
|
||||||
if(count($skinInfo->extra_vars))
|
|
||||||
{
|
|
||||||
foreach($skinInfo->extra_vars as $key => $val)
|
|
||||||
{
|
|
||||||
$group = $val->group;
|
|
||||||
$name = $val->name;
|
|
||||||
$type = $val->type;
|
|
||||||
if($skinVars[$name])
|
|
||||||
{
|
|
||||||
$value = $skinVars[$name]->value;
|
|
||||||
}
|
|
||||||
else $value = '';
|
|
||||||
if($type=="checkbox")
|
|
||||||
{
|
|
||||||
$value = $value?unserialize($value):array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$value = empty($value) ? $val->default : $value;
|
|
||||||
$skinInfo->extra_vars[$key]->value= $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Context::set('module_info', $moduleInfo);
|
|
||||||
Context::set('mid', $moduleInfo->mid);
|
|
||||||
Context::set('skin_info', $skinInfo);
|
|
||||||
Context::set('skin_vars', $skinVars);
|
|
||||||
Context::set('mode', 'P');
|
|
||||||
|
|
||||||
$oTemplate = &TemplateHandler::getInstance();
|
|
||||||
$skinContent = $oTemplate->compile($oModuleModel->module_path.'/tpl', 'skin_config');
|
|
||||||
|
|
||||||
$this->add('skinContent', $skinContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMenuAdminSiteMap()
|
public function getMenuAdminSiteMap()
|
||||||
{
|
{
|
||||||
$menuSrl = Context::get('menu_srl');
|
$menuSrl = Context::get('menu_srl');
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,44 @@
|
||||||
$this->setTemplateFile('sitemap');
|
$this->setTemplateFile('sitemap');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module skin setup common page
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function dispMenuAdminSkinSetup()
|
||||||
|
{
|
||||||
|
$menuItemSrl = Context::get('menu_item_srl');
|
||||||
|
if(!$menuItemSrl)
|
||||||
|
{
|
||||||
|
return new Object(-1, 'msg_invalid_request');
|
||||||
|
}
|
||||||
|
|
||||||
|
$oMenuAdminModel = &getAdminModel('menu');
|
||||||
|
$menuItemInfo = $oMenuAdminModel->getMenuItemInfo($menuItemSrl);
|
||||||
|
if(!$menuItemInfo->menu_item_srl)
|
||||||
|
{
|
||||||
|
return new Object(-1, 'msg_invalid_request');
|
||||||
|
}
|
||||||
|
|
||||||
|
// If menu type is not module
|
||||||
|
if(empty($menuItemInfo->url) || preg_match('/^http/i', $menuItemInfo->url))
|
||||||
|
{
|
||||||
|
return new Object(-1, 'msg_invalid_request');
|
||||||
|
}
|
||||||
|
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItemInfo->url);
|
||||||
|
|
||||||
|
// get the grant infotmation from admin module
|
||||||
|
$oModuleAdminModel = &getAdminModel('module');
|
||||||
|
$skin_content = $oModuleAdminModel->getModuleSkinHTML($moduleInfo->module_srl);
|
||||||
|
Context::set('skin_content', $skin_content);
|
||||||
|
|
||||||
|
$this->setLayoutPath('common/tpl');
|
||||||
|
$this->setLayoutFile('default_layout');
|
||||||
|
$this->setTemplateFile('skin_info');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting menu information(recursive)
|
* Setting menu information(recursive)
|
||||||
* @param array $menu
|
* @param array $menu
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue