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/template_compiled',
|
||||
'./files/cache/module_info',
|
||||
'./files/cache/layout',
|
||||
'./files/attach',
|
||||
'./files/attach/images',
|
||||
'./files/attach/binaries',
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* @brief 레이아웃(layout) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->layout = '레이아웃';
|
||||
$lang->layout_name = '레이아웃 이름';
|
||||
$lang->menu_count = '메뉴의 수';
|
||||
$lang->menu_management = '메뉴 관리';
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
$args->layout = Context::get('layout');
|
||||
$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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,18 @@
|
|||
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 레이아웃의 경로를 구함
|
||||
**/
|
||||
|
|
@ -71,7 +83,7 @@
|
|||
/**
|
||||
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
||||
**/
|
||||
function getLayoutInfoXml($layout) {
|
||||
function getLayoutInfoXml($layout, $layout_srl = 0) {
|
||||
// 요청된 모듈의 경로를 구한다. 없으면 return
|
||||
$layout_path = $this->getLayoutPath($layout);
|
||||
if(!$layout_path) return;
|
||||
|
|
@ -121,6 +133,11 @@
|
|||
$obj->id = $item->attrs->id;
|
||||
$obj->name = $item->name->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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,22 @@
|
|||
**/
|
||||
function dispInsertLayout2() {
|
||||
// 선택된 레이아웃의 정보르 구해서 세팅
|
||||
$layout = Context::get('layout');
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
|
||||
// DB에 등록된 레이아웃의 정보를 가져옴
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$info = $oLayoutModel->getLayoutInfoXml($layout);
|
||||
Context::set('info', $info);
|
||||
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||
|
||||
// 등록된 레이아웃이 없으면 오류 표시
|
||||
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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,14 +8,16 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th>{$lang->layout_name}</th>
|
||||
<th>{$lang->layout}</th>
|
||||
<th>{$lang->title}</th>
|
||||
<th>{$lang->regdate}</th>
|
||||
<th>{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
<!--@foreach($layout_list as $no => $val)-->
|
||||
<tr>
|
||||
<td>{$no}</td>
|
||||
<td><a href="#" onclick="location.href='{getUrl('act','dispInsertLayout','layout_srl',$val->layout_srl)}';return false;">{$val->layout_name}</a></td>
|
||||
<td>{$no+1}</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><a href="{getUrl('act','dispAdminDeleteBoard','module_srl', $val->module_srl)}">{$lang->cmd_delete}</a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<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}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,15 @@
|
|||
<col width="*" />
|
||||
<tr>
|
||||
<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>
|
||||
<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>
|
||||
<th>{$lang->description}</th>
|
||||
<td>{nl2br($info->author->description)}</td>
|
||||
<td>{nl2br($layout_info->author->description)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<th>{$lang->menu_management}</th>
|
||||
<td>{nl2br($lang->about_menu_management)}</td>
|
||||
</tr>
|
||||
<!--@foreach($info->navigations as $key => $val)-->
|
||||
<!--@foreach($layout_info->navigations as $key => $val)-->
|
||||
<tr>
|
||||
<th>
|
||||
{$val->name} <br />
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* 레이아웃 신규 생성시 완료 후 요청하는 함수 */
|
||||
function completeInsertLayout(ret_obj) {
|
||||
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