mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
게시글 수정내역을 저장하도록 개선.
This commit is contained in:
parent
9502aef063
commit
74fcee987e
9 changed files with 97 additions and 1 deletions
|
|
@ -147,6 +147,11 @@ class boardController extends board
|
|||
$obj->update_order = $obj->list_order = (getNextSequence() * -1);
|
||||
}
|
||||
|
||||
if($this->module_info->update_log == 'Y')
|
||||
{
|
||||
$obj->update_log_setting = 'Y';
|
||||
}
|
||||
|
||||
$output = $oDocumentController->updateDocument($oDocument, $obj);
|
||||
$msg_code = 'success_updated';
|
||||
|
||||
|
|
|
|||
|
|
@ -1140,6 +1140,24 @@ class boardView extends board
|
|||
$this->setTemplateFile('message');
|
||||
}
|
||||
|
||||
function dispBoardUpdateLog()
|
||||
{
|
||||
$document_srl = Context::get('document_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
if($logged_info->member_srl != $oDocument->get('member_srl') || !$this->grant->manager)
|
||||
{
|
||||
return new Object(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
$updatelog = $oDocumentModel->getDocumentUpdateLog($document_srl);
|
||||
Context::set('updatelog', $updatelog);
|
||||
|
||||
$this->setTemplateFile('update_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief the method for displaying the warning messages
|
||||
* display an error message if it has not a special design
|
||||
|
|
|
|||
|
|
@ -63,6 +63,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" />
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ $lang->consultation = '상담 기능';
|
|||
$lang->secret = '비밀글 기능';
|
||||
$lang->thisissecret = '비밀글입니다.';
|
||||
$lang->admin_mail = '관리자 메일';
|
||||
$lang->update_log = '게시글 수정 내역';
|
||||
$lang->cmd_board_list = '게시판 목록';
|
||||
$lang->cmd_module_config = '게시판 공통 설정';
|
||||
$lang->cmd_board_info = '게시판 정보';
|
||||
|
|
@ -31,6 +32,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 = '해당 글의 댓글 쓰기가 잠겨있습니다.';
|
||||
|
|
|
|||
|
|
@ -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="$oDocument->isEditable()" 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">
|
||||
|
|
|
|||
|
|
@ -199,6 +199,12 @@
|
|||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->protect_content}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -683,6 +683,32 @@ class documentController extends document
|
|||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
// update Document Log
|
||||
else
|
||||
{
|
||||
if($obj->update_log_setting === 'Y')
|
||||
{
|
||||
$update_args = new stdClass();
|
||||
$update_args->document_srl = $obj->document_srl;
|
||||
$update_args->member_srl = $source_obj->get('member_srl');
|
||||
$update_args->module_srl = $source_obj->get('module_srl');
|
||||
$update_args->update_member_srl = $logged_info->member_srl;
|
||||
$update_args->nick_name = $source_obj->get('nick_name');
|
||||
$update_args->title = $obj->title;
|
||||
$update_args->title_bold = $obj->title_bold;
|
||||
$update_args->title_color = $obj->title_color;
|
||||
$update_args->content = $obj->content;
|
||||
$update_args->update_nick_name = $logged_info->nick_name;
|
||||
$update_args->tags = $obj->tags;
|
||||
$update_args->extra_vars = $obj->extra_vars;
|
||||
$update_output = executeQuery('document.insertUpdateLog', $update_args);
|
||||
if(!$update_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $update_output;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Remove all extra variables
|
||||
if(Context::get('act')!='procFileDelete')
|
||||
{
|
||||
|
|
|
|||
21
modules/document/queries/insertUpdateLog.xml
Normal file
21
modules/document/queries/insertUpdateLog.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<query id="insertUpdateLog" action="insert">
|
||||
<tables>
|
||||
<table name="document_update_list" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="update_member_srl" var="update_member_srl" filter="number" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" />
|
||||
<column name="title" var="title" notnull="notnull" />
|
||||
<column name="title_bold" var="title_bold" />
|
||||
<column name="title_color" var="title_color" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="update_nick_name" var="update_nick_name" notnull="notnull" />
|
||||
<column name="tags" var="tags" />
|
||||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
16
modules/document/schemas/document_update_list.xml
Normal file
16
modules/document/schemas/document_update_list.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<table name="document_update_list">
|
||||
<column name="document_srl" type="number" size="11" notnull="notnull" index="idx_document_srl" />
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="update_member_srl" type="number" size="11" notnull="notnull" />
|
||||
<column name="module_srl" type="number" size="11" notnull="notnull" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
|
||||
<column name="nick_name" type="varchar" size="80" notnull="notnull" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="title" type="varchar" size="250" />
|
||||
<column name="title_bold" type="char" size="1" default="N" notnull="notnull" />
|
||||
<column name="title_color" type="varchar" size="7" />
|
||||
<column name="content" type="bigtext" notnull="notnull" />
|
||||
<column name="update_nick_name" type="varchar" size="80" />
|
||||
<column name="tags" type="text" />
|
||||
<column name="extra_vars" type="text" />
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue