mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@302 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7407e0e16e
commit
b22aeaf783
9 changed files with 49 additions and 14 deletions
|
|
@ -145,6 +145,7 @@
|
||||||
'./files/cache/js_filter_compiled',
|
'./files/cache/js_filter_compiled',
|
||||||
'./files/cache/template_compiled',
|
'./files/cache/template_compiled',
|
||||||
'./files/cache/module_info',
|
'./files/cache/module_info',
|
||||||
|
'./files/cache/layout',
|
||||||
'./files/attach',
|
'./files/attach',
|
||||||
'./files/attach/images',
|
'./files/attach/images',
|
||||||
'./files/attach/binaries',
|
'./files/attach/binaries',
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* @brief 레이아웃(layout) 모듈의 기본 언어팩
|
* @brief 레이아웃(layout) 모듈의 기본 언어팩
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
$lang->layout = '레이아웃';
|
||||||
$lang->layout_name = '레이아웃 이름';
|
$lang->layout_name = '레이아웃 이름';
|
||||||
$lang->menu_count = '메뉴의 수';
|
$lang->menu_count = '메뉴의 수';
|
||||||
$lang->menu_management = '메뉴 관리';
|
$lang->menu_management = '메뉴 관리';
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
$args->layout = Context::get('layout');
|
$args->layout = Context::get('layout');
|
||||||
$args->title = Context::get('title');
|
$args->title = Context::get('title');
|
||||||
|
|
||||||
$oDB->executeQuery("layout.insertLayout", $args);
|
$output = $oDB->executeQuery("layout.insertLayout", $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
$this->add('layout_srl', $args->layout_srl);
|
$this->add('layout_srl', $args->layout_srl);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,18 @@
|
||||||
return array($output->data);
|
return array($output->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DB 에 생성된 한개의 레이아웃 정보를 구함
|
||||||
|
**/
|
||||||
|
function getLayout($layout_srl) {
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
$args->layout_srl = $layout_srl;
|
||||||
|
$output = $oDB->executeQuery('layout.getLayout', $args);
|
||||||
|
if(!$output->data) return;
|
||||||
|
|
||||||
|
return $output->data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 레이아웃의 경로를 구함
|
* @brief 레이아웃의 경로를 구함
|
||||||
**/
|
**/
|
||||||
|
|
@ -71,7 +83,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
||||||
**/
|
**/
|
||||||
function getLayoutInfoXml($layout) {
|
function getLayoutInfoXml($layout, $layout_srl = 0) {
|
||||||
// 요청된 모듈의 경로를 구한다. 없으면 return
|
// 요청된 모듈의 경로를 구한다. 없으면 return
|
||||||
$layout_path = $this->getLayoutPath($layout);
|
$layout_path = $this->getLayoutPath($layout);
|
||||||
if(!$layout_path) return;
|
if(!$layout_path) return;
|
||||||
|
|
@ -121,6 +133,11 @@
|
||||||
$obj->id = $item->attrs->id;
|
$obj->id = $item->attrs->id;
|
||||||
$obj->name = $item->name->body;
|
$obj->name = $item->name->body;
|
||||||
$obj->maxdepth = $item->maxdepth->body;
|
$obj->maxdepth = $item->maxdepth->body;
|
||||||
|
$obj->xml_file = sprintf("./files/cache/layout/%s_%s.xml", $layout_srl, $obj->id);
|
||||||
|
if($layout_srl && !file_exists($obj->xml_file)) {
|
||||||
|
$buff = "<root />";
|
||||||
|
FileHandler::writeFile($obj->xml_file, $buff);
|
||||||
|
}
|
||||||
$layout_info->navigations[] = $obj;
|
$layout_info->navigations[] = $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,22 @@
|
||||||
**/
|
**/
|
||||||
function dispInsertLayout2() {
|
function dispInsertLayout2() {
|
||||||
// 선택된 레이아웃의 정보르 구해서 세팅
|
// 선택된 레이아웃의 정보르 구해서 세팅
|
||||||
$layout = Context::get('layout');
|
$layout_srl = Context::get('layout_srl');
|
||||||
|
|
||||||
|
// DB에 등록된 레이아웃의 정보를 가져옴
|
||||||
$oLayoutModel = &getModel('layout');
|
$oLayoutModel = &getModel('layout');
|
||||||
$info = $oLayoutModel->getLayoutInfoXml($layout);
|
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||||
Context::set('info', $info);
|
|
||||||
|
// 등록된 레이아웃이 없으면 오류 표시
|
||||||
|
if(!$layout_info) return $this->dispContent();
|
||||||
|
|
||||||
|
// xml 정보를 가져옴
|
||||||
|
$layout = $layout_info->layout;
|
||||||
|
$layout_info = $oLayoutModel->getLayoutInfoXml($layout, $layout_srl);
|
||||||
|
$layout_info->layout_srl = $layout_srl;
|
||||||
|
$layout_info->layout = $layout;
|
||||||
|
|
||||||
|
Context::set('layout_info', $layout_info);
|
||||||
|
|
||||||
$this->setTemplateFile('insert_layout2');
|
$this->setTemplateFile('insert_layout2');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,16 @@
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->no}</th>
|
<th>{$lang->no}</th>
|
||||||
<th>{$lang->layout_name}</th>
|
<th>{$lang->layout}</th>
|
||||||
|
<th>{$lang->title}</th>
|
||||||
<th>{$lang->regdate}</th>
|
<th>{$lang->regdate}</th>
|
||||||
<th>{$lang->cmd_delete}</th>
|
<th>{$lang->cmd_delete}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@foreach($layout_list as $no => $val)-->
|
<!--@foreach($layout_list as $no => $val)-->
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$no}</td>
|
<td>{$no+1}</td>
|
||||||
<td><a href="#" onclick="location.href='{getUrl('act','dispInsertLayout','layout_srl',$val->layout_srl)}';return false;">{$val->layout_name}</a></td>
|
<td>{$val->layout}</td>
|
||||||
|
<td><a href="#" onclick="location.href='{getUrl('act','dispInsertLayout2','layout_srl',$val->layout_srl)}';return false;">{$val->title}</a></td>
|
||||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||||
<td><a href="{getUrl('act','dispAdminDeleteBoard','module_srl', $val->module_srl)}">{$lang->cmd_delete}</a></td>
|
<td><a href="{getUrl('act','dispAdminDeleteBoard','module_srl', $val->module_srl)}">{$lang->cmd_delete}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
<input type="button" value="{$lang->cmd_list}" onclick="location.href='{getUrl('act',dispContent)}';return false;" />
|
||||||
<input type="submit" value="{$lang->cmd_next}" />
|
<input type="submit" value="{$lang->cmd_next}" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@
|
||||||
<col width="*" />
|
<col width="*" />
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->layout_name}</th>
|
<th>{$lang->layout_name}</th>
|
||||||
<td>{$info->title} ver {$info->version} ({$layout})</td>
|
<td>{$layout_info->title} ver {$layout_info->version} ({$layout})</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->author}</th>
|
<th>{$lang->author}</th>
|
||||||
<td><a href="#" onclick="window.open('{$info->author->homepage}');return false;">{$info->author->name}</a></td>
|
<td><a href="#" onclick="window.open('{$layout_info->author->homepage}');return false;">{$layout_info->author->name}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$lang->description}</th>
|
<th>{$lang->description}</th>
|
||||||
<td>{nl2br($info->author->description)}</td>
|
<td>{nl2br($layout_info->author->description)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
<th>{$lang->menu_management}</th>
|
<th>{$lang->menu_management}</th>
|
||||||
<td>{nl2br($lang->about_menu_management)}</td>
|
<td>{nl2br($lang->about_menu_management)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@foreach($info->navigations as $key => $val)-->
|
<!--@foreach($layout_info->navigations as $key => $val)-->
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
{$val->name} <br />
|
{$val->name} <br />
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
xAddEventListener(window,'load', function() { loadTreeMenu("/tree_menu/a.xml", "{$val->id}", "menu_zone_{$val->id}", "{$val->name}", doGetMenuInfo); });
|
xAddEventListener(window,'load', function() { loadTreeMenu("{$val->xml_file}", "{$val->id}", "menu_zone_{$val->id}", "{$val->name}", doGetMenuInfo); });
|
||||||
</script>
|
</script>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/* 레이아웃 신규 생성시 완료 후 요청하는 함수 */
|
/* 레이아웃 신규 생성시 완료 후 요청하는 함수 */
|
||||||
function completeInsertLayout(ret_obj) {
|
function completeInsertLayout(ret_obj) {
|
||||||
var layout_srl = ret_obj['layout_srl'];
|
var layout_srl = ret_obj['layout_srl'];
|
||||||
location.href="./module=admin&act=dispInsertLayout2&layout_srl="+layout_srl;
|
location.href="./?module=admin&mo=layout&act=dispInsertLayout2&layout_srl="+layout_srl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 레이아웃 메뉴에를 클릭시 적용할 함수 */
|
/* 레이아웃 메뉴에를 클릭시 적용할 함수 */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue