From 9a7eee1f4f325b2619f81b28c48c73ec91538514 Mon Sep 17 00:00:00 2001 From: zero Date: Tue, 6 Mar 2007 03:19:02 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@278 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/comment/comment.controller.php | 2 -- modules/file/file.controller.php | 21 ++++++++++++++ modules/file/lang/ko.lang.php | 19 ++++++++++++ .../{comment_list.html => file_list.html} | 29 ++++++++++--------- .../file/tpl.admin/filter/delete_checked.xml | 2 +- 5 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 modules/file/lang/ko.lang.php rename modules/file/tpl.admin/{comment_list.html => file_list.html} (52%) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 3a64ae6d6..577bc86a3 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -211,7 +211,5 @@ $this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) ); } - - } ?> diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 0500c4459..5d15f11ed 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -164,5 +164,26 @@ exit(); } + /** + * @brief 관리자 페이지에서 선택된 파일들을 삭제 + **/ + function procDeleteChecked() { + // 선택된 글이 없으면 오류 표시 + $cart = Context::get('cart'); + if(!$cart) return $this->stop('msg_cart_is_null'); + $file_srl_list= explode('|@|', $cart); + $file_count = count($file_srl_list); + if(!$file_count) return $this->stop('msg_cart_is_null'); + + // 글삭제 + for($i=0;$i<$file_count;$i++) { + $file_srl = trim($file_srl_list[$i]); + if(!$file_srl) continue; + + $this->deleteFile($file_srl, true); + } + + $this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) ); + } } ?> diff --git a/modules/file/lang/ko.lang.php b/modules/file/lang/ko.lang.php new file mode 100644 index 000000000..6f4d55333 --- /dev/null +++ b/modules/file/lang/ko.lang.php @@ -0,0 +1,19 @@ + + * @brief 첨부파일(file) 모듈의 기본 언어팩 + **/ + + $lang->module = '모듈'; + $lang->file_name = '파일이름'; + $lang->file_size = '파일크기'; + $lang->download_count = '다운로드 받은 수'; + + $lang->cmd_delete_checked_file = '선택항목 삭제'; + $lang->cmd_move_to_document = '문서로 이동'; + $lang->cmd_download = '다운로드'; + + $lang->msg_cart_is_null = '삭제할 글을 선택해주세요'; + $lang->msg_checked_file_is_deleted = '%d개의 첨부파일이 삭제되었습니다'; +?> diff --git a/modules/file/tpl.admin/comment_list.html b/modules/file/tpl.admin/file_list.html similarity index 52% rename from modules/file/tpl.admin/comment_list.html rename to modules/file/tpl.admin/file_list.html index abcef4095..f93283cef 100644 --- a/modules/file/tpl.admin/comment_list.html +++ b/modules/file/tpl.admin/file_list.html @@ -1,7 +1,6 @@ -
{$lang->total_count} : {number_format($total_count)}, {$lang->page_count} : {number_format($page)} / {number_format($total_page)} @@ -16,20 +15,24 @@ {$lang->no} {$lang->module} - {$lang->user_name} - {$lang->content} + {$lang->file_name} + {$lang->file_size} + {$lang->download_count} {$lang->date} - {$lang->cmd_move} + {$lang->cmd_move_to_document} + {$lang->cmd_download} - + {$no} - + {$module_list[$val->module_srl]->browser_title} - {$val->user_name} - {$val->content} + {$val->source_filename} + {$val->file_size} + {$val->downloaded_count} {zdate($val->regdate,"Y-m-d")} - {$lang->cmd_move} + {$lang->cmd_move} + {$lang->cmd_download} @@ -37,22 +40,22 @@
- +
- [{$lang->first_page}] + [{$lang->first_page}] {$page_no} - [{$page_no}] + [{$page_no}] - [{$lang->last_page}] + [{$lang->last_page}]
diff --git a/modules/file/tpl.admin/filter/delete_checked.xml b/modules/file/tpl.admin/filter/delete_checked.xml index d2f074110..6540e70a1 100644 --- a/modules/file/tpl.admin/filter/delete_checked.xml +++ b/modules/file/tpl.admin/filter/delete_checked.xml @@ -1,4 +1,4 @@ - +