#127 #152 게시물의 복사 기능 추가 & 이동/복사시 카테고리 지정 가능하도록 변경 & 기본 게시판 스킨에서 페이지의 게시물 토글 기능 추가 & 관리 선택된 게시물의 목록 노출 & 기본 게시판 스킨의 항목 숨김/열람 기능 모두 적용

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2737 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-10-11 09:13:02 +00:00
parent 72dcf54069
commit 14550e198f
41 changed files with 678 additions and 396 deletions

View file

@ -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);
}

View file

@ -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 = '답글이 있어서 삭제할 수 없습니다';

View file

@ -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("<a href=\"%s\" onclick=\"window.open(this.href);return false;\">%s</a>", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl());
else $purl = "";
$content .= sprintf("<div>%s</div><hr />%s<div style=\"font-weight:bold\">%s</div>%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 권한 추가
**/

View file

@ -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');
}
}
?>

View file

@ -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');
}

View file

@ -67,13 +67,11 @@
<permission action="dispBoardAdminBoardInfo" target="manager" />
<permission action="dispBoardAdminSkinInfo" target="manager" />
<permission action="dispBoardAdminCategoryInfo" target="manager" />
<permission action="dispBoardAdminManageDocument" target="manager" />
<permission action="procBoardAdminInsertBoard" target="manager" />
<permission action="procBoardAdminUpdateSkinInfo" target="manager" />
<permission action="procBoardAdminInsertCategory" target="manager" />
<permission action="procBoardAdminUpdateCategory" target="manager" />
<permission action="procBoardAdminManageCheckedDocument" target="manager" />
</permissions>
<actions>
<action name="dispBoardContent" type="view" index="true" />
@ -103,15 +101,12 @@
<action name="dispBoardAdminSkinInfo" type="view" standalone="true" />
<action name="dispBoardAdminCategoryInfo" type="view" standalone="true" />
<action name="dispBoardAdminGrantInfo" type="view" standalone="true" />
<action name="dispBoardAdminManageDocument" type="view" />
<action name="procBoardAdminAddCart" type="controller" standalone="true" />
<action name="procBoardAdminInsertGrant" type="controller" standalone="true" />
<action name="procBoardAdminUpdateSkinInfo" type="controller" standalone="true" />
<action name="procBoardAdminInsertBoard" type="controller" standalone="true" />
<action name="procBoardAdminDeleteBoard" type="controller" standalone="true" />
<action name="procBoardAdminInsertCategory" type="controller" standalone="true" />
<action name="procBoardAdminUpdateCategory" type="controller" standalone="true" />
<action name="procBoardAdminManageCheckedDocument" type="controller" standalone="true" />
</actions>
</module>

View file

@ -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)";
?>

View file

@ -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)";
?>

View file

@ -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=モジュール名)";
?>

View file

@ -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=모듈이름)";
?>

View file

@ -11,7 +11,6 @@
$lang->cmd_board_list = '版面目录';
$lang->cmd_module_config = '版面共同设置';
$lang->cmd_view_info = '版面信息';
$lang->move_target_module = "移动目标模块";
$lang->about_board = "可生成,管理版面的模块。\n生成版面后,点击模块名即可对其详细设置。";
?>

View file

@ -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; }

View file

@ -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'];

View file

@ -10,17 +10,21 @@
<!--@end-->
<!-- 목록 출력 -->
<table cellspacing="0" summary="" class="boardList">
<col width="50" />
<form action="./" method="get">
<table cellspacing="0" summary="" class="boardList">
<col width="80" />
<col />
<col width="90" />
<col width="90" />
<col width="110" />
<!--@if($module_info->display_readed_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_regdate != 'N')--><col width="90" /><!--@end-->
<!--@if($module_info->display_last_update == 'Y')--><col width="90" /><!--@end-->
<thead>
<tr>
<th scope="col" class="title thumbStyle" colspan="2">
<th scope="col" class="<!--@if($module_info->use_category=='Y')-->category<!--@else-->title<!--@end-->" colspan="2">
<!--@if($grant->is_admin)-->
<input type="checkbox" onclick="checkboxSelectAll(this.form, 'cart'); return false;" />
<!--@end-->
<!--@if($module_info->use_category == "Y")-->
<form action="./" method="get">
<select name="category" id="board_category">
<option value="">{$lang->category}</option>
<!--@foreach($category_list as $val)-->
@ -28,7 +32,6 @@
<!--@end-->
</select>
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
</form>
<!--@else-->
{$lang->title}
<!--@end-->
@ -42,11 +45,12 @@
{@ $order_type = "desc"; }
<!--@end-->
<th class="reading" scope="col"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_readed_count!='N')--><th class="reading" scope="col"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<th class="recommend" scope="col"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}<!--@if($sort_index=='voted_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_voted_count!='N')--><th class="recommend" scope="col"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}<!--@if($sort_index=='voted_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<th scope="col" class="date"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}<!--@if($sort_index=='regdate')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_regdate!='N')--><th scope="col" class="date"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}<!--@if($sort_index=='regdate')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<!--@if($module_info->display_last_update=='Y')--><th scope="col" class="date"><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_update}<!--@if($sort_index=='last_update')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
</tr>
</thead>
@ -58,7 +62,11 @@
<td class="num">{$lang->notice}</td>
<td class="title">
<!--@if($grant->is_admin)-->
<input type="checkbox" value="{$document->document_srl}" onclick="doAddCart('{$mid}',this)" <!--@if($check_list[$document->document_srl])-->checked="checked"<!--@end--> />
<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
<!--@end-->
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong class="category">{$category_list[$document->get('category_srl')]->title}</strong>
<!--@end-->
<a href="{getUrl('document_srl',$document->document_srl)}">{$document->getTitleText($module_info->subject_cut_size)}</a>
@ -73,9 +81,10 @@
{$document->printExtraImages(60*60*$module_info->duration_new)}
</td>
<td class="reading">{$document->get('readed_count')}</td>
<td class="recommend">{$document->get('voted_count')}</td>
<td class="date">{$document->getRegdate('Y-m-d')}</td>
<!--@if($module_info->display_readed_count!='N')--><td class="reading">{$document->get('readed_count')}</td><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><td class="recommend">{$document->get('voted_count')}</td><!--@end-->
<!--@if($module_info->display_regdate!='N')--><td class="date">{$document->getRegdate('Y-m-d')}</td><!--@end-->
<!--@if($module_info->display_last_update=='Y')--><td class="date">{zdate($document->get('last_update'),'Y-m-d H:i')}</td><!--@end-->
</tr>
<!--@end-->
@ -84,55 +93,59 @@
</tbody>
</table>
<table cellspacing="0" class="boardList thumbnail">
<tbody>
<tr class="bg1">
<td>
<!--@foreach($document_list as $no => $document)-->
<!--@if(!$document->isNotice())-->
{@ $height = $module_info->thumbnail_height + 40; }
<!--@if($module_info->display_author!='N' || $module_info->display_regdate!='N')-->{@ $height += 25 }<!--@end-->
<!--@if($module_info->display_readed_count !='N' || $module_info->display_voted_count!='N')-->{@ $height += 25 }<!--@end-->
<div class="cell">
<!--@if($document->thumbnailExists($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type))-->
<a href="{getUrl('','document_srl',$document->document_srl)}"><img src="{$document->getThumbnail($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type)}" border="0" alt="" class="thumb"/></a>
<!--@else-->
<img src="./images/blank.gif" border="0" alt="" class="thumb" width="{$module_info->thumbnail_width}" height="{$module_info->thumbnail_height}" />
<!--@end-->
<div class="title">
<!--@if($grant->is_admin)-->
<input type="checkbox" value="{$document->document_srl}" onclick="doAddCart('{$mid}',this)" <!--@if($check_list[$document->document_srl])-->checked="checked"<!--@end--> />
<!--@end-->
<!--@if($grant->view)-->
<a href="{getUrl('document_srl',$document->document_srl)}">{$document->getTitleText($module_info->subject_cut_size)}</a>
<!--@else-->
{$document->getTitleText(8,'')}
<!--@end-->
<div class="thumbnailBox">
<!--@if($document->getCommentCount())-->
<span class="replyAndTrackback" title="Replies">(<strong>{$document->getCommentCount()}</strong>)</span>
<!--@end-->
<!--@foreach($document_list as $no => $document)-->
<!--@if(!$document->isNotice())-->
<!--@if($document->getTrackbackCount())-->
<span class="replyAndTrackback" title="Trackbacks">[<strong>{$document->getTrackbackCount()}</strong>]</span>
<!--@end-->
<div class="nameAndDate">
<div class="author member_{$document->get('member_srl')}">{$document->getNickName()}</div>
<div class="date">{$document->getRegdate('Y.m.d')}</div>
</div>
</div>
<div class="readAndRecommend">
{$lang->readed_count} <span class="num">{$document->get('readed_count')}</span>
<!--@if($document->get('voted_count'))--><span class="vr">|</span> {$lang->voted_count} <strong class="num">{$document->get('voted_count')}</strong><!--@end-->
</div>
</div>
<div class="cell" style="width:{$module_info->thumbnail_width+30}px;height:{$height}px;">
<!--@if($document->thumbnailExists($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type))-->
<a href="{getUrl('','document_srl',$document->document_srl)}"><img src="{$document->getThumbnail($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type)}" border="0" alt="" class="thumb"/></a>
<!--@else-->
<img src="./images/blank.gif" border="0" alt="" class="thumb" width="{$module_info->thumbnail_width}" height="{$module_info->thumbnail_height}" />
<!--@end-->
<div class="title">
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong class="category">{$category_list[$document->get('category_srl')]->title}</strong><br />
<!--@end-->
<!--@if($grant->is_admin)-->
<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
<!--@end-->
</td>
</tr>
</tbody>
</table>
<a href="{getUrl('document_srl',$document->document_srl)}">{$document->getTitleText($module_info->subject_cut_size)}</a>
<!--@if($document->getCommentCount())-->
<span class="replyAndTrackback" title="Replies">(<strong>{$document->getCommentCount()}</strong>)</span>
<!--@end-->
<!--@if($document->getTrackbackCount())-->
<span class="replyAndTrackback" title="Trackbacks">[<strong>{$document->getTrackbackCount()}</strong>]</span>
<!--@end-->
<div class="nameAndDate">
<!--@if($module_info->display_author!='N')--><div class="author"><div class="member_{$document->get('member_srl')}">{$document->getNickName()}</div></div><!--@end-->
<!--@if($module_info->display_regdate!='N')--><div class="date">{$document->getRegdate('Y.m.d')}</div><!--@end-->
</div>
</div>
<div class="readAndRecommend">
<!--@if($module_info->display_readed_count!='N')-->{$lang->readed_count} <span class="num">{$document->get('readed_count')}</span><!--@end-->
<!--@if($document->get('voted_count') && $module_info->display_voted_count!='N')-->
<!--@if($module_info->display_readed_count!='N')--><span class="vr">|</span> <!--@end-->
{$lang->voted_count} <strong class="num">{$document->get('voted_count')}</strong>
<!--@end-->
</div>
</div>
<!--@end-->
<!--@end-->
</div>
</form>
<div class="clear">
@ -148,7 +161,7 @@
<!--@if($grant->is_admin)-->
<!-- 문서 관리 버튼 -->
<div class="gap1 fl">
<a href="{getUrl('act','dispBoardAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
</div>
<!--@end-->

View file

@ -131,5 +131,50 @@
<description xml:lang="ko">썸네일의 세로 크기를 지정할 수 있습니다. (기본 100px)</description>
<default>100</default>
</var>
<var name="display_author" type="select">
<title xml:lang="ko">글쓴이 표시</title>
<title xml:lang="jp">投稿者表示</title>
<title xml:lang="zh-CN">显示昵称</title>
<title xml:lang="en">Display Author</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_regdate" type="select">
<title xml:lang="ko">작성일 표시</title>
<title xml:lang="jp">作成日表示</title>
<title xml:lang="zh-CN">显示发表日期</title>
<title xml:lang="en">Display Registered Date</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_readed_count" type="select">
<title xml:lang="ko">조회수 표시</title>
<title xml:lang="jp">照合数表示</title>
<title xml:lang="zh-CN">显示查看数</title>
<title xml:lang="en">Display Hit</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_voted_count" type="select">
<title xml:lang="ko">추천수 표시</title>
<title xml:lang="jp">推薦数表示</title>
<title xml:lang="zh-CN">显示推荐数</title>
<title xml:lang="en">Display Votes</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_last_update" type="select">
<title xml:lang="ko">최근 변경시간 표시</title>
<title xml:lang="jp">最近の変更時間表示</title>
<title xml:lang="zh-CN">显示最后更新时间</title>
<title xml:lang="en">Display Latest Update</title>
<default>N</default>
<default>Y</default>
<description />
</var>
</extra_vars>
</skin>

View file

@ -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;}

View file

@ -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'];

View file

@ -10,21 +10,26 @@
<!--@end-->
<!-- 목록 출력 -->
<table cellspacing="0" summary="" class="boardList">
<!--@if($module_info->display_number!='N')--><col width="80" /><!--@end-->
<col />
<!--@if($module_info->display_author!='N')--><col width="120" /><!--@end-->
<!--@if($module_info->display_readed_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_regdate != 'N')--><col width="90" /><!--@end-->
<!--@if($module_info->display_last_update == 'Y')--><col width="90" /><!--@end-->
<form action="./" method="get">
<table cellspacing="0" summary="" class="boardList">
<!--@if($module_info->display_number!='N')--><col width="80" /><!--@end-->
<col />
<!--@if($module_info->display_author!='N')--><col width="120" /><!--@end-->
<!--@if($module_info->display_readed_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_regdate != 'N')--><col width="90" /><!--@end-->
<!--@if($module_info->display_last_update == 'Y')--><col width="90" /><!--@end-->
<thead>
<tr>
<!--@if($module_info->display_number!='N')--><th scope="col" class="num">{$lang->no}</th><!--@end-->
<th scope="col" class="title <!--@if($module_info->use_category == 'Y')-->category<!--@end-->">
<th scope="col" class="<!--@if($module_info->use_category == 'Y')-->category<!--@else-->title<!--@end-->">
<!--@if($grant->is_admin)-->
<input type="checkbox" onclick="checkboxSelectAll(this.form, 'cart'); return false;" />
<!--@end-->
<!--@if($module_info->use_category == "Y")-->
<!-- 카테고리 사용시 카테고리 선택 표시 -->
<form action="./" method="get">
<select name="category" id="board_category">
<option value="">{$lang->category}</option>
<!--@foreach($category_list as $val)-->
@ -32,7 +37,6 @@
<!--@end-->
</select>
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
</form>
<!--@else-->
{$lang->title}
<!--@end-->
@ -83,7 +87,7 @@
<td class="title">
<!--@if($grant->is_admin)-->
<input type="checkbox" value="{$document->document_srl}" onclick="doAddCart('{$mid}',this)" <!--@if($check_list[$document->document_srl])-->checked="checked"<!--@end--> />
<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
<!--@end-->
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
@ -114,7 +118,8 @@
</tr>
<!--@end-->
</tbody>
</table>
</table>
</form>
<div class="clear">
@ -130,7 +135,7 @@
<!--@if($grant->is_admin)-->
<!-- 문서 관리 버튼 -->
<div class="gap1 fl">
<a href="{getUrl('act','dispBoardAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
</div>
<!--@end-->

View file

@ -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;}

View file

@ -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'];

View file

@ -10,20 +10,25 @@
<!--@end-->
<!-- 목록 출력 -->
<table cellspacing="0" summary="" class="boardList">
<col width="50" />
<col width="{$module_info->thumbnail_width+20}" />
<col />
<col width="120" />
<col width="60" />
<col width="60" />
<col width="80" />
<form action="./" method="get">
<table cellspacing="0" summary="" class="boardList">
<!--@if($module_info->display_number!='N')--><col width="80" /><!--@end-->
<col width="{$module_info->thumbnail_width+20}" />
<col />
<!--@if($module_info->display_author!='N')--><col width="120" /><!--@end-->
<!--@if($module_info->display_readed_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><col width="70" /><!--@end-->
<!--@if($module_info->display_regdate != 'N')--><col width="90" /><!--@end-->
<!--@if($module_info->display_last_update == 'Y')--><col width="90" /><!--@end-->
<thead>
<tr>
<th scope="col" class="num">{$lang->no}</th>
<th scope="col" colspan="2" class="<!--@if($module_info->use_category=='Y')-->category_title<!--@else-->title<!--@end-->">
<!--@if($module_info->display_number!='N')--><th scope="col" class="num">{$lang->no}</th><!--@end-->
<th scope="col" colspan="2" class="<!--@if($module_info->use_category=='Y')-->category<!--@else-->title<!--@end-->">
<!--@if($grant->is_admin)-->
<input type="checkbox" onclick="checkboxSelectAll(this.form, 'cart'); return false;" />
<!--@end-->
<!--@if($module_info->use_category == "Y")-->
<form action="./" method="get">
<select name="category" id="board_category">
<option value="" >{$lang->category}</option>
<!--@foreach($category_list as $val)-->
@ -31,12 +36,11 @@
<!--@end-->
</select>
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
</form>
<!--@else-->
{$lang->title}
<!--@end-->
</th>
<th class="author" scope="col">{$lang->writer}</th>
<!--@if($module_info->display_author!='N')--><th class="author" scope="col">{$lang->writer}</th><!--@end-->
<!--@if($order_type == "desc")-->
{@ $order_icon = "buttonDescending.gif" }
@ -46,11 +50,13 @@
{@ $order_type = "desc"; }
<!--@end-->
<th class="reading" scope="col"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_readed_count!='N')--><th class="reading" scope="col"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<th class="recommend" scope="col"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}<!--@if($sort_index=='voted_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_voted_count!='N')--><th class="recommend" scope="col"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}<!--@if($sort_index=='voted_count')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<th scope="col" class="date"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}<!--@if($sort_index=='regdate')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
<!--@if($module_info->display_regdate != 'N')--><th scope="col" class="date"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}<!--@if($sort_index=='regdate')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
<!--@if($module_info->display_last_update=='Y')--><th scope="col" class="date"><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_update}<!--@if($sort_index=='last_update')--><img src="./images/common/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th><!--@end-->
</tr>
</thead>
@ -58,7 +64,7 @@
<!--@if(!$document_list)-->
<!-- 게시물이 없으면 등록된 글이 없음을 표시 -->
<tr class="bg0">
<td colspan="6" class="title">
<td colspan="7" class="title">
{$lang->no_documents}
</td>
</tr>
@ -69,10 +75,10 @@
<!--@if($document->isNotice())-->
<tr class="notice">
<td class="num">{$lang->notice}</td>
<!--@if($module_info->display_number!='N')--><td class="notice">{$lang->notice}</td><!--@end-->
<td class="title" colspan="2">
<!--@if($grant->is_admin)-->
<input type="checkbox" value="{$document->document_srl}" onclick="doAddCart('{$mid}',this)" <!--@if($check_list[$document->document_srl])-->checked="checked"<!--@end--> />
<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
<!--@end-->
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong class="category">{$category_list[$document->get('category_srl')]->title}</strong>
@ -90,17 +96,19 @@
{$document->printExtraImages(60*60*$module_info->duration_new)}
</td>
<td class="author"><div class="member_{$document->get('member_srl')}">{$document->getNickName()}</div></td>
<td class="reading">{$document->get('readed_count')}</td>
<td class="recommend">{$document->get('voted_count')}</td>
<td class="date">{$document->getRegdate('Y-m-d')}</td>
<!--@if($module_info->display_author!='N')--><td class="author"><div class="member_{$document->get('member_srl')}">{$document->getNickName()}</div></td><!--@end-->
<!--@if($module_info->display_readed_count!='N')--><td class="reading">{$document->get('readed_count')>0?$document->get('readed_count'):'&nbsp;'}</td><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><td class="recommend">{$document->get('voted_count')>0?$document->get('voted_count'):'&nbsp;'}</td><!--@end-->
<!--@if($module_info->display_regdate!='N')--><td class="date">{$document->getRegdate('Y-m-d')}</td><!--@end-->
<!--@if($module_info->display_last_update=='Y')--><td class="date">{zdate($document->get('last_update'),'Y-m-d H:i')}</td><!--@end-->
</tr>
<!--@else-->
<tr class="bg{($no+1)%2+1}">
<td rowspan="2" class="num"><!--@if($document_srl == $document->document_srl)--><img src="./images/common/iconArrowD8.gif" alt="" border="0" /><!--@else-->{$no}<!--@end--></td>
<!--@if($module_info->display_number!='N')--><td rowspan="2" class="num"><!--@if($document_srl == $document->document_srl)--><img src="./images/common/iconArrowD8.gif" border="0" alt="" /><!--@else-->{$no}<!--@end--></td><!--@end-->
<!--@if($document->thumbnailExists($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type))-->
<td rowspan="2" class="thumb"><a href="{getUrl('','document_srl',$document->document_srl)}" class="thumbnailMedium"><img src="{$document->getThumbnail($module_info->thumbnail_width, $module_info->thumbnail_height, $module_info->thumbnail_type)}" border="0" alt="" /></a></td>
<td class="title">
@ -109,7 +117,7 @@
<!--@end-->
<!--@if($grant->is_admin)-->
<input type="checkbox" value="{$document->document_srl}" onclick="doAddCart('{$mid}',this)" <!--@if($check_list[$document->document_srl])-->checked="checked"<!--@end--> />
<input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> />
<!--@end-->
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong>{$category_list[$document->get('category_srl')]->title}</strong>
@ -126,23 +134,32 @@
<!--@end-->
{$document->printExtraImages(60*60*$module_info->duration_new)}
</td>
<td class="author"><div class="member_{$document->get('member_srl')}">{$document->getNickName()}</div></td>
<td class="reading">{$document->get('readed_count')}</td>
<td class="recommend">{$document->get('voted_count')}</td>
<td class="date">{$document->getRegdate('Y-m-d')}</td>
<!--@if($module_info->display_author!='N')--><td class="author"><div class="member_{$document->get('member_srl')}">{$document->getNickName()}</div></td><!--@end-->
<!--@if($module_info->display_readed_count!='N')--><td class="reading">{$document->get('readed_count')>0?$document->get('readed_count'):'&nbsp;'}</td><!--@end-->
<!--@if($module_info->display_voted_count!='N')--><td class="recommend">{$document->get('voted_count')>0?$document->get('voted_count'):'&nbsp;'}</td><!--@end-->
<!--@if($module_info->display_regdate!='N')--><td class="date">{$document->getRegdate('Y-m-d')}</td><!--@end-->
<!--@if($module_info->display_last_update=='Y')--><td class="date">{zdate($document->get('last_update'),'Y-m-d H:i')}</td><!--@end-->
</tr>
<!--@if($document->thumbnailExists(100))-->
{@ $_col_count = 5}
{@ $_col_count = 7}
<!--@else-->
{@ $_col_count = 6}
{@ $_col_count = 8}
<!--@end-->
<!--@if($module_info->display_number=='N')-->{@ $_col_count --; }<!--@end-->
<!--@if($module_info->display_author=='N')-->{@ $_col_count --; }<!--@end-->
<!--@if($module_info->display_readed_count=='N')-->{@ $_col_count --; }<!--@end-->
<!--@if($module_info->display_voted_count=='N')-->{@ $_col_count --; }<!--@end-->
<!--@if($module_info->display_regdate=='N')-->{@ $_col_count --; }<!--@end-->
<!--@if($module_info->display_last_update=='N')-->{@ $_col_count --; }<!--@end-->
<tr class="bg{($no+1)%2+1}">
<td colspan="{$_col_count}" class="summary"><a href="{getUrl('','document_srl',$document->document_srl)}">{$document->getSummary(120)}</a></td>
<td colspan="{$_col_count}" class="summary"><a href="{getUrl('','document_srl',$document->document_srl)}">{$document->getSummary(120)}</a>&nbsp;</td>
</tr>
<!--@end-->
<!--@end-->
</tbody>
</table>
</table>
</form>
<div class="clear">
@ -158,7 +175,7 @@
<!--@if($grant->is_admin)-->
<!-- 문서 관리 버튼 -->
<div class="gap1 fl">
<a href="{getUrl('act','dispBoardAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
</div>
<!--@end-->

View file

@ -140,5 +140,59 @@
<description xml:lang="ko">썸네일의 세로 크기를 지정할 수 있습니다. (기본 100px)</description>
<default>100</default>
</var>
<var name="display_number" type="select">
<title xml:lang="ko">번호 표시</title>
<title xml:lang="jp">番号表示</title>
<title xml:lang="zh-CN">显示编号</title>
<title xml:lang="en">Dispay Number</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_author" type="select">
<title xml:lang="ko">글쓴이 표시</title>
<title xml:lang="jp">投稿者表示</title>
<title xml:lang="zh-CN">显示昵称</title>
<title xml:lang="en">Display Author</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_regdate" type="select">
<title xml:lang="ko">작성일 표시</title>
<title xml:lang="jp">作成日表示</title>
<title xml:lang="zh-CN">显示发表日期</title>
<title xml:lang="en">Display Registered Date</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_readed_count" type="select">
<title xml:lang="ko">조회수 표시</title>
<title xml:lang="jp">照合数表示</title>
<title xml:lang="zh-CN">显示查看数</title>
<title xml:lang="en">Display Hit</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_voted_count" type="select">
<title xml:lang="ko">추천수 표시</title>
<title xml:lang="jp">推薦数表示</title>
<title xml:lang="zh-CN">显示推荐数</title>
<title xml:lang="en">Display Votes</title>
<default>Y</default>
<default>N</default>
<description />
</var>
<var name="display_last_update" type="select">
<title xml:lang="ko">최근 변경시간 표시</title>
<title xml:lang="jp">最近の変更時間表示</title>
<title xml:lang="zh-CN">显示最后更新时间</title>
<title xml:lang="en">Display Latest Update</title>
<default>N</default>
<default>Y</default>
<description />
</var>
</extra_vars>
</skin>

View file

@ -1,53 +0,0 @@
<!--%import("filter/manage_checked_document.xml")-->
<!--%import("js/board_admin.js")-->
<div id="popHeadder">
<h1>{$lang->cmd_manage_document}</h1>
</div>
<form action="./" method="get" id="fo_management">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="type" value="" />
<div id="popBody">
<table cellspacing="0" class="tableType5">
<col width="150" />
<col />
<tr>
<th scope="row"><label for="textfield1">{$lang->checked_count}</label></th>
<td>{count($document_list)}</td>
</tr>
<!--@if(count($document_list) && count($board_list)>1)-->
<tr>
<th scope="row">{$lang->move_target_module}</th>
<td>
<select name="target_board" class="w100">
<!--@foreach($board_list as $key => $val)-->
<!--@if($module_srl != $val->module_srl)-->
<option value="{$val->module_srl}">{$val->browser_title} ({$val->mid})</option>
<!--@end-->
<!--@end-->
</select>
</td>
</tr>
<tr>
<th scope="row">{$lang->cmd_send_message}</th>
<td>
<textarea name="message_content" class="inputTypeTextArea w400" cols="45" rows="5"></textarea>
</td>
</tr>
<!--@end-->
</table>
</div>
<div id="popFooter">
<div class="tRight gap1">
<!--@if(count($document_list))-->
<a href="#" onclick="doManageDocument('move');return false;" class="button"><span>{$lang->cmd_move}</span></a>
<a href="#" onclick="doManageDocument('delete');return false;" class="button"><span>{$lang->cmd_delete}</span></a>
<!--@end-->
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
</div>
</div>
</form>

View file

@ -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();
}

View file

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<grants />
<permissions>
<permission action="dispDocumentAdminManageDocument" target="manager" />
<permission action="getDocumentCategories" target="manager" />
<permission action="procDocumentAdminAddCart" target="manager" />
<permission action="procDocumentAdminManageCheckedDocument" target="manager" />
</permissions>
<actions>
<action name="dispDocumentPrint" type="view" standalone="true" />
<action name="dispDocumentPreview" type="view" standalone="true" />
@ -8,6 +14,13 @@
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
<action name="dispDocumentAdminConfig" type="view" standalone="true" />
<action name="dispDocumentAdminManageDocument" type="view" standalone="true"/>
<action name="getDocumentCategories" type="model" standalone="true"/>
<action name="procDocumentAdminAddCart" type="controller" standalone="true" />
<action name="procDocumentAdminManageCheckedDocument" type="controller" standalone="true" />
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
<action name="procDocumentAdminInsertConfig" type="controller" standalone="true" />
<action name="procDocumentAdminDeleteAllThumbnail" type="controller" standalone="true" />

View file

@ -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("<a href=\"%s\" onclick=\"window.open(this.href);return false;\">%s</a>", $oDocument->getPermanentUrl(), $oDocument->getPermanentUrl());
else $purl = "";
$content .= sprintf("<div>%s</div><hr />%s<div style=\"font-weight:bold\">%s</div>%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;$i<count($document_srl_list);$i++) {
$document_srl = $document_srl_list[$i];
$oDocument = $oDocumentModel->getDocument($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;$i<count($document_srl_list);$i++) {
$document_srl = $document_srl_list[$i];
$oDocument = $oDocumentModel->getDocument($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();
}
}
?>

View file

@ -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');
}
}
?>

View file

@ -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');
}

View file

@ -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;

View file

@ -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 문서 설정 정보를 구함
**/

View file

@ -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';

View file

@ -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';

View file

@ -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 = '選択項目削除';

View file

@ -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' => '제목',

View file

@ -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 = '删除所选';

View file

@ -0,0 +1,14 @@
<query id="getAllModules" action="select">
<tables>
<table name="modules" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="in" column="module" var="select_module" />
</conditions>
<navigation>
<index var="sort_index" default="mid" order="asc" />
</navigation>
</query>

View file

@ -4,8 +4,9 @@
</tables>
<columns>
<column name="module_srl" var="module_srl" filter="number" default="0" />
<column name="category_srl" var="category_srl" filter="number" default="0" />
</columns>
<conditions>
<condition operation="in" column="document_srl" var="document_srls" notnull="notnull" />
<condition operation="equal" column="document_srl" var="document_srl" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,74 @@
<!--%import("filter/manage_checked_document.xml")-->
<!--%import("js/document_admin.js")-->
<!--%import("css/document.css")-->
<div id="popHeadder">
<h1>{$lang->cmd_manage_document}</h1>
</div>
<form action="./" method="get" id="fo_management">
<input type="hidden" name="type" value="" />
<div id="popBody">
<table cellspacing="0" class="tableType5">
<col width="150" />
<col />
<tr>
<th scope="row"><label for="textfield1">{$lang->checked_count} ({count($document_list)})</label></th>
<td>
<!--@if(count($document_list))-->
<input type="checkbox" onclick="checkboxSelectAll(this.form, 'cart'); return false;" /> {$lang->cmd_select}
<ul class="document_list_box">
<!--@foreach($document_list as $key => $document)-->
<li class="document_list"><input type="checkbox" checked="checked" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this);"/> <address>{$document->getNickName()}</address> <span class="document_title">{$document->getTitle()}</li>
<!--@end-->
</ul>
<!--@else-->
&nbsp;
<!--@end-->
</td>
</tr>
<!--@if(count($document_list) && count($module_list)>1)-->
<tr>
<th scope="row">{$lang->move_target_module}</th>
<td>
<select id="target_module" name="target_module" class="w100" onchange="doGetCategoryFromModule(this); return false;">
<!--@foreach($module_list as $key => $val)-->
<option value="{$val->module_srl}">{$val->browser_title} ({$val->mid})</option>
<!--@end-->
</select>
</td>
</tr>
<tr>
<th scope="row">{$lang->category}</th>
<td>
<select id="target_category" name="target_category" class="w100">
</select>
</td>
</tr>
<tr>
<th scope="row">{$lang->cmd_send_message}</th>
<td>
<textarea name="message_content" class="inputTypeTextArea w400" cols="45" rows="5"></textarea>
</td>
</tr>
<!--@end-->
</table>
</div>
<div id="popFooter">
<div class="tRight gap1">
<!--@if(count($document_list))-->
<a href="#" onclick="doManageDocument('move');return false;" class="button"><span>{$lang->cmd_move}</span></a>
<a href="#" onclick="doManageDocument('copy');return false;" class="button"><span>{$lang->cmd_copy}</span></a>
<a href="#" onclick="doManageDocument('delete');return false;" class="button"><span>{$lang->cmd_delete}</span></a>
<!--@end-->
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</span></a>
</div>
</div>
<script type="text/javascript">
xAddEventListener(window,'load',function() { doGetCategoryFromModule(xGetElementById('target_module')); } );
</script>
</form>

View file

@ -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 { }

View file

@ -0,0 +1,7 @@
<filter name="manage_checked_document" module="document" act="procDocumentAdminManageCheckedDocument">
<form />
<response callback_func="completeManageDocument">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -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<length;i++) obj.remove(0);
var categories = ret_obj['categories'];
if(!categories) return;
var category_list = categories.split("\n");
for(var i=0;i<category_list.length;i++) {
var item = category_list[i];
var pos = item.indexOf(',');
var category_srl = item.substr(0,pos);
var category_title = item.substr(pos+1,item.length);
if(!category_srl || !category_title) continue;
var opt = new Option(category_title, category_srl, false, false);
obj.options[obj.options.length] = opt;
}
}