From f79b18f6cca6b6d486be06ac478281acd44ba530 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 6 Mar 2007 02:23:10 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@267 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.class.php | 2 +- modules/document/document.view.php | 20 +++ modules/document/lang/ko.lang.php | 16 +- modules/document/queries/getDocumentList.xml | 2 +- modules/document/tpl.admin/document_list.html | 76 ++++++++++ modules/document/tpl.admin/filter/search.xml | 14 ++ modules/document/tpl.admin/js/document.js | 10 ++ modules/document/tpl.admin/list.html | 143 ------------------ 8 files changed, 131 insertions(+), 152 deletions(-) create mode 100644 modules/document/tpl.admin/document_list.html create mode 100644 modules/document/tpl.admin/filter/search.xml create mode 100644 modules/document/tpl.admin/js/document.js delete mode 100644 modules/document/tpl.admin/list.html diff --git a/modules/document/document.class.php b/modules/document/document.class.php index b637428f5..5f69fe0d7 100644 --- a/modules/document/document.class.php +++ b/modules/document/document.class.php @@ -11,7 +11,7 @@ var $notice_list_order = -2100000000; // 관리자페이지에서 사용할 검색 옵션 - var $search_option = array('title','content','title_content','user_name','user_id'); ///< 검색 옵션 + var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션 } ?> diff --git a/modules/document/document.view.php b/modules/document/document.view.php index e303beebf..0c846c482 100644 --- a/modules/document/document.view.php +++ b/modules/document/document.view.php @@ -31,12 +31,32 @@ $oDocumentModel = &getModel('document'); $output = $oDocumentModel->getDocumentList($args); + // 목록의 loop를 돌면서 mid를 구하기 위한 module_srl값을 구함 + $document_count = count($output->data); + if($document_count) { + foreach($output->data as $key => $val) { + $module_srl = $val->module_srl; + if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl; + } + if(count($module_srl_list)) { + $oDB = &DB::getInstance(); + $args->module_srls = implode(',',$module_srl_list); + $mid_output = $oDB->executeQuery('document.getModuleInfoByModuleSrl', $args); + if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data); + for($i=0;$idata);$i++) { + $mid_info = $mid_output->data[$i]; + $module_list[$mid_info->module_srl] = $mid_info; + } + } + } + // 템플릿에 쓰기 위해서 document_model::getDocumentList() 의 return object에 있는 값들을 세팅 Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('document_list', $output->data); Context::set('page_navigation', $output->page_navigation); + Context::set('module_list', $module_list); // 템플릿에서 사용할 검색옵션 세팅 $count_search_option = count($this->search_option); diff --git a/modules/document/lang/ko.lang.php b/modules/document/lang/ko.lang.php index c14934a0c..1a619817d 100644 --- a/modules/document/lang/ko.lang.php +++ b/modules/document/lang/ko.lang.php @@ -1,10 +1,12 @@ - * @desc : 문서(document) 모듈의 기본 언어팩 - **/ - $lang->msg_category_not_moved = "이동할 수가 없습니다"; + /** + * @file modules/document/lang/ko.lang.php + * @author zero + * @brief 문서(document) 모듈의 기본 언어팩 + **/ - $lang->msg_is_secret = '비밀글입니다'; + $lang->module = "모듈"; + + $lang->msg_category_not_moved = "이동할 수가 없습니다"; + $lang->msg_is_secret = '비밀글입니다'; ?> diff --git a/modules/document/queries/getDocumentList.xml b/modules/document/queries/getDocumentList.xml index de2f2aa88..c0c327c15 100644 --- a/modules/document/queries/getDocumentList.xml +++ b/modules/document/queries/getDocumentList.xml @@ -6,7 +6,7 @@ - + diff --git a/modules/document/tpl.admin/document_list.html b/modules/document/tpl.admin/document_list.html new file mode 100644 index 000000000..0e57b2077 --- /dev/null +++ b/modules/document/tpl.admin/document_list.html @@ -0,0 +1,76 @@ + + + + + +
+ {$lang->document_count} : {number_format($total_count)}, + {$lang->page_count} : {number_format($page)} / {number_format($total_page)} +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
{$lang->no}{$lang->module}{$lang->title}{$lang->user_name}{$lang->readed_count}{$lang->voted_count}{$lang->date}
{$no}{$module_list[$val->module_srl]->browser_title} + {$val->title} + + [{$val->comment_count}] + + + [{$val->trackback_count}] + + {$val->user_name}{$val->readed_count}{$val->voted_count}{zdate($val->regdate,"Y-m-d")}
+
+ + +
+
+ + + + + + + +
+
+ + +
+ [{$lang->first_page}] + + + + {$page_no} + + [{$page_no}] + + + + [{$lang->last_page}] +
diff --git a/modules/document/tpl.admin/filter/search.xml b/modules/document/tpl.admin/filter/search.xml new file mode 100644 index 000000000..db52db731 --- /dev/null +++ b/modules/document/tpl.admin/filter/search.xml @@ -0,0 +1,14 @@ + +
+ + + + + + + + + + + +
diff --git a/modules/document/tpl.admin/js/document.js b/modules/document/tpl.admin/js/document.js new file mode 100644 index 000000000..20c1a0df1 --- /dev/null +++ b/modules/document/tpl.admin/js/document.js @@ -0,0 +1,10 @@ +/** + * @file : modules/document/tpl.admin/js/board.js + * @author : zero + * @desc : board 모듈의 javascript + **/ +/* 검색 실행 */ +function completeSearch(fo_obj) { + fo_obj.submit(); +} + diff --git a/modules/document/tpl.admin/list.html b/modules/document/tpl.admin/list.html deleted file mode 100644 index 41aff7e7c..000000000 --- a/modules/document/tpl.admin/list.html +++ /dev/null @@ -1,143 +0,0 @@ - - - -{$module_info->header_text} - - - -
- - - - - - - - - -
{$module_info->title}
{nl2br($module_info->desc)}
-
- - - -
- {$lang->document_count} : {number_format($total_count)}, - {$lang->page_count} : {number_format($page)} / {number_format($total_page)} - - rss - - - [ - {$lang->cmd_modify_member_info} | - {$lang->cmd_logout} - ] - - [ - {$lang->cmd_signup} | - {$lang->cmd_login} - ] - - - [{$lang->cmd_management}] - -
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang->no} -
- -
-
{$lang->title}{$lang->user_name}{$lang->readed_count}{$lang->voted_count}{$lang->date}
{$no}{$category_list[$val->category_srl]->title} - - {$val->title} - - {$val->title} - - - [{$val->comment_count}] - - - [{$val->trackback_count}] - - {$val->user_name}{$val->readed_count}{$val->voted_count}{zdate($val->regdate,"Y-m-d")}
-
- - - - - - - -
-
- - - - - - -
-
- - -
- [{$lang->first_page}] - - - - {$page_no} - - [{$page_no}] - - - - [{$lang->last_page}] -
- - - -{$module_info->footer_text}