From 14550e198f84526a6fed03aeaf62165bac710dcf Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 11 Oct 2007 09:13:02 +0000 Subject: [PATCH] =?UTF-8?q?#127=20#152=20=EA=B2=8C=EC=8B=9C=EB=AC=BC?= =?UTF-8?q?=EC=9D=98=20=EB=B3=B5=EC=82=AC=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20&=20=EC=9D=B4=EB=8F=99/=EB=B3=B5=EC=82=AC=EC=8B=9C?= =?UTF-8?q?=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20=EC=A7=80=EC=A0=95=20?= =?UTF-8?q?=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20&=20=EA=B8=B0=EB=B3=B8=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=ED=8C=90=20=EC=8A=A4=ED=82=A8=EC=97=90=EC=84=9C=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9D=98=20=EA=B2=8C=EC=8B=9C=EB=AC=BC=20?= =?UTF-8?q?=ED=86=A0=EA=B8=80=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?&=20=EA=B4=80=EB=A6=AC=20=EC=84=A0=ED=83=9D=EB=90=9C=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=EC=9D=98=20=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EB=85=B8=EC=B6=9C=20&=20=EA=B8=B0=EB=B3=B8=20=EA=B2=8C?= =?UTF-8?q?=EC=8B=9C=ED=8C=90=20=EC=8A=A4=ED=82=A8=EC=9D=98=20=ED=95=AD?= =?UTF-8?q?=EB=AA=A9=20=EC=88=A8=EA=B9=80/=EC=97=B4=EB=9E=8C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EB=AA=A8=EB=91=90=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2737 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 12 +- common/lang/ko.lang.php | 4 +- modules/board/board.admin.controller.php | 81 -------- modules/board/board.admin.view.php | 28 --- modules/board/board.view.php | 5 - modules/board/conf/module.xml | 5 - modules/board/lang/en.lang.php | 1 - modules/board/lang/es.lang.php | 1 - modules/board/lang/jp.lang.php | 1 - modules/board/lang/ko.lang.php | 1 - modules/board/lang/zh-CN.lang.php | 1 - modules/board/skins/xe_gallery/css/common.css | 32 +-- modules/board/skins/xe_gallery/js/board.js | 13 -- modules/board/skins/xe_gallery/list.html | 129 ++++++------ modules/board/skins/xe_gallery/skin.xml | 45 +++++ modules/board/skins/xe_list/css/common.css | 4 +- modules/board/skins/xe_list/js/board.js | 13 -- modules/board/skins/xe_list/list.html | 33 ++-- modules/board/skins/xe_webzine/css/common.css | 14 +- modules/board/skins/xe_webzine/js/board.js | 13 -- modules/board/skins/xe_webzine/list.html | 85 ++++---- modules/board/skins/xe_webzine/skin.xml | 54 +++++ modules/board/tpl/checked_list.html | 53 ----- modules/board/tpl/js/board_admin.js | 14 -- modules/document/conf/module.xml | 13 ++ .../document/document.admin.controller.php | 186 +++++++++++++++--- modules/document/document.admin.view.php | 35 ++++ modules/document/document.class.php | 7 +- modules/document/document.item.php | 17 ++ modules/document/document.model.php | 15 ++ modules/document/lang/en.lang.php | 1 + modules/document/lang/es.lang.php | 1 + modules/document/lang/jp.lang.php | 1 + modules/document/lang/ko.lang.php | 2 + modules/document/lang/zh-CN.lang.php | 1 + modules/document/queries/getAllModules.xml | 14 ++ .../document/queries/updateDocumentModule.xml | 3 +- modules/document/tpl/checked_list.html | 74 +++++++ modules/document/tpl/css/document.css | 6 +- .../tpl/filter/manage_checked_document.xml | 7 + modules/document/tpl/js/document_admin.js | 49 +++++ 41 files changed, 678 insertions(+), 396 deletions(-) delete mode 100644 modules/board/tpl/checked_list.html create mode 100644 modules/document/queries/getAllModules.xml create mode 100644 modules/document/tpl/checked_list.html create mode 100644 modules/document/tpl/filter/manage_checked_document.xml diff --git a/common/js/common.js b/common/js/common.js index 3d129e9c0..b3a07e38b 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -649,6 +649,16 @@ function checkboxSelectAll(form, name, option){ else if(option == true) value = true else if(option == false) value = false - if(fo_obj[i].name == name) fo_obj[i].checked = value; + //if(fo_obj[i].name == name) fo_obj[i].checked = value; + if(fo_obj[i].name == name) fo_obj[i].click(); } } + +/* 관리자가 문서를 관리하기 위해서 선택시 세션에 넣음 */ +function doAddDocumentCart(obj) { + var srl = obj.value; + var params = new Array(); + params["srl"] = srl; + exec_xml("document","procDocumentAdminAddCart", params, null); +} + diff --git a/common/lang/ko.lang.php b/common/lang/ko.lang.php index 9cf83d210..1bdffd515 100644 --- a/common/lang/ko.lang.php +++ b/common/lang/ko.lang.php @@ -177,8 +177,8 @@ $lang->success_reset = '초기화되었습니다'; $lang->success_leaved = '탈퇴되었습니다'; - $lang->fail_to_delete = '삭제되었습니다'; - $lang->fail_to_move = '이동되었습니다'; + $lang->fail_to_delete = '삭제 실패하였습니다'; + $lang->fail_to_move = '이동 실패하였습니다'; $lang->failed_voted = '추천하실 수 없습니다'; $lang->fail_to_delete_have_children = '답글이 있어서 삭제할 수 없습니다'; diff --git a/modules/board/board.admin.controller.php b/modules/board/board.admin.controller.php index 8148d0746..758e2f3a0 100644 --- a/modules/board/board.admin.controller.php +++ b/modules/board/board.admin.controller.php @@ -13,87 +13,6 @@ function init() { } - /** - * @brief 관리자가 글 선택시 세션에 담음 - **/ - function procBoardAdminAddCart() { - $document_srl = Context::get('srl'); - $check_flag = Context::get('check_flag'); - if(!$document_srl || !in_array($check_flag, array('add','remove'))) return; - - $flag_list = $_SESSION['document_management'][$this->module_srl]; - - if($check_flag == 'remove') unset($flag_list[$document_srl]); - else $flag_list[$document_srl] = true; - - $_SESSION['document_management'][$this->module_srl] = $flag_list; - } - - /** - * @brief 세션에 담긴 선택글의 이동/ 삭제 - **/ - function procBoardAdminManageCheckedDocument() { - $type = Context::get('type'); - $module_srl = Context::get('target_board'); - $message_content = Context::get('message_content'); - if($message_content) $message_content = nl2br($message_content); - - $flag_list = $_SESSION['document_management'][$this->module_srl]; - - $document_srl_list = array_keys($flag_list); - $document_srl_count = count($document_srl_list); - - // 쪽지 발송 - if($message_content) { - - $oMemberController = &getController('member'); - $oDocumentModel = &getModel('document'); - - $logged_info = Context::get('logged_info'); - - $title = cut_str($message_content,10,'...'); - $sender_member_srl = $logged_info->member_srl; - - for($i=0;$i<$document_srl_count;$i++) { - $document_srl = $document_srl_list[$i]; - $oDocument = $oDocumentModel->getDocument($document_srl); - if(!$oDocument->get('member_srl') || $oDocument->get('member_srl')==$sender_member_srl) continue; - - if($type=='move') $purl = sprintf("%s", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl()); - else $purl = ""; - $content .= sprintf("
%s

%s
%s
%s",$message_content, $purl, $oDocument->getTitleText(), $oDocument->getContent()); - - $oMemberController->sendMessage($sender_member_srl, $oDocument->get('member_srl'), $title, $content, false); - } - } - - if($type == 'move') { - $oDocumentAdminController = &getAdminController('document'); - if(!$module_srl) return new Object(-1, 'fail_to_move'); - else { - $output = $oDocumentAdminController->moveDocumentModule($document_srl_list, $module_srl, $this->module_srl); - if(!$output->toBool()) return new Object(-1, 'fail_to_move'); - $msg_code = 'success_moved'; - $_SESSION['document_management'] = null; - } - - } elseif($type =='delete') { - $oDB = &DB::getInstance(); - $oDB->begin(); - $oDocumentController = &getController('document'); - for($i=0;$i<$document_srl_count;$i++) { - $document_srl = $document_srl_list[$i]; - $output = $oDocumentController->deleteDocument($document_srl, true); - if(!$output->toBool()) return new Object(-1, 'fail_to_delete'); - } - $oDB->commit(); - $msg_code = 'success_deleted'; - $_SESSION['document_management'] = null; - } - - $this->setMessage($msg_code); - } - /** * @brief 권한 추가 **/ diff --git a/modules/board/board.admin.view.php b/modules/board/board.admin.view.php index 4f0d270db..0ad07286a 100644 --- a/modules/board/board.admin.view.php +++ b/modules/board/board.admin.view.php @@ -209,33 +209,5 @@ $this->setTemplateFile('grant_list'); } - - /** - * @brief 선택한 목록 출력 - **/ - function dispBoardAdminManageDocument() { - // 선택한 목록을 세션에서 가져옴 - $flag_list = $_SESSION['document_management'][$this->module_srl]; - - // 목록이 있으면 게시글을 가져옴 - if(count($flag_list)) $document_srl_list = array_keys($flag_list); - if(is_array($document_srl_list) && count($document_srl_list)) { - $oDocumentModel = &getModel('document'); - $document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin); - Context::set('document_list', $document_list); - } - - // 게시판의 목록을 가져옴 - $output = executeQuery('board.getAllBoard', $args); - $board_list = $output->data; - if($board_list && !is_array($board_list)) $board_list = array($board_list); - Context::set('board_list', $board_list); - - // 팝업 레이아웃 선택 - $this->setLayoutPath('./common/tpl'); - $this->setLayoutFile('popup_layout'); - - $this->setTemplateFile('checked_list'); - } } ?> diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 81d28955b..a97638159 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -156,11 +156,6 @@ Context::set('document_list', $output->data); Context::set('page_navigation', $output->page_navigation); - // 관리자일 경우 체크한 문서들의 목록을 세팅 - if($this->grant->is_admin) { - Context::set('check_list',$_SESSION['document_management'][$this->module_srl]); - } - $this->setTemplateFile('list'); } diff --git a/modules/board/conf/module.xml b/modules/board/conf/module.xml index 62faafb6b..3f4280aaa 100644 --- a/modules/board/conf/module.xml +++ b/modules/board/conf/module.xml @@ -67,13 +67,11 @@ - - @@ -103,15 +101,12 @@ - - - diff --git a/modules/board/lang/en.lang.php b/modules/board/lang/en.lang.php index bbedb7395..7bed1c139 100644 --- a/modules/board/lang/en.lang.php +++ b/modules/board/lang/en.lang.php @@ -11,7 +11,6 @@ $lang->cmd_board_list = 'Board list'; $lang->cmd_module_config = 'Common board setting'; $lang->cmd_view_info = 'Board info'; - $lang->move_target_module = "Target module for changing position"; $lang->about_board = "This module is for creating and managing boards.\nSelect the module's name from the list after creating one to configurate specifically.\nBe careful with board's module name, since it will be the url. (ex : http://domain/zb/?mid=modulename)"; ?> diff --git a/modules/board/lang/es.lang.php b/modules/board/lang/es.lang.php index eaa50f823..5615a0be2 100644 --- a/modules/board/lang/es.lang.php +++ b/modules/board/lang/es.lang.php @@ -11,7 +11,6 @@ $lang->cmd_board_list = 'Lista del tableros'; $lang->cmd_module_config = 'Configuración común del Tablero'; $lang->cmd_view_info = 'Información del Tablero'; - $lang->move_target_module = "Módulo para cambiar de posición"; $lang->about_board = "Este módulo es para crear y manejar los tableros.\nLuego de crear un Tablero, seleciona el nombre del módulo para la configuración más detallada.\nSea cuidadoso con el nombre del módulo, ya que ese nombre va a ser la dirección URL. (ej : http://dominio/zb/?mid=nombre del módulo)"; ?> diff --git a/modules/board/lang/jp.lang.php b/modules/board/lang/jp.lang.php index 1ea144b4f..d07d9aaa1 100644 --- a/modules/board/lang/jp.lang.php +++ b/modules/board/lang/jp.lang.php @@ -11,7 +11,6 @@ $lang->cmd_board_list = '掲示板リスト'; $lang->cmd_module_config = '掲示板共通設定'; $lang->cmd_view_info = '掲示板情報'; - $lang->move_target_module = "移動対象モジュール"; $lang->about_board = "掲示板を生成、管理できる掲示板モジュールです。生成後、リストからモジュール名を選択すると詳細な設定ができます。掲示板のモジュール名はURLになりますので注意してください。 (ex : http://ドメイン/zb/?mid=モジュール名)"; ?> diff --git a/modules/board/lang/ko.lang.php b/modules/board/lang/ko.lang.php index 3a1e1070f..22dae66e2 100644 --- a/modules/board/lang/ko.lang.php +++ b/modules/board/lang/ko.lang.php @@ -11,7 +11,6 @@ $lang->cmd_board_list = '게시판 목록'; $lang->cmd_module_config = '게시판 공통 설정'; $lang->cmd_view_info = '게시판 정보'; - $lang->move_target_module = "이동 대상 모듈"; $lang->about_board = "게시판을 생성하고 관리할 수 있는 게시판 모듈입니다.\n생성하신 후 목록에서 모듈이름을 선택하시면 자세한 설정이 가능합니다.\n게시판의 모듈이름은 접속 url이 되므로 신중하게 입력해주세요. (ex : http://도메인/zb/?mid=모듈이름)"; ?> diff --git a/modules/board/lang/zh-CN.lang.php b/modules/board/lang/zh-CN.lang.php index 91f16a674..dcb4f61e6 100644 --- a/modules/board/lang/zh-CN.lang.php +++ b/modules/board/lang/zh-CN.lang.php @@ -11,7 +11,6 @@ $lang->cmd_board_list = '版面目录'; $lang->cmd_module_config = '版面共同设置'; $lang->cmd_view_info = '版面信息'; - $lang->move_target_module = "移动目标模块"; $lang->about_board = "可生成,管理版面的模块。\n生成版面后,点击模块名即可对其详细设置。"; ?> diff --git a/modules/board/skins/xe_gallery/css/common.css b/modules/board/skins/xe_gallery/css/common.css index 78eedb5cb..80a592e2f 100644 --- a/modules/board/skins/xe_gallery/css/common.css +++ b/modules/board/skins/xe_gallery/css/common.css @@ -40,12 +40,11 @@ Jeong, Chan Myeong 070601~070630 .boardList tr.bg2 { background:#fbfbfb;} .boardList th a { color:#3e3f3e; text-decoration:none; } .boardList th.num { background-position:-3px bottom; border-left:1px solid #ffffff; } -.boardList th.title { text-align:center; } -.boardList th.category { text-align:center; } +.boardList th.title { text-align:left; padding-left:2em;} +.boardList th.category { text-align:left; padding-left:2em;} .boardList th.title select { vertical-align:middle; margin-left:.5em; } .boardList th.reading { white-space:nowrap;} .boardList th.recommend { white-space:nowrap;} -.boardList th.date { border-right:1px solid #ffffff;} .boardList th .sort { padding:0 .2em; vertical-align:middle;} .boardList td { border-top:1px solid #eff0ed; padding:.5em;} .boardList td.num { font:.8em tahoma; color:#999999; padding:.5em 1em; text-align:center;} @@ -77,19 +76,20 @@ Jeong, Chan Myeong 070601~070630 .boardList td .thumbnailMedium { margin:0 .3em 0 .3em;} .boardList td .thumbnailMedium img { border:1px solid #e0e1db; padding:3px;} -.boardList.thumbnail { margin-top:-1px; border-bottom:none;} -.boardList.thumbnail td { border-top:none; border-bottom:1px solid #eff0ed; padding:1.5em 0 0 1.5em; overflow:hidden;} -.boardList.thumbnail div.cell { float:left; width:167px; height:220px; overflow:hidden; margin:0 1.5em 0 0; padding-bottom:1.5em;} -.boardList.thumbnail div.cell img.thumb { padding:2px; border:1px solid #e0e1db; display:block; margin-bottom:1em;} -.boardList.thumbnail div.title { color:#444444; margin-bottom:.2em; padding-left:3px; overflow:hidden; white-space:nowrap;} -.boardList.thumbnail div.title a { color:#444444; text-decoration:none;} -.boardList.thumbnail div.nameAndDate { font-size:.9em; color:#999999; margin-bottom:.2em; padding-left:3px;} -.boardList.thumbnail div.nameAndDate a { color:#999999;} -.boardList.thumbnail div.nameAndDate .date { font:.8em Tahoma; color:#999999;} -.boardList.thumbnail div.readAndRecommend { font-size:.9em; color:#666666; padding-left:3px;} -.boardList.thumbnail div.readAndRecommend .num { font:.8em Tahoma;} -.boardList.thumbnail div.readAndRecommend .vr { color:#dddddd;} -.boardList.thumbnail div.readAndRecommend strong.num { font:bold .8em Tahoma; color:#ff6600;} +.thumbnailBox { border-top:none; border-bottom:1px solid #eff0ed; padding:1.5em 0 0 1.5em; overflow:hidden; padding-bottom:1em;} +.thumbnailBox div.cell { display:block; float:left; overflow:hidden; margin-bottom:1em;} +.thumbnailBox div.cell img.thumb { padding:2px; border:1px solid #e0e1db; display:block; margin-bottom:1em; margin-left:auto;margin-right:auto;} +.thumbnailBox div.title { color:#3B96C0; margin-bottom:.2em; overflow:hidden; white-space:nowrap; text-align:center;} +.thumbnailBox div.title a { color:#3B96C0; text-decoration:none;} +.thumbnailBox div.nameAndDate { font-size:.9em; color:#999999; margin-bottom:.2em; text-align:center;} +.thumbnailBox div.nameAndDate a { color:#999999;} +.thumbnailBox div.nameAndDate .author { margin-left:auto; margin-right:right; } +.thumbnailBox div.nameAndDate .author div { display:inline; vertical-align:middle;} +.thumbnailBox div.nameAndDate .date { font:.8em Tahoma; color:#999999;} +.thumbnailBox div.readAndRecommend { font-size:.9em; color:#666666; text-align:center;} +.thumbnailBox div.readAndRecommend .num { font:.8em Tahoma;} +.thumbnailBox div.readAndRecommend .vr { color:#dddddd;} +.thumbnailBox div.readAndRecommend strong.num { font:bold .8em Tahoma; color:#ff6600;} /* pageNavigation */ .pageNavigation { display:block; padding:1.5em 0 2em 0; text-align:center; font:bold 11px Tahoma; } diff --git a/modules/board/skins/xe_gallery/js/board.js b/modules/board/skins/xe_gallery/js/board.js index 9044d6484..81c8d2099 100644 --- a/modules/board/skins/xe_gallery/js/board.js +++ b/modules/board/skins/xe_gallery/js/board.js @@ -4,19 +4,6 @@ * @brief board 모듈의 javascript **/ -/* 관리자가 카트 선택시 세션에 넣음 */ -function doAddCart(mid, obj) { - var srl = obj.value; - var check_flag = obj.checked?'add':'remove'; - - var params = new Array(); - params["mid"] = mid; - params["srl"] = srl; - params["check_flag"] = check_flag; - - exec_xml("board","procBoardAdminAddCart", params, null); -} - /* 글쓰기 작성후 */ function completeDocumentInserted(ret_obj) { var error = ret_obj['error']; diff --git a/modules/board/skins/xe_gallery/list.html b/modules/board/skins/xe_gallery/list.html index 9edf2d6ec..1dce07363 100644 --- a/modules/board/skins/xe_gallery/list.html +++ b/modules/board/skins/xe_gallery/list.html @@ -10,17 +10,21 @@ - - + +
+ - - - + + + + - + - + - + + @@ -58,7 +62,11 @@ - - - + + + + @@ -84,55 +93,59 @@
+ + + + - - {$lang->title} @@ -42,11 +45,12 @@ {@ $order_type = "desc"; } - {$lang->readed_count}{$lang->readed_count}{$lang->voted_count}{$lang->voted_count}{$lang->date}{$lang->date}{$lang->last_update}
{$lang->notice} - document_srl])-->checked="checked" /> + isCarted())-->checked="checked" /> + + + + {$category_list[$document->get('category_srl')]->title} {$document->getTitleText($module_info->subject_cut_size)} @@ -73,9 +81,10 @@ {$document->printExtraImages(60*60*$module_info->duration_new)} {$document->get('readed_count')}{$document->get('voted_count')}{$document->getRegdate('Y-m-d')}{$document->get('readed_count')}{$document->get('voted_count')}{$document->getRegdate('Y-m-d')}{zdate($document->get('last_update'),'Y-m-d H:i')}
- - - - - - -
- - +{@ $height = $module_info->thumbnail_height + 40; } +{@ $height += 25 } +{@ $height += 25 } -
- - - - - -
- - document_srl])-->checked="checked" /> - - - {$document->getTitleText($module_info->subject_cut_size)} - - {$document->getTitleText(8,'')} - +
- - ({$document->getCommentCount()}) - + + - - [{$document->getTrackbackCount()}] - - -
-
{$document->getNickName()}
-
{$document->getRegdate('Y.m.d')}
-
-
-
- {$lang->readed_count} {$document->get('readed_count')} - | {$lang->voted_count} {$document->get('voted_count')} -
-
+
+ + + + + +
+ + {$category_list[$document->get('category_srl')]->title}
+ + + isCarted())-->checked="checked" /> -
+ + {$document->getTitleText($module_info->subject_cut_size)} + + + ({$document->getCommentCount()}) + + + + [{$document->getTrackbackCount()}] + + +
+
{$document->getNickName()}
+
{$document->getRegdate('Y.m.d')}
+
+ +
+ {$lang->readed_count} {$document->get('readed_count')} + + | + {$lang->voted_count} {$document->get('voted_count')} + +
+ + + + +
@@ -148,7 +161,7 @@ diff --git a/modules/board/skins/xe_gallery/skin.xml b/modules/board/skins/xe_gallery/skin.xml index aae0f36af..a24f95e64 100644 --- a/modules/board/skins/xe_gallery/skin.xml +++ b/modules/board/skins/xe_gallery/skin.xml @@ -131,5 +131,50 @@ 썸네일의 세로 크기를 지정할 수 있습니다. (기본 100px) 100 + + 글쓴이 표시 + 投稿者表示 + 显示昵称 + Display Author + Y + N + + + + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Y + N + + + + 조회수 표시 + 照合数表示 + 显示查看数 + Display Hit + Y + N + + + + 추천수 표시 + 推薦数表示 + 显示推荐数 + Display Votes + Y + N + + + + 최근 변경시간 표시 + 最近の変更時間表示 + 显示最后更新时间 + Display Latest Update + N + Y + + diff --git a/modules/board/skins/xe_list/css/common.css b/modules/board/skins/xe_list/css/common.css index cd593eec0..521575f3a 100644 --- a/modules/board/skins/xe_list/css/common.css +++ b/modules/board/skins/xe_list/css/common.css @@ -40,8 +40,8 @@ Jeong, Chan Myeong 070601~070630 .boardList tr.bg2 { background:#fbfbfb;} .boardList th a { color:#3e3f3e; text-decoration:none; } .boardList th.num { background-position:-3px bottom; border-left:1px solid #ffffff; } -.boardList th.title { text-align:center; } -.boardList th.category { text-align:center; } +.boardList th.title { text-align:center; padding-left:1em; } +.boardList th.category { text-align:left; padding-left:1em; } .boardList th.title select { vertical-align:middle; margin-left:.5em; } .boardList th.reading { white-space:nowrap;} .boardList th.recommend { white-space:nowrap;} diff --git a/modules/board/skins/xe_list/js/board.js b/modules/board/skins/xe_list/js/board.js index 9044d6484..81c8d2099 100644 --- a/modules/board/skins/xe_list/js/board.js +++ b/modules/board/skins/xe_list/js/board.js @@ -4,19 +4,6 @@ * @brief board 모듈의 javascript **/ -/* 관리자가 카트 선택시 세션에 넣음 */ -function doAddCart(mid, obj) { - var srl = obj.value; - var check_flag = obj.checked?'add':'remove'; - - var params = new Array(); - params["mid"] = mid; - params["srl"] = srl; - params["check_flag"] = check_flag; - - exec_xml("board","procBoardAdminAddCart", params, null); -} - /* 글쓰기 작성후 */ function completeDocumentInserted(ret_obj) { var error = ret_obj['error']; diff --git a/modules/board/skins/xe_list/list.html b/modules/board/skins/xe_list/list.html index d69be8e9a..e9ace165a 100644 --- a/modules/board/skins/xe_list/list.html +++ b/modules/board/skins/xe_list/list.html @@ -10,21 +10,26 @@ - - - - - - - - + + +
+ + + + + + + - -
{$lang->no} + + + + + - - {$lang->title} @@ -83,7 +87,7 @@ - document_srl])-->checked="checked" /> + isCarted())-->checked="checked" /> @@ -114,7 +118,8 @@
+ +
@@ -130,7 +135,7 @@ diff --git a/modules/board/skins/xe_webzine/css/common.css b/modules/board/skins/xe_webzine/css/common.css index ce6f5e9f0..57fc2a75e 100644 --- a/modules/board/skins/xe_webzine/css/common.css +++ b/modules/board/skins/xe_webzine/css/common.css @@ -39,21 +39,19 @@ Jeong, Chan Myeong 070601~070630 .boardList tr.bg1 { background:#ffffff} .boardList tr.bg2 { background:#fbfbfb;} .boardList th a { color:#3e3f3e; text-decoration:none; } -.boardList th.num, .boardList th.title, -.boardList th.category_title, +.boardList th.category, +.boardList th.num, .boardList th.reading, .boardList th.recommend, .boardList th.author, .boardList th.date { border-bottom:1px solid #e0e1db; padding:.5em;} .boardList th.num { background-position:-3px bottom; border-left:1px solid #ffffff; } -.boardList th.title { text-align:center; } -.boardList th.category_title { text-align:left; padding-left:10px;} -.boardList th.category_title select { vertical-align:middle; width:200px; } +.boardList th.title { text-align:center; padding-left:1em;} +.boardList th.category { text-align:left; padding-left:1em;} .boardList th.reading { white-space:nowrap;} .boardList th.recommend { white-space:nowrap;} -.boardList th.date { border-right:1px solid #ffffff;} .boardList th .sort { padding:0 .2em; vertical-align:middle;} .boardList td { border-bottom:1px solid #eff0ed; padding:.5em;} .boardList td.num { font:.8em tahoma; color:#999999; padding:.5em 1em; text-align:center;} @@ -61,7 +59,7 @@ Jeong, Chan Myeong 070601~070630 .boardList tr.notice td.notice { font-size:.9em; color:#999999; font-weight:bold; text-align:center;} .boardList td.thumb { padding:8px; width:145px; table-layout:fixed; white-space:nowrap;} .boardList td.thumb * { vertical-align:middle;} -.boardList td.title {padding-left:1em; } +.boardList td.title {padding-left:1em; height:1em; border-bottom:none;} .boardList td.title strong.category { font-size:1em; background:url(../images/common/line_1x10_e0e0e0.gif) no-repeat right 3px; padding-right:.5em; margin-right:.5em;} .boardList td.title.bold { font-size:1.2em; font-weight:bold;} .boardList td.title.bold a { position:relative; top:.3em;} @@ -73,7 +71,7 @@ Jeong, Chan Myeong 070601~070630 .boardList td.author a { font-size:1em; color:#333333;} .boardList td.reading { font:.8em Tahoma; color:#999999; text-align:center;} .boardList td.date { font:.8em Tahoma; color:#999999; text-align:center; white-space:nowrap;} -.boardList td.summary { border-top:none; vertical-align:top; color:#666666; line-height:1.25em; padding-left:20px;} +.boardList td.summary { border-top:none; vertical-align:top; color:#666666; line-height:1.25em; padding-left:1em;} .boardList td.summary a { color:#666666; text-decoration:none; line-height:inherit;} .boardList td.summary a:visited { color:#999999;} .boardList td input { _margin:-3px;} diff --git a/modules/board/skins/xe_webzine/js/board.js b/modules/board/skins/xe_webzine/js/board.js index 9044d6484..81c8d2099 100644 --- a/modules/board/skins/xe_webzine/js/board.js +++ b/modules/board/skins/xe_webzine/js/board.js @@ -4,19 +4,6 @@ * @brief board 모듈의 javascript **/ -/* 관리자가 카트 선택시 세션에 넣음 */ -function doAddCart(mid, obj) { - var srl = obj.value; - var check_flag = obj.checked?'add':'remove'; - - var params = new Array(); - params["mid"] = mid; - params["srl"] = srl; - params["check_flag"] = check_flag; - - exec_xml("board","procBoardAdminAddCart", params, null); -} - /* 글쓰기 작성후 */ function completeDocumentInserted(ret_obj) { var error = ret_obj['error']; diff --git a/modules/board/skins/xe_webzine/list.html b/modules/board/skins/xe_webzine/list.html index 7ac609d04..6f3311deb 100644 --- a/modules/board/skins/xe_webzine/list.html +++ b/modules/board/skins/xe_webzine/list.html @@ -10,20 +10,25 @@ - - - - - - - - + +
+ + + + + + + + - - + - + {@ $order_icon = "buttonDescending.gif" } @@ -46,11 +50,13 @@ {@ $order_type = "desc"; } - + - + - + + + @@ -58,7 +64,7 @@ - @@ -69,10 +75,10 @@ - + - - - - + + + + + - + + - - - - + + + + + - {@ $_col_count = 5} + {@ $_col_count = 7} - {@ $_col_count = 6} + {@ $_col_count = 8} + + {@ $_col_count --; } + {@ $_col_count --; } + {@ $_col_count --; } + {@ $_col_count --; } + {@ $_col_count --; } + {@ $_col_count --; } - + -
{$lang->no} + {$lang->no} + + + + - - {$lang->title} {$lang->writer}{$lang->writer} {$lang->readed_count}{$lang->readed_count}{$lang->voted_count}{$lang->voted_count}{$lang->date}{$lang->date}{$lang->last_update}
+ {$lang->no_documents}
{$lang->notice}{$lang->notice} - document_srl])-->checked="checked" /> + isCarted())-->checked="checked" /> {$category_list[$document->get('category_srl')]->title} @@ -90,17 +96,19 @@ {$document->printExtraImages(60*60*$module_info->duration_new)}
{$document->getNickName()}
{$document->get('readed_count')}{$document->get('voted_count')}{$document->getRegdate('Y-m-d')}
{$document->getNickName()}
{$document->get('readed_count')>0?$document->get('readed_count'):' '}{$document->get('voted_count')>0?$document->get('voted_count'):' '}{$document->getRegdate('Y-m-d')}{zdate($document->get('last_update'),'Y-m-d H:i')}
{$no}{$no} @@ -109,7 +117,7 @@ - document_srl])-->checked="checked" /> + isCarted())-->checked="checked" /> {$category_list[$document->get('category_srl')]->title} @@ -126,23 +134,32 @@ {$document->printExtraImages(60*60*$module_info->duration_new)}
{$document->getNickName()}
{$document->get('readed_count')}{$document->get('voted_count')}{$document->getRegdate('Y-m-d')}
{$document->getNickName()}
{$document->get('readed_count')>0?$document->get('readed_count'):' '}{$document->get('voted_count')>0?$document->get('voted_count'):' '}{$document->getRegdate('Y-m-d')}{zdate($document->get('last_update'),'Y-m-d H:i')}
{$document->getSummary(120)}{$document->getSummary(120)} 
+ +
@@ -158,7 +175,7 @@ diff --git a/modules/board/skins/xe_webzine/skin.xml b/modules/board/skins/xe_webzine/skin.xml index b93032232..222e38df0 100644 --- a/modules/board/skins/xe_webzine/skin.xml +++ b/modules/board/skins/xe_webzine/skin.xml @@ -140,5 +140,59 @@ 썸네일의 세로 크기를 지정할 수 있습니다. (기본 100px) 100 + + 번호 표시 + 番号表示 + 显示编号 + Dispay Number + Y + N + + + + 글쓴이 표시 + 投稿者表示 + 显示昵称 + Display Author + Y + N + + + + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + Y + N + + + + 조회수 표시 + 照合数表示 + 显示查看数 + Display Hit + Y + N + + + + 추천수 표시 + 推薦数表示 + 显示推荐数 + Display Votes + Y + N + + + + 최근 변경시간 표시 + 最近の変更時間表示 + 显示最后更新时间 + Display Latest Update + N + Y + + diff --git a/modules/board/tpl/checked_list.html b/modules/board/tpl/checked_list.html deleted file mode 100644 index e4ec76628..000000000 --- a/modules/board/tpl/checked_list.html +++ /dev/null @@ -1,53 +0,0 @@ - - - -
-

{$lang->cmd_manage_document}

-
- -
- - - -
- - - - - - - - - - - - - - - - - -
{count($document_list)}
{$lang->move_target_module} - -
{$lang->cmd_send_message} - -
-
- - - -
diff --git a/modules/board/tpl/js/board_admin.js b/modules/board/tpl/js/board_admin.js index 48c4c43a1..3251dcdb6 100644 --- a/modules/board/tpl/js/board_admin.js +++ b/modules/board/tpl/js/board_admin.js @@ -100,17 +100,3 @@ function doChangeCategory(fo_obj) { return true; } -/* 선택된 글의 삭제 또는 이동 */ -function doManageDocument(type, mid) { - var fo_obj = xGetElementById("fo_management"); - fo_obj.type.value = type; - - procFilter(fo_obj, manage_checked_document); -} - -/* 선택된 글의 삭제 또는 이동 후 */ -function completeManageDocument(ret_obj) { - if(opener) opener.location.href = opener.location.href; - alert(ret_obj['message']); - window.close(); -} diff --git a/modules/document/conf/module.xml b/modules/document/conf/module.xml index 32832cd11..a67a9d408 100644 --- a/modules/document/conf/module.xml +++ b/modules/document/conf/module.xml @@ -1,6 +1,12 @@ + + + + + + @@ -8,6 +14,13 @@ + + + + + + + diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php index b7fd9adae..853399e66 100644 --- a/modules/document/document.admin.controller.php +++ b/modules/document/document.admin.controller.php @@ -36,25 +36,134 @@ $this->setMessage( sprintf(Context::getLang('msg_checked_document_is_deleted'), $document_count) ); } + /** + * @brief 관리자가 글 선택시 세션에 담음 + **/ + function procDocumentAdminAddCart() { + $document_srl = Context::get('srl'); + + $oDocumentModel = &getModel('document'); + $oDocument = $oDocumentModel->getDocument($document_srl); + if(!$oDocument->isExists()) return; + + $oDocument->doCart(); + } + + /** + * @brief 세션에 담긴 선택글의 이동/ 삭제 + **/ + function procDocumentAdminManageCheckedDocument() { + $type = Context::get('type'); + $module_srl = Context::get('target_module'); + $category_srl = Context::get('target_category'); + $message_content = Context::get('message_content'); + if($message_content) $message_content = nl2br($message_content); + + $cart = Context::get('cart'); + if($cart) $document_srl_list = explode('|@|', $cart); + else $document_srl_list = array(); + + $document_srl_count = count($document_srl_list); + + // 쪽지 발송 + if($message_content) { + + $oMemberController = &getController('member'); + $oDocumentModel = &getModel('document'); + + $logged_info = Context::get('logged_info'); + + $title = cut_str($message_content,10,'...'); + $sender_member_srl = $logged_info->member_srl; + + for($i=0;$i<$document_srl_count;$i++) { + $document_srl = $document_srl_list[$i]; + $oDocument = $oDocumentModel->getDocument($document_srl); + if(!$oDocument->get('member_srl') || $oDocument->get('member_srl')==$sender_member_srl) continue; + + if($type=='move') $purl = sprintf("%s", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl()); + else $purl = ""; + $content .= sprintf("
%s

%s
%s
%s",$message_content, $purl, $oDocument->getTitleText(), $oDocument->getContent()); + + $oMemberController->sendMessage($sender_member_srl, $oDocument->get('member_srl'), $title, $content, false); + } + } + + if($type == 'move') { + if(!$module_srl) return new Object(-1, 'fail_to_move'); + + $output = $this->moveDocumentModule($document_srl_list, $module_srl, $category_srl); + if(!$output->toBool()) return new Object(-1, 'fail_to_move'); + + $msg_code = 'success_moved'; + + } elseif($type == 'copy') { + if(!$module_srl) return new Object(-1, 'fail_to_move'); + + $output = $this->copyDocumentModule($document_srl_list, $module_srl, $category_srl); + if(!$output->toBool()) return new Object(-1, 'fail_to_move'); + + $msg_code = 'success_registed'; + + } elseif($type =='delete') { + $oDB = &DB::getInstance(); + $oDB->begin(); + $oDocumentController = &getController('document'); + for($i=0;$i<$document_srl_count;$i++) { + $document_srl = $document_srl_list[$i]; + $output = $oDocumentController->deleteDocument($document_srl, true); + if(!$output->toBool()) return new Object(-1, 'fail_to_delete'); + } + $oDB->commit(); + $msg_code = 'success_deleted'; + } + + $_SESSION['document_management'] = array(); + + $this->setMessage($msg_code); + } + /** * @brief 특정 게시물들의 소속 모듈 변경 (게시글 이동시에 사용) **/ - function moveDocumentModule($document_srl_list, $module_srl, $source_module_srl) { + function moveDocumentModule($document_srl_list, $module_srl, $category_srl) { if(!count($document_srl_list)) return; - $args->document_srls = implode(',',$document_srl_list); - $args->module_srl = $module_srl; + $oDocumentModel = &getModel('document'); + $oDocumentController = &getController('document'); $oDB = &DB::getInstance(); $oDB->begin(); - // 게시물의 이동 - $output = executeQuery('document.updateDocumentModule', $args); - if(!$output->toBool()) { - $oDB->rollback(); - return $output; + for($i=0;$igetDocument($document_srl); + if(!$oDocument->isExists()) continue; + + $source_category_srl = $oDocument->get('category_srl'); + + unset($document_args); + $document_args->module_srl = $module_srl; + $document_args->category_srl = $category_srl; + $document_args->document_srl = $document_srl; + + // 게시물의 모듈 이동 + $output = executeQuery('document.updateDocumentModule', $document_args); + if(!$output->toBool()) { + $oDB->rollback(); + return $output; + } + + // 카테고리가 변경되었으면 검사후 없는 카테고리면 0으로 세팅 + if($source_category_srl != $category_srl) { + if($source_category_srl) $oDocumentController->updateCategoryCount($source_category_srl); + if($category_srl) $oDocumentController->updateCategoryCount($category_srl); + } } + $args->document_srls = implode(',',$document_srl_list); + $args->module_srl = $module_srl; + // 댓글의 이동 $output = executeQuery('comment.updateCommentModule', $args); if(!$output->toBool()) { @@ -75,31 +184,53 @@ $oDB->rollback(); return $output; } + + $oDB->commit(); + return new Object(); + } - // 첨부파일의 이동 (다운로드나 본문 첨부의 문제로 인하여 첨부파일은 이동하지 않기로 결정. 차후에 다시 고민) - /* - $image_dir = sprintf('./files/attach/images/%s/%s/', $source_module_srl, $document_srl); - $binary_dir = sprintf('./files/attach/binaries/%s/%s/', $source_module_srl, $document_srl); + /** + * @brief 게시글의 복사 + **/ + function copyDocumentModule($document_srl_list, $module_srl, $category_srl) { + if(!count($document_srl_list)) return; - $target_image_dir = sprintf('./files/attach/images/%s/%s/', $module_srl, $document_srl); - $target_binary_dir = sprintf('./files/attach/binaries/%s/%s/', $module_srl, $document_srl); + $oDocumentModel = &getModel('document'); + $oDocumentController = &getController('document'); + $oFileController = &getController('file'); - if(is_dir($image_dir)) { - FileHandler::moveDir($image_dir, $target_image_dir); - if(!is_dir($target_image_dir)) { + $oDB = &DB::getInstance(); + $oDB->begin(); + + for($i=0;$igetDocument($document_srl); + if(!$oDocument->isExists()) continue; + + $obj = null; + $obj = $oDocument->getObjectVars(); + $obj->document_srl = getNextSequence(); + $obj->category_srl = $category_srl; + $obj->password_is_hashed = true; + + // 첨부파일 미리 등록 + if($oDocument->hasUploadedFiles()) { + $files = $oDocument->getUploadedFiles(); + foreach($files as $key => $val) { + $file_info = array(); + $file_info['tmp_name'] = $val->uploaded_filename; + $file_info['name'] = $val->source_filename; + $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, 0, true); + } + } + + // 글의 등록 + $output = $oDocumentController->insertDocument($obj, true); + if(!$output->toBool()) { $oDB->rollback(); - return new Object(-1,'fail'); + return $output; } } - - if(is_dir($binary_dir)) { - FileHandler::moveDir($binary_dir, $target_binary_dir); - if(!is_dir($target_binary_dir)) { - $oDB->rollback(); - return new Object(-1,'fail'); - } - } - */ $oDB->commit(); return new Object(); @@ -292,5 +423,6 @@ } $directory->close(); } + } ?> diff --git a/modules/document/document.admin.view.php b/modules/document/document.admin.view.php index 190168522..7d58e2321 100644 --- a/modules/document/document.admin.view.php +++ b/modules/document/document.admin.view.php @@ -90,5 +90,40 @@ $this->setTemplateFile('document_config'); } + /** + * @brief 관리자가 선택한 문서에 대한 관리 + **/ + function dispDocumentAdminManageDocument() { + // 선택한 목록을 세션에서 가져옴 + $flag_list = $_SESSION['document_management']; + if(count($flag_list)) { + foreach($flag_list as $key => $val) { + if(!is_bool($val)) continue; + $document_srl_list[] = $key; + } + + } + + if(count($document_srl_list)) { + $oDocumentModel = &getModel('document'); + $document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin); + Context::set('document_list', $document_list); + } + + // 모듈의 목록을 가져옴 + $args->select_module = "'board','blog'"; + $output = executeQuery('document.getAllModules', $args); + $module_list = $output->data; + + if($module_list && !is_array($module_list)) $module_list = array($module_list); + Context::set('module_list', $module_list); + + // 팝업 레이아웃 선택 + $this->setLayoutPath('./common/tpl'); + $this->setLayoutFile('popup_layout'); + + $this->setTemplatePath($this->module_path.'tpl'); + $this->setTemplateFile('checked_list'); + } } ?> diff --git a/modules/document/document.class.php b/modules/document/document.class.php index 13aca99ec..ee4a6e0d3 100644 --- a/modules/document/document.class.php +++ b/modules/document/document.class.php @@ -60,9 +60,10 @@ if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true; /** - * 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가 + * 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가 **/ if(!$oModuleModel->getActionForward('dispDocumentAdminConfig')) return true; + if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument')) return true; return false; } @@ -112,10 +113,12 @@ } /** - * 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가 + * 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가 **/ if(!$oModuleModel->getActionForward('dispDocumentAdminConfig')) $oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig'); + if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument')) + $oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument'); return new Object(0,'success_updated'); } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 39c263238..e8304a02b 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -100,6 +100,23 @@ return $this->get('notify_message')=='Y' ? true : false; } + function doCart() { + if($this->isCarted()) $this->removeCart(); + else $this->addCart(); + } + + function addCart() { + $_SESSION['document_management'][$this->document_srl] = true; + } + + function removeCart() { + unset($_SESSION['document_management'][$this->document_srl]); + } + + function isCarted() { + return $_SESSION['document_management'][$this->document_srl]; + } + function notify($type, $content) { // useNotify가 아니면 return if(!$this->useNotify()) return; diff --git a/modules/document/document.model.php b/modules/document/document.model.php index 64024906e..bf97c5c9b 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -313,6 +313,21 @@ return $output; } + /** + * @brief 특정 모듈의 분류를 구함 + **/ + function getDocumentCategories() { + $module_srl = Context::get('module_srl'); + $categories= $this->getCategoryList($module_srl); + if(!$categories) return; + + $output = ''; + foreach($categories as $category_srl => $category) { + $output .= sprintf("%d,%s\n",$category_srl, $category->title); + } + $this->add('categories', $output); + } + /** * @brief 문서 설정 정보를 구함 **/ diff --git a/modules/document/lang/en.lang.php b/modules/document/lang/en.lang.php index 975aff8a8..5162c806a 100644 --- a/modules/document/lang/en.lang.php +++ b/modules/document/lang/en.lang.php @@ -10,6 +10,7 @@ $lang->thumbnail_crop = 'Crop'; $lang->thumbnail_ratio = 'Ratio'; $lang->cmd_delete_all_thumbnail = 'Delete all thumbnails'; + $lang->move_target_module = "Target module for changing position"; $lang->cmd_toggle_checked_document = '선택항목 반전'; $lang->cmd_delete_checked_document = 'Delete selected'; diff --git a/modules/document/lang/es.lang.php b/modules/document/lang/es.lang.php index 3e580611d..461f01e72 100644 --- a/modules/document/lang/es.lang.php +++ b/modules/document/lang/es.lang.php @@ -10,6 +10,7 @@ $lang->thumbnail_crop = 'Crop'; $lang->thumbnail_ratio = 'Ratio'; $lang->cmd_delete_all_thumbnail = 'Delete all thumbnails'; + $lang->move_target_module = "Módulo para cambiar de posición"; $lang->cmd_toggle_checked_document = '선택항목 반전'; $lang->cmd_delete_checked_document = 'Eliminar lo seleccionado'; diff --git a/modules/document/lang/jp.lang.php b/modules/document/lang/jp.lang.php index 1c13db6f6..b57b37786 100644 --- a/modules/document/lang/jp.lang.php +++ b/modules/document/lang/jp.lang.php @@ -10,6 +10,7 @@ $lang->thumbnail_crop = 'Crop'; $lang->thumbnail_ratio = 'Ratio'; $lang->cmd_delete_all_thumbnail = 'Delete all thumbnails'; + $lang->move_target_module = "移動対象モジュール"; $lang->cmd_toggle_checked_document = '선택항목 반전'; $lang->cmd_delete_checked_document = '選択項目削除'; diff --git a/modules/document/lang/ko.lang.php b/modules/document/lang/ko.lang.php index 4c80823e7..a255efe99 100644 --- a/modules/document/lang/ko.lang.php +++ b/modules/document/lang/ko.lang.php @@ -19,6 +19,8 @@ $lang->msg_is_secret = '비밀글입니다'; $lang->msg_checked_document_is_deleted = '%d개의 글이 삭제되었습니다'; + $lang->move_target_module = "이동 대상 모듈"; + // 관리자 페이지에서 검색할 대상 $lang->search_target_list = array( 'title' => '제목', diff --git a/modules/document/lang/zh-CN.lang.php b/modules/document/lang/zh-CN.lang.php index 98ec06f41..0dddc1374 100644 --- a/modules/document/lang/zh-CN.lang.php +++ b/modules/document/lang/zh-CN.lang.php @@ -10,6 +10,7 @@ $lang->thumbnail_crop = 'Crop'; $lang->thumbnail_ratio = 'Ratio'; $lang->cmd_delete_all_thumbnail = 'Delete all thumbnails'; + $lang->move_target_module = "移动目标模块"; $lang->cmd_toggle_checked_document = '反选'; $lang->cmd_delete_checked_document = '删除所选'; diff --git a/modules/document/queries/getAllModules.xml b/modules/document/queries/getAllModules.xml new file mode 100644 index 000000000..e0a7672fe --- /dev/null +++ b/modules/document/queries/getAllModules.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/modules/document/queries/updateDocumentModule.xml b/modules/document/queries/updateDocumentModule.xml index 5c8f08166..8c8dafd50 100644 --- a/modules/document/queries/updateDocumentModule.xml +++ b/modules/document/queries/updateDocumentModule.xml @@ -4,8 +4,9 @@ + - + diff --git a/modules/document/tpl/checked_list.html b/modules/document/tpl/checked_list.html new file mode 100644 index 000000000..28547e410 --- /dev/null +++ b/modules/document/tpl/checked_list.html @@ -0,0 +1,74 @@ + + + + +
+

{$lang->cmd_manage_document}

+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ + {$lang->cmd_select} +
    + +
  • {$document->getNickName()}
    {$document->getTitle()}
  • + +
+ +   + +
{$lang->move_target_module} + +
{$lang->category} + +
{$lang->cmd_send_message} + +
+
+ + + + + + diff --git a/modules/document/tpl/css/document.css b/modules/document/tpl/css/document.css index 229870652..fec819620 100644 --- a/modules/document/tpl/css/document.css +++ b/modules/document/tpl/css/document.css @@ -1 +1,5 @@ -body { margin:10px; font-size:.75em; font-family:sans-serif;} +.document_list_box { height:300px; overflow-y:scroll; overflow-x:hidden;} +.document_list { margin-top:.5em; overflow:hidden; white-space:nowrap; clear:both;} +.document_list input { float:left; margin-right:10px; } +.document_list address { float:left; width:100px; margin-right:10px; overflow:hidden; white-space:nowrap;} +.document_list .document_title { } diff --git a/modules/document/tpl/filter/manage_checked_document.xml b/modules/document/tpl/filter/manage_checked_document.xml new file mode 100644 index 000000000..0c8383093 --- /dev/null +++ b/modules/document/tpl/filter/manage_checked_document.xml @@ -0,0 +1,7 @@ + +
+ + + + + diff --git a/modules/document/tpl/js/document_admin.js b/modules/document/tpl/js/document_admin.js index b336a97ca..37e472b29 100644 --- a/modules/document/tpl/js/document_admin.js +++ b/modules/document/tpl/js/document_admin.js @@ -19,3 +19,52 @@ function completeDeleteAllThumbnail(ret_obj) { alert(ret_obj['message']); location.reload(); } + +/* 선택된 글의 삭제 또는 이동 */ +function doManageDocument(type, mid) { + var fo_obj = xGetElementById("fo_management"); + fo_obj.type.value = type; + + procFilter(fo_obj, manage_checked_document); +} + +/* 선택된 글의 삭제 또는 이동 후 */ +function completeManageDocument(ret_obj) { + if(opener) opener.location.href = opener.location.href; + alert(ret_obj['message']); + window.close(); +} + +/* 선택된 모듈의 카테고리 목록을 가져오는 함수 */ +function doGetCategoryFromModule(obj) { + var module_srl = obj.options[obj.selectedIndex].value; + + var params = new Array(); + params['module_srl'] = module_srl; + + var response_tags = new Array('error','message','categories'); + + exec_xml('document','getDocumentCategories',params, completeGetCategoryFromModules, response_tags); + +} + +function completeGetCategoryFromModules(ret_obj, response_tags) { + var obj = xGetElementById('target_category'); + var length = obj.options.length; + for(var i=0;i