git-svn-id: http://xe-core.googlecode.com/svn/trunk@796 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-30 04:23:19 +00:00
parent c0ee42e6d7
commit 9b4f0c3073
6 changed files with 33 additions and 38 deletions

View file

@ -15,9 +15,9 @@
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
$oModuleController = &getController('module');
$oModuleController->insertActionFoward('addon', 'dispAddonIndex');
$oModuleController->insertActionFoward('addon', 'dispAddonInfo');
$oModuleController->insertActionFoward('addon', 'procToggleActivateAddon');
$oModuleController->insertActionFoward('addon', 'view', 'dispAddonIndex');
$oModuleController->insertActionFoward('addon', 'view', 'dispAddonInfo');
$oModuleController->insertActionFoward('addon', 'controller', 'procToggleActivateAddon');
// 몇가진 애드온을 기본으로 설치 상태로 지정
$oAddonController = &getController('addon');

View file

@ -16,7 +16,7 @@
/**
* @brief 애드온의 활성/비활성 체인지
**/
function procToggleActivateAddon() {
function procAddonAdminToggleActivate() {
$oAddonModel = &getModel('addon');
// addon값을 받아옴

View file

@ -11,44 +11,41 @@
* @brief 초기화
**/
function init() {
$this->setTemplatePath($this->module_path.'tpl.admin');
}
/**
* @brief 애드온 관리 메인 페이지
* @brief 애드온 관리 메인 페이지 (목록 보여줌)
**/
function dispIndex() {
$this->dispAddonList();
}
/**
* @brief 애드온의 상세 정보(conf/info.xml) 팝업 출력
**/
function dispAddonInfo() {
// 모듈 목록을 구해서
$oAddonModel = &getModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml(Context::get('selected_addon'));
Context::set('addon_info', $addon_info);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 파일 지정
$this->setTemplateFile('addon_info');
}
/**
* @brief 애드온 목록을 보여줌
**/
function dispAddonList() {
function dispAddonAdminIndex() {
// 애드온 목록을 세팅
$oAddonModel = &getModel('addon');
$addon_list = $oAddonModel->getAddonList();
Context::set('addon_list', $addon_list);
// 템플릿 패스 및 파일을 지정
$this->setTemplatePath($this->module_path.'tpl.admin');
$this->setTemplateFile('addon_list');
}
/**
* @brief 애드온의 상세 정보(conf/info.xml) 팝업 출력
**/
function dispAddonAdminInfo() {
// 요청된 애드온을 구함
$selected_addon = Context::get('selected_addon');
// 요청된 애드온의 정보를 구함
$oAddonModel = &getModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon);
Context::set('addon_info', $addon_info);
// 레이아웃을 팝업으로 지정
$this->setLayoutFile('popup_layout');
// 템플릿 패스 및 파일을 지정
$this->setTemplatePath($this->module_path.'tpl.admin');
$this->setTemplateFile('addon_info');
}
}
?>

View file

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">애드온 관리</title>
<title xml:lang="en">addon management</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">애드온 관리 모듈</description>
<description xml:lang="en">addon management</description>
<description xml:lang="ko">애드온을 등록하거나 사용/미사용을 설정하는 애드온 관리 모듈입니다.</description>
</author>
</module>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<actions>
<action name="dispIndex" type="view" standalone="true" admin_index="true" />
<action name="dispAddonInfo" type="view" standalone="true" />
<action name="procAddonToggleActivate" type="controller" standalone="true" />
<action name="dispAddonAdminIndex" type="view" standalone="true" admin_index="true" />
<action name="dispAddonAdminInfo" type="view" standalone="true" />
<action name="procAddonAdminToggleActivate" type="controller" standalone="true" />
</actions>
</module>

View file

@ -99,8 +99,9 @@
* action foward는 등록된 action이 요청된 모듈에 없을 경우 찾아서 포워딩을 하는 구조이다
* 모듈의 설치시에 사용된다.
**/
function insertActionForward($module, $action) {
function insertActionForward($module, $type, $action) {
$args->module = $module;
$args->type = $type;
$args->action = $action;
$oDB = &DB::getInstance();