From 6a2ac7dbcc57979ae9c616fe5c961ea422491b1b Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 6 Mar 2007 02:45:59 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@269 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/conf/module.xml | 1 + modules/document/document.controller.php | 34 ++++++++++++++++--- modules/document/lang/ko.lang.php | 8 +++-- modules/document/tpl.admin/document_list.html | 11 ++++++ modules/document/tpl.admin/js/document.js | 8 ++--- 5 files changed, 51 insertions(+), 11 deletions(-) diff --git a/modules/document/conf/module.xml b/modules/document/conf/module.xml index 4b85f373f..9cd5a990b 100644 --- a/modules/document/conf/module.xml +++ b/modules/document/conf/module.xml @@ -3,5 +3,6 @@ + diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index cfb43a4fe..e3de4f37a 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -183,19 +183,21 @@ // 댓글 삭제 $oCommentController = &getController('comment'); - $output = $oCommentController->deleteComments($document_srl); + $output = $oCommentController->deleteComments($document_srl, $is_admin); // 엮인글 삭제 $oTrackbackController = &getController('trackback'); - $output = $oTrackbackController->deleteTrackbacks($document_srl); + $output = $oTrackbackController->deleteTrackbacks($document_srl, $is_admin); // 태그 삭제 $oTagController = &getController('tag'); - $oTagController->deleteTag($document_srl); + $oTagController->deleteTag($document_srl, $is_admin); // 첨부 파일 삭제 - $oFileController = &getController('file'); - if($document->uploaded_count) $oFileController->deleteFiles($document->module_srl, $document_srl); + if($document->uploaded_count) { + $oFileController = &getController('file'); + $oFileController->deleteFiles($document->module_srl, $document_srl); + } // 카테고리가 있으면 카테고리 정보 변경 if($document->category_srl) $this->updateCategoryCount($document->category_srl); @@ -511,5 +513,27 @@ 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/lang/ko.lang.php b/modules/document/lang/ko.lang.php index 1a619817d..957679996 100644 --- a/modules/document/lang/ko.lang.php +++ b/modules/document/lang/ko.lang.php @@ -5,8 +5,12 @@ * @brief 문서(document) 모듈의 기본 언어팩 **/ - $lang->module = "모듈"; + $lang->module = '모듈'; - $lang->msg_category_not_moved = "이동할 수가 없습니다"; + $lang->cmd_delete_checked_document = '선택항목 삭제'; + + $lang->msg_cart_is_null = '삭제할 글을 선택해주세요'; + $lang->msg_category_not_moved = '이동할 수가 없습니다'; $lang->msg_is_secret = '비밀글입니다'; + $lang->msg_checked_document_is_deleted = '%d개의 글이 삭제되었습니다'; ?> diff --git a/modules/document/tpl.admin/document_list.html b/modules/document/tpl.admin/document_list.html index 0e57b2077..88d1ca269 100644 --- a/modules/document/tpl.admin/document_list.html +++ b/modules/document/tpl.admin/document_list.html @@ -1,4 +1,5 @@ + @@ -8,6 +9,9 @@ {$lang->page_count} : {number_format($page)} / {number_format($total_page)} +
+ +
@@ -43,6 +47,13 @@
+ +
+ +
+ +
+
diff --git a/modules/document/tpl.admin/js/document.js b/modules/document/tpl.admin/js/document.js index 20c1a0df1..55a8c3d8e 100644 --- a/modules/document/tpl.admin/js/document.js +++ b/modules/document/tpl.admin/js/document.js @@ -1,10 +1,10 @@ /** - * @file : modules/document/tpl.admin/js/board.js - * @author : zero - * @desc : board 모듈의 javascript + * @file modules/document/tpl.admin/js/board.js + * @author zero + * @biref board 모듈의 javascript **/ + /* 검색 실행 */ function completeSearch(fo_obj) { fo_obj.submit(); } -