git-svn-id: http://xe-core.googlecode.com/svn/trunk@269 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-06 02:45:59 +00:00
parent c4e4f4b856
commit 6a2ac7dbcc
5 changed files with 51 additions and 11 deletions

View file

@ -3,5 +3,6 @@
<grants /> <grants />
<actions> <actions>
<action name="dispList" type="view" admin_index="true" standalone="true" /> <action name="dispList" type="view" admin_index="true" standalone="true" />
<action name="procDeleteChecked" type="controller" standalone="true" />
</actions> </actions>
</module> </module>

View file

@ -183,19 +183,21 @@
// 댓글 삭제 // 댓글 삭제
$oCommentController = &getController('comment'); $oCommentController = &getController('comment');
$output = $oCommentController->deleteComments($document_srl); $output = $oCommentController->deleteComments($document_srl, $is_admin);
// 엮인글 삭제 // 엮인글 삭제
$oTrackbackController = &getController('trackback'); $oTrackbackController = &getController('trackback');
$output = $oTrackbackController->deleteTrackbacks($document_srl); $output = $oTrackbackController->deleteTrackbacks($document_srl, $is_admin);
// 태그 삭제 // 태그 삭제
$oTagController = &getController('tag'); $oTagController = &getController('tag');
$oTagController->deleteTag($document_srl); $oTagController->deleteTag($document_srl, $is_admin);
// 첨부 파일 삭제 // 첨부 파일 삭제
$oFileController = &getController('file'); if($document->uploaded_count) {
if($document->uploaded_count) $oFileController->deleteFiles($document->module_srl, $document_srl); $oFileController = &getController('file');
$oFileController->deleteFiles($document->module_srl, $document_srl);
}
// 카테고리가 있으면 카테고리 정보 변경 // 카테고리가 있으면 카테고리 정보 변경
if($document->category_srl) $this->updateCategoryCount($document->category_srl); if($document->category_srl) $this->updateCategoryCount($document->category_srl);
@ -511,5 +513,27 @@
return new Object(); 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) );
}
} }
?> ?>

View file

@ -5,8 +5,12 @@
* @brief 문서(document) 모듈의 기본 언어팩 * @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_is_secret = '비밀글입니다';
$lang->msg_checked_document_is_deleted = '%d개의 글이 삭제되었습니다';
?> ?>

View file

@ -1,4 +1,5 @@
<!--%import("filter/search.xml")--> <!--%import("filter/search.xml")-->
<!--%import("filter/delete_checked.xml")-->
<!--%import("js/document.js")--> <!--%import("js/document.js")-->
<!--#include("header.html")--> <!--#include("header.html")-->
@ -8,6 +9,9 @@
{$lang->page_count} : {number_format($page)} / {number_format($total_page)} {$lang->page_count} : {number_format($page)} / {number_format($total_page)}
</div> </div>
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
<input type="hidden" name="page" value="{$page}" />
<!-- 목록 --> <!-- 목록 -->
<div> <div>
<table> <table>
@ -43,6 +47,13 @@
</table> </table>
</div> </div>
<!-- 버튼 -->
<div>
<input type="submit" value="{$lang->cmd_delete_checked_document}" />
</div>
</form>
<!-- 검색 --> <!-- 검색 -->
<div> <div>
<form action="./" method="get" onsubmit="return procFilter(this, search)"> <form action="./" method="get" onsubmit="return procFilter(this, search)">

View file

@ -1,10 +1,10 @@
/** /**
* @file : modules/document/tpl.admin/js/board.js * @file modules/document/tpl.admin/js/board.js
* @author : zero <zero@nzeo.com> * @author zero <zero@nzeo.com>
* @desc : board 모듈의 javascript * @biref board 모듈의 javascript
**/ **/
/* 검색 실행 */ /* 검색 실행 */
function completeSearch(fo_obj) { function completeSearch(fo_obj) {
fo_obj.submit(); fo_obj.submit();
} }