mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
Merge pull request #312 from bjrambo/pr/document-update-log
게시글 수정내역을 저장하도록 개선
This commit is contained in:
commit
3341037724
18 changed files with 350 additions and 9 deletions
|
|
@ -106,6 +106,11 @@ class boardController extends board
|
|||
}
|
||||
}
|
||||
|
||||
if($this->module_info->update_log == 'Y')
|
||||
{
|
||||
$obj->update_log_setting = 'Y';
|
||||
}
|
||||
|
||||
// update the document if it is existed
|
||||
if($is_update)
|
||||
{
|
||||
|
|
@ -146,12 +151,14 @@ class boardController extends board
|
|||
$obj->last_update = $obj->regdate = date('YmdHis');
|
||||
$obj->update_order = $obj->list_order = (getNextSequence() * -1);
|
||||
}
|
||||
|
||||
$obj->reason_update = escape($obj->reason_update);
|
||||
$output = $oDocumentController->updateDocument($oDocument, $obj);
|
||||
$msg_code = 'success_updated';
|
||||
|
||||
// insert a new document otherwise
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $oDocumentController->insertDocument($obj, $bAnonymous);
|
||||
$msg_code = 'success_registed';
|
||||
$obj->document_srl = $output->get('document_srl');
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ class boardView extends board
|
|||
}
|
||||
}
|
||||
|
||||
Context::set('update_view', $this->grant->update_view);
|
||||
|
||||
// setup the document oject on context
|
||||
$oDocument->add('module_srl', $this->module_srl);
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
|
@ -1140,6 +1142,44 @@ class boardView extends board
|
|||
$this->setTemplateFile('message');
|
||||
}
|
||||
|
||||
function dispBoardUpdateLog()
|
||||
{
|
||||
$oDocumentModel = getModel('document');
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
||||
if($this->grant->update_view !== true)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$updatelog = $oDocumentModel->getDocumentUpdateLog($document_srl);
|
||||
Context::set('total_count', $updatelog->page_navigation->total_count);
|
||||
Context::set('total_page', $updatelog->page_navigation->total_page);
|
||||
Context::set('page', $updatelog->page);
|
||||
Context::set('page_navigation', $updatelog->page_navigation);
|
||||
Context::set('updatelog', $updatelog);
|
||||
|
||||
$this->setTemplateFile('update_list');
|
||||
}
|
||||
|
||||
function dispBoardUpdateLogView()
|
||||
{
|
||||
$oDocumentModel = getModel('document');
|
||||
$update_id = Context::get('update_id');
|
||||
|
||||
if($this->grant->update_view !== true)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
$update_log = $oDocumentModel->getUpdateLog($update_id);
|
||||
$extra_vars = unserialize($update_log->extra_vars);
|
||||
|
||||
Context::set('extra_vars', $extra_vars);
|
||||
Context::set('update_log', $update_log);
|
||||
|
||||
$this->setTemplateFile('update_view');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief the method for displaying the warning messages
|
||||
* display an error message if it has not a special design
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
<title xml:lang="zh-TW">檢視</title>
|
||||
<title xml:lang="tr">görüş</title>
|
||||
</grant>
|
||||
<grant name="update_view" default="guest">
|
||||
<title xml:lang="ko">수정내역 조회</title>
|
||||
</grant>
|
||||
<grant name="write_document" default="guest">
|
||||
<title xml:lang="ko">글 작성</title>
|
||||
<title xml:lang="zh-CN">发表新主题</title>
|
||||
|
|
@ -63,6 +66,7 @@
|
|||
<action name="dispBoardCategoryList" type="view" />
|
||||
<action name="dispBoardContentCommentList" type="view" />
|
||||
<action name="dispBoardContentFileList" type="view" />
|
||||
<action name="dispBoardUpdateLog" type="view" />
|
||||
|
||||
<action name="dispBoardTagList" type="view" />
|
||||
<action name="dispBoardWrite" type="view" standalone="false" />
|
||||
|
|
@ -73,6 +77,7 @@
|
|||
<action name="dispBoardDeleteComment" type="view" standalone="false" />
|
||||
<action name="dispBoardDeleteTrackback" type="view" standalone="false" />
|
||||
<action name="dispBoardMessage" type="view" />
|
||||
<action name="dispBoardUpdateLogView" type="view" />
|
||||
|
||||
<action name="procBoardInsertDocument" type="controller" ruleset="insertDocument" standalone="false" />
|
||||
<action name="procBoardDeleteDocument" type="controller" standalone="false" />
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ $lang->consultation = '상담 기능';
|
|||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
$lang->update_log = '게시글 수정 내역';
|
||||
$lang->last_updater = '수정한사람';
|
||||
$lang->cmd_board_list = '게시판 목록';
|
||||
$lang->cmd_module_config = '게시판 공통 설정';
|
||||
$lang->cmd_board_info = '게시판 정보';
|
||||
|
|
@ -31,6 +33,7 @@ $lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주
|
|||
$lang->about_list_config = '게시판의 목록형식 사용시 원하는 항목들로 배치를 할 수 있습니다. 단 스킨에서 지원하지 않는 경우 불가능합니다. 대상항목/ 표시항목의 항목을 더블클릭하면 추가/ 제거가 됩니다.';
|
||||
$lang->about_use_status = '글 작성 시 선택할 수 있는 상태를 지정해주세요.';
|
||||
$lang->about_protect_comment = '댓글의 댓글이 있을경우 해당댓글을 삭제 및 수정을 할 수 없도록 합니다.';
|
||||
$lang->about_update_log = '게시글을 수정할 경우 수정한 내역을 저장하도록 합니다.';
|
||||
$lang->msg_not_enough_point = '포인트가 부족합니다';
|
||||
$lang->write_comment = '댓글 쓰기';
|
||||
$lang->msg_not_allow_comment = '해당 글의 댓글 쓰기가 잠겨있습니다.';
|
||||
|
|
@ -52,4 +55,8 @@ $lang->msg_admin_comment_no_modify = '최고관리자의 댓글을 수정할 권
|
|||
$lang->msg_board_delete_protect_comment = '댓글이 작성된 댓글의 글을 삭제할 수 없습니다.';
|
||||
$lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.';
|
||||
$lang->msg_protect_regdate_document = '%s일 이전의 게시글은 수정 또는 삭제 할 수 없습니다.';
|
||||
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
|
||||
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
|
||||
$lang->msg_dont_have_update_log = '업데이트 로그가 기록되어 있지 않은 게시글입니다.';
|
||||
$lang->original_letter = '원본글';
|
||||
$lang->msg_warning_update_log = '<span class="x_label x_label-important">주의!</span> 사용시 디비가 많이 늘어날 수 있습니다.';
|
||||
$lang->reason_update = '수정한 이유';
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@
|
|||
<img cond="$oDocument->getProfileImage()" src="{$oDocument->getProfileImage()}" alt="Profile" class="pf" />
|
||||
<div cond="$oDocument->getSignature()" class="tx">{$oDocument->getSignature()}</div>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<div class="btnArea">
|
||||
<a cond="$update_view" class="btn" href="{getUrl('act','dispBoardUpdateLog','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-list-ul"></i>{$lang->update_log}</a>
|
||||
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-eraser"></i>{$lang->cmd_modify}</a>
|
||||
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-trash"></i>{$lang->cmd_delete}</a>
|
||||
<span class="etc">
|
||||
|
|
|
|||
|
|
@ -263,6 +263,16 @@
|
|||
right:0;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.update-log {
|
||||
width:100%;
|
||||
border-bottom:1px solid #dbdbdb;
|
||||
margin: 5px auto 5px auto;
|
||||
|
||||
padding:5px;
|
||||
|
||||
}
|
||||
|
||||
/* Board Write */
|
||||
|
||||
/* write_form.html */
|
||||
|
|
@ -463,6 +473,9 @@
|
|||
white-space: nowrap;
|
||||
color : #666;
|
||||
}
|
||||
.update-log .read_header .meta {
|
||||
border-bottom:0;
|
||||
}
|
||||
.read_header .meta > span { margin-left: 8px ;}
|
||||
.read_header .meta > span:first-child {margin-left:0;}
|
||||
.read_header .meta:after {
|
||||
|
|
|
|||
42
modules/board/skins/xedition/update_list.html
Normal file
42
modules/board/skins/xedition/update_list.html
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<include target="_header.html" />
|
||||
<div class="board_list" id="board_list">
|
||||
<table width="100%" border="1" cellspacing="0" summary="List of Articles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title"><span>{$lang->title}</span></th>
|
||||
<th scope="col"><span>{$lang->writer}</span></th>
|
||||
<th scope="col"><span>{$lang->last_updater}</span></th>
|
||||
<th scope="col"><span>{$lang->last_post}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody cond="$updatelog->data">
|
||||
<tr loop="$updatelog->data=>$val">
|
||||
<td class="title">
|
||||
<a href="{getUrl('', 'mid', $mid, 'act', 'dispBoardUpdateLogView', 'update_id', $val->update_id)}">{$val->title}</a>
|
||||
</td>
|
||||
<td class="author">
|
||||
{$val->update_nick_name}
|
||||
</td>
|
||||
<td class="author">
|
||||
{$val->nick_name}
|
||||
</td>
|
||||
<td class="time">
|
||||
{zdate($val->regdate, 'Y.m.d H:i:s')}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody cond="!$updatelog->data">
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center">{$lang->msg_dont_have_update_log}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="direction">« {$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<strong cond="$page==$page_no">{$page_no}</strong>
|
||||
<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} »</a>
|
||||
</div>
|
||||
29
modules/board/skins/xedition/update_view.html
Normal file
29
modules/board/skins/xedition/update_view.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<include target="_header.html" />
|
||||
<div class="update-log">
|
||||
<div class="board_read" >
|
||||
<!-- READ HEADER -->
|
||||
<div class="read_header">
|
||||
<h1>
|
||||
<a href="{getUrl('category',$update_log->category_srl, 'document_srl', '')}" class="category" cond="$module_info->use_category=='Y' && $update_log->category_srl">{$category_list[$update_log->category_srl]->title}</a>
|
||||
<a>{$update_log->title}</a>
|
||||
</h1>
|
||||
<p class="meta">
|
||||
<span class="time">
|
||||
<i class="xi-time"></i> {zdate($update_log->regdate,'Y.m.d H:i:s')}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<!-- READ BODY -->
|
||||
<div class="read_body">
|
||||
{$update_log->content}
|
||||
</div>
|
||||
<p loop="$extra_vars=>$key=>$val">
|
||||
{$key} : {$val}
|
||||
</p>
|
||||
<p>
|
||||
{$lang->reason_update} :
|
||||
{$update_log->reason_update}
|
||||
</p>
|
||||
<!-- /READ BODY -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
<input type="checkbox" name="notify_message" class="iCheck" value="Y" checked="checked"|cond="$oDocument->useNotify()" id="notify_message" />
|
||||
<label for="notify_message">{$lang->notify}</label>
|
||||
</block>
|
||||
|
||||
<!--@if(is_array($status_list))-->
|
||||
<!--@foreach($status_list AS $key=>$value)-->
|
||||
<input type="radio" name="status" value="{$key}" id="{$key}" <!--@if($oDocument->get('status') == $key || ($key == 'PUBLIC' && !$document_srl))-->checked="checked"<!--@end--> />
|
||||
|
|
@ -66,7 +67,11 @@
|
|||
<span class="item">
|
||||
<label for="tags" class="iLabel">{$lang->tag}: {$lang->about_tag}</label>
|
||||
<input type="text" name="tags" id="tags" value="{htmlspecialchars($oDocument->get('tags'))}" class="iText" style="width:300px" title="Tag" />
|
||||
</span>
|
||||
</span>
|
||||
<span class="item" cond="$oDocument->get('document_srl') && $module_info->update_log == 'Y'">
|
||||
<label for="reason_update" class="iLabel">{$lang->reason_update}</label>
|
||||
<input type="text" name="reason_update" id="reason_update" value="" class="iText" style="width:300px" title="reason update" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<block cond="!$oDocument->isExists() || $oDocument->get('status') == 'TEMP'">
|
||||
|
|
|
|||
|
|
@ -199,6 +199,13 @@
|
|||
<label class="x_inline" for="consultation"><input type="checkbox" name="consultation" id="consultation" value="Y" checked="checked"|cond="$module_info->consultation == 'Y'" /> {$lang->about_consultation}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->update_log}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="update_log"><input type="checkbox" name="update_log" id="update_log" value="Y" checked="checked"|cond="$module_info->update_log == 'Y'" /> {$lang->about_update_log}</label>
|
||||
<p>{$lang->msg_warning_update_log}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->protect_content}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue