mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
add trash module config
This commit is contained in:
parent
ad19805049
commit
af75450611
5 changed files with 53 additions and 0 deletions
|
|
@ -7,10 +7,12 @@
|
||||||
</permissions>
|
</permissions>
|
||||||
<actions>
|
<actions>
|
||||||
<action name="dispTrashAdminList" type="view" admin_index="true" menu_name="trash" menu_index="true" />
|
<action name="dispTrashAdminList" type="view" admin_index="true" menu_name="trash" menu_index="true" />
|
||||||
|
<action name="dispTrashAdminConfig" type="view" />
|
||||||
|
|
||||||
<action name="procTrashAdminEmptyTrash" type="controller" ruleset="emptyTrash" />
|
<action name="procTrashAdminEmptyTrash" type="controller" ruleset="emptyTrash" />
|
||||||
<action name="procTrashAdminRestore" type="controller" />
|
<action name="procTrashAdminRestore" type="controller" />
|
||||||
<action name="procTrashAdminGetList" type="controller" />
|
<action name="procTrashAdminGetList" type="controller" />
|
||||||
|
<action name="procTrashAdminConfig" type="controller" />
|
||||||
|
|
||||||
<action name="dispTrashAdminView" type="view" />
|
<action name="dispTrashAdminView" type="view" />
|
||||||
</actions>
|
</actions>
|
||||||
|
|
|
||||||
1
modules/trash/tpl/config.html
Normal file
1
modules/trash/tpl/config.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<include target="./header.html" />
|
||||||
|
|
@ -226,6 +226,23 @@ class trashAdminController extends trash
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set trash module config
|
||||||
|
* @return void|Object
|
||||||
|
*/
|
||||||
|
function procTrashAdminConfig()
|
||||||
|
{
|
||||||
|
$oTrashModel = getModel('trash');
|
||||||
|
$config = $oTrashModel->getConfig();
|
||||||
|
|
||||||
|
$obj = Context::getRequestVars();
|
||||||
|
|
||||||
|
$this->setMessage('success_updated');
|
||||||
|
|
||||||
|
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispTrashAdminConfig');
|
||||||
|
$this->setRedirectUrl($returnUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* End of file trash.admin.controller.php */
|
/* End of file trash.admin.controller.php */
|
||||||
/* Location: ./modules/trash/trash.admin.controller.php */
|
/* Location: ./modules/trash/trash.admin.controller.php */
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,15 @@ class trashAdminView extends trash
|
||||||
$this->setTemplateFile('trash_view');
|
$this->setTemplateFile('trash_view');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dispTrashAdminConfig()
|
||||||
|
{
|
||||||
|
$oTrashModel = getModel('trash');
|
||||||
|
$config = $oTrashModel->getConfig();
|
||||||
|
|
||||||
|
Context::set('config', $config);
|
||||||
|
|
||||||
|
$this->setTemplateFile('config');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* End of file trash.admin.view.php */
|
/* End of file trash.admin.view.php */
|
||||||
/* Location: ./modules/trash/trash.admin.view.php */
|
/* Location: ./modules/trash/trash.admin.view.php */
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,30 @@
|
||||||
*/
|
*/
|
||||||
class trashModel extends trash
|
class trashModel extends trash
|
||||||
{
|
{
|
||||||
|
private static $config = NULL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get Tresh Module Config
|
||||||
|
*
|
||||||
|
* @return trash config
|
||||||
|
*/
|
||||||
|
function getConfig()
|
||||||
|
{
|
||||||
|
if(self::$config === NULL)
|
||||||
|
{
|
||||||
|
$oModuleModel = getModel('module');
|
||||||
|
$config = $oModuleModel->getModuleConfig('trash');
|
||||||
|
if(!$config)
|
||||||
|
{
|
||||||
|
$config = new stdClass();
|
||||||
|
}
|
||||||
|
|
||||||
|
self::$config = $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$config;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get one trash object
|
* Get one trash object
|
||||||
* @param int $trashSrl
|
* @param int $trashSrl
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue