mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@393 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4e044cbbfd
commit
3890c0c97c
40 changed files with 682 additions and 82 deletions
|
|
@ -24,5 +24,33 @@
|
|||
|
||||
Context::set('menu_item', $menu_item);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// 게시판, 회원관리, 레이아웃관리등 자주 사용될 module을 admin_shortcut에 등록
|
||||
$oAdminController = &getController('admin');
|
||||
$oAdminController->insertShortCut('board');
|
||||
$oAdminController->insertShortCut('member');
|
||||
$oAdminController->insertShortCut('layout');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function moduleIsInstalled() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -45,5 +45,50 @@
|
|||
|
||||
$this->setRedirectUrl('./?module=admin');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 숏컷 추가
|
||||
**/
|
||||
function procInsertShortCut() {
|
||||
$module = Context::get('selected_module');
|
||||
$output = $this->insertShortCut($module);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 숏컷을 추가하는 method
|
||||
**/
|
||||
function insertShortCut($module) {
|
||||
// 선택된 모듈의 정보중에서 admin_index act를 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoXml($module);
|
||||
|
||||
$args->module = $module;
|
||||
$args->title = $module_info->title;
|
||||
$args->default_act = $module_info->admin_index_act;
|
||||
if(!$args->default_act) return new Object(-1, 'msg_default_act_is_null');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('admin.insertShortCut', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 숏컷의 내용 수정
|
||||
**/
|
||||
function procDeleteShortCut() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->shortcut_srl = Context::get('shortcut_srl');
|
||||
|
||||
$output = $oDB->executeQuery('admin.deleteShortCut', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -13,5 +13,17 @@
|
|||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief admin shortcut 에 등록된 목록을 return;
|
||||
**/
|
||||
function getShortCuts() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('admin.getShortCutList');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@
|
|||
$this->setLayoutPath($this->getTemplatePath());
|
||||
$this->setLayoutFile('layout.html');
|
||||
|
||||
// shortcut 가져오기
|
||||
$oAdminModel = &getModel('admin');
|
||||
$shortcut_list = $oAdminModel->getShortCuts();
|
||||
Context::set('shortcut_list', $shortcut_list);
|
||||
|
||||
// admin class의 init
|
||||
parent::init();
|
||||
}
|
||||
|
|
@ -62,6 +67,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 메뉴 숏컷 출력
|
||||
**/
|
||||
function dispShortCut() {
|
||||
|
||||
$this->setTemplateFile('shortcut_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 목록을 보여줌
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@
|
|||
<action name="dispModuleList" type="view" standalone="true" />
|
||||
<action name="dispAddonList" type="view" standalone="true" />
|
||||
<action name="dispLayoutList" type="view" standalone="true" />
|
||||
<action name="dispShortCut" type="view" standalone="true" />
|
||||
|
||||
<action name="dispLogin" type="view" standalone="true" />
|
||||
<action name="dispLogout" type="view" standalone="true" />
|
||||
|
||||
<action name="procLogin" type="controller" standalone="true" />
|
||||
<action name="procLogout" type="controller" standalone="true" />
|
||||
<action name="procInsertShortCut" type="controller" standalone="true" />
|
||||
<action name="procDeleteShortCut" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,5 @@
|
|||
$lang->installed_path = "설치경로";
|
||||
|
||||
$lang->msg_is_not_administrator = '관리자만 접속이 가능합니다';
|
||||
$lang->msg_default_act_is_null = '기본 관리자 Action이 지정되어 있지 않아 바로가기 등록을 할 수가 없습니다';
|
||||
?>
|
||||
|
|
|
|||
8
modules/admin/queries/deleteShortCut.xml
Normal file
8
modules/admin/queries/deleteShortCut.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteShortCut" action="delete">
|
||||
<tables>
|
||||
<table name="admin_shortcut" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="shortcut_srl" var="shortcut_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/admin/queries/getShortCutList.xml
Normal file
8
modules/admin/queries/getShortCutList.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getShortCutList" action="select">
|
||||
<tables>
|
||||
<table name="admin_shortcut" />
|
||||
</tables>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
</navigation>
|
||||
</query>
|
||||
13
modules/admin/queries/insertShortCut.xml
Normal file
13
modules/admin/queries/insertShortCut.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="insertShortCut" action="insert">
|
||||
<tables>
|
||||
<table name="admin_shortcut" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="shortcut_srl" var="shortcut_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||
<column name="title" var="title" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="module" var="module" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="default_act" var="default_act" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="list_order" var="list_order" default="sequence()" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
<table name="admin_shortcut">
|
||||
<column name="shortcut_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="module" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="module" type="varchar" size="250" notnull="notnull" unique="uni_module" />
|
||||
<column name="title" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="default_act" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
<column name="regdate" type="date" />
|
||||
|
|
|
|||
9
modules/admin/tpl/filter/delete_shortcut.xml
Normal file
9
modules/admin/tpl/filter/delete_shortcut.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<filter name="delete_shortcut" module="admin" act="procDeleteShortCut" confirm_msg_code="confirm_delete">
|
||||
<form>
|
||||
<node target="shortcut_srl" required="true" />
|
||||
</form>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -17,3 +17,10 @@ function doAdminLoginFocus() {
|
|||
var fo = xGetElementById('user_id');
|
||||
if(fo) fo.focus();
|
||||
}
|
||||
|
||||
// 숏컷 삭제
|
||||
function doDeleteShortCut(shortcut_srl) {
|
||||
var fo_obj = xGetElementById('fo_shortcut_info');
|
||||
fo_obj.shortcut_srl.value = shortcut_srl;
|
||||
procFilter(fo_obj, delete_shortcut);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,22 +14,19 @@
|
|||
<div id="admin_main_menu">
|
||||
<!-- 자주 쓰이는 모듈의 경우 별도 등록을 함 -->
|
||||
<div>
|
||||
<span <!--@if($mo=='board')-->class="selected"<!--@end-->>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispAdminContent','mo','board','module_srl','')}'">{$lang->board_manager}</a>
|
||||
</span>
|
||||
<span <!--@if($mo=='member')-->class="selected"<!--@end-->>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispAdminContent','mo','member','module_srl','')}'">{$lang->member_manager}</a>
|
||||
</span>
|
||||
<span <!--@if($mo=='layout')-->class="selected"<!--@end-->>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispContent','mo','layout','module_srl','')}'">{$lang->layout_manager}</a>
|
||||
</span>
|
||||
<!--@foreach($shortcut_list as $key => $val)-->
|
||||
<span <!--@if($mo==$val->module)-->class="selected"<!--@end-->>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->default_act,'mo',$val->module)}';return false;">{$val->title}</a>
|
||||
</span>
|
||||
<!--@end-->
|
||||
[<a href="#" onclick="location.href='{getUrl('','module','admin','act','dispShortCut')}';return false;">{$lang->cmd_management}</a>]
|
||||
</div>
|
||||
|
||||
<!-- 애드온,플러그인,레이아웃,에디터컴포넌트등의 목록을 보여줄 메뉴 -->
|
||||
<div>
|
||||
<!--@foreach($menu_item as $key => $val)-->
|
||||
<span <!--@if($act==$val->act)-->class="selected"<!--@end-->>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->act,'mo','','module_srl','')}'">{$val->title}</a>
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->act,'mo','','module_srl','')}';return false;">{$val->title}</a>
|
||||
</span>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
@ -37,7 +34,7 @@
|
|||
|
||||
<!--@if($selected_module_info)-->
|
||||
<div id="admin_module_info">
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'mo', $mo, 'act', $selected_module_info->admin_index_act)}'">{$selected_module_info->title}</a> (ver {$selected_module_info->version})
|
||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'mo', $mo, 'act', $selected_module_info->admin_index_act)}';return false;">{$selected_module_info->title}</a> (ver {$selected_module_info->version})
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
|
|
|
|||
35
modules/admin/tpl/shortcut_list.html
Normal file
35
modules/admin/tpl/shortcut_list.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!--%import("filter/delete_shortcut.xml")-->
|
||||
<!--%import("js/admin.js")-->
|
||||
|
||||
<!--#include("./header.html")-->
|
||||
|
||||
<!-- 숏컷의 위/아래, 삭제와 관련된 form -->
|
||||
<form id="fo_shortcut_info" action="./" method="get">
|
||||
<input type="hidden" name="shortcut_srl" value="" />
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>{$lang->title}</th>
|
||||
<th>{$lang->module}</th>
|
||||
<th>{$lang->regdate}</th>
|
||||
<th>{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
<!--@if(!count($shortcut_list))-->
|
||||
<tr>
|
||||
<td colspan="4">{$lang->msg_shortcut_is_null}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@foreach($shortcut_list as $shortcut_info)-->
|
||||
<tr>
|
||||
<td>{$shortcut_info->title}</td>
|
||||
<td>{$shortcut_info->module}</td>
|
||||
<td>{zdate($shortcut_info->last_update,"Y-m-d H:i:s")}</td>
|
||||
<td><a href="#" onclick="doDeleteShortCut('{$shortcut_info->shortcut_srl}');return false;">{$lang->cmd_delete}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue