diff --git a/modules/layout/conf/module.xml b/modules/layout/conf/module.xml index 00c0afd64..df1f174fa 100644 --- a/modules/layout/conf/module.xml +++ b/modules/layout/conf/module.xml @@ -1,6 +1,9 @@ + + + diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 1d091f573..991813b31 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -13,6 +13,18 @@ function init() { } + /** + * @brief DB 에 생성된 레이아웃의 목록을 구함 + **/ + function getLayoutList() { + $oDB = &DB::getInstance(); + $output = $oDB->executeQuery('layout.getLayoutList'); + if(!$output->data) return; + + if(is_array($output->data)) return $output->data; + return array($output->data); + } + /** * @brief 레이아웃의 경로를 구함 **/ diff --git a/modules/layout/layout.view.php b/modules/layout/layout.view.php index 3a1d0e9cd..faba68dab 100644 --- a/modules/layout/layout.view.php +++ b/modules/layout/layout.view.php @@ -14,6 +14,36 @@ $this->setTemplatePath($this->module_path.'tpl.admin'); } + /** + * @brief 레이아웃 관리의 첫 페이지 + **/ + function dispContent() { + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getLayoutList(); + Context::set('layout_list', $layout_list); + + $this->setTemplateFile('index'); + } + + /** + * @brief 레이아웃 등록 페이지 step 1 + **/ + function dispInsertLayout() { + // 레이아웃 목록을 세팅 + $oLayoutModel = &getModel('layout'); + $layout_list = $oLayoutModel->getDownloadedLayoutList(); + Context::set('layout_list', $layout_list); + + $this->setTemplateFile('insert_layout'); + } + + /** + * @brief 레이아웃 등록 페이지 step 2 + **/ + function dispInsertLayout() { + $this->setTemplateFile('insert_layout2'); + } + /** * @brief 레이아웃 목록을 보여줌 **/ diff --git a/modules/layout/queries/getLayoutList.xml b/modules/layout/queries/getLayoutList.xml new file mode 100644 index 000000000..de23d6d67 --- /dev/null +++ b/modules/layout/queries/getLayoutList.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/modules/layout/tpl.admin/index.html b/modules/layout/tpl.admin/index.html new file mode 100644 index 000000000..98b31f78a --- /dev/null +++ b/modules/layout/tpl.admin/index.html @@ -0,0 +1,29 @@ +
+ {$lang->total_count} {number_format(count($layout_list))} +
+ + + +
+
+ + + + + + + + + + + + + + +
{$lang->no}{$lang->layout_name}{$lang->regdate}{$lang->cmd_delete}
{$no}{$val->layout_name}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
+ + + +
+ [{$lang->cmd_make}] +
diff --git a/modules/layout/tpl.admin/insert_layout.html b/modules/layout/tpl.admin/insert_layout.html new file mode 100644 index 000000000..60ff0e515 --- /dev/null +++ b/modules/layout/tpl.admin/insert_layout.html @@ -0,0 +1,16 @@ +
+ + + + + +
+ {$lang->layout_name} + + +
+