From 84d0a85ebbf7c41565b6a443529c6cfa6a904465 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 30 Mar 2007 05:21:30 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@804 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.class.php | 5 + modules/document/document.controller.php | 45 +++--- modules/document/document.view.php | 2 +- modules/document/tpl/document_list.html | 136 +++++++++--------- .../document/tpl/filter/delete_checked.xml | 22 +-- 5 files changed, 109 insertions(+), 101 deletions(-) diff --git a/modules/document/document.class.php b/modules/document/document.class.php index 5c3bace58..58fd6b8ef 100644 --- a/modules/document/document.class.php +++ b/modules/document/document.class.php @@ -17,6 +17,11 @@ * @brief 설치시 추가 작업이 필요할시 구현 **/ function moduleInstall() { + // action forward에 등록 (관리자 모드에서 사용하기 위함) + $oModuleController = &getController('module'); + $oModuleController->insertActionFoward('document', 'view', 'dispDocumentAdminList'); + $oModuleController->insertActionFoward('document', 'controller', 'procDocumentAdminDeleteChecked'); + return new Object(); } diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 32b2c73af..622c554a7 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -13,6 +13,28 @@ function init() { } + /** + * @brief 관리자 페이지에서 선택된 문서들 삭제 + **/ + function procDocumentAdminDeleteChecked() { + // 선택된 글이 없으면 오류 표시 + $cart = Context::get('cart'); + if(!$cart) return $this->stop('msg_cart_is_null'); + $document_srl_list= explode('|@|', $cart); + $document_count = count($document_srl_list); + if(!$document_count) return $this->stop('msg_cart_is_null'); + + // 글삭제 + for($i=0;$i<$document_count;$i++) { + $document_srl = trim($document_srl_list[$i]); + if(!$document_srl) continue; + + $this->deleteDocument($document_srl, true); + } + + $this->setMessage( sprintf(Context::getLang('msg_checked_document_is_deleted'), $document_count) ); + } + /** * @brief 문서의 권한 부여 * 세션값으로 현 접속상태에서만 사용 가능 @@ -532,28 +554,5 @@ return new Object(); } - - /** - * @brief 관리자 페이지에서 선택된 문서들 삭제 - **/ - function procDeleteChecked() { - // 선택된 글이 없으면 오류 표시 - $cart = Context::get('cart'); - if(!$cart) return $this->stop('msg_cart_is_null'); - $document_srl_list= explode('|@|', $cart); - $document_count = count($document_srl_list); - if(!$document_count) return $this->stop('msg_cart_is_null'); - - // 글삭제 - for($i=0;$i<$document_count;$i++) { - $document_srl = trim($document_srl_list[$i]); - if(!$document_srl) continue; - - $this->deleteDocument($document_srl, true); - } - - $this->setMessage( sprintf(Context::getLang('msg_checked_document_is_deleted'), $document_count) ); - } - } ?> diff --git a/modules/document/document.view.php b/modules/document/document.view.php index caf92a285..258b614a0 100644 --- a/modules/document/document.view.php +++ b/modules/document/document.view.php @@ -16,7 +16,7 @@ /** * @brief 목록 출력 (관리자용) **/ - function dispList() { + function dispDocumentAdminList() { // 목록을 구하기 위한 옵션 $args->page = Context::get('page'); ///< 페이지 $args->list_count = 50; ///< 한페이지에 보여줄 글 수 diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index 2ee80a2cb..d862d3c63 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -2,88 +2,92 @@
- {$lang->document_count} : {number_format($total_count)}, - {$lang->page_count} : {number_format($page)} / {number_format($total_page)} + {$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->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}] + [{$lang->first_page}] - - - {$page_no} - - [{$page_no}] - - + + + {$page_no} + + [{$page_no}] + + - [{$lang->last_page}] + [{$lang->last_page}]
diff --git a/modules/document/tpl/filter/delete_checked.xml b/modules/document/tpl/filter/delete_checked.xml index 999693bc2..c665eeb07 100644 --- a/modules/document/tpl/filter/delete_checked.xml +++ b/modules/document/tpl/filter/delete_checked.xml @@ -1,12 +1,12 @@ - -
- - - - - - - - - + +
+ + + + + + + + +