From d38a4fd987c65e79211bc246c9b8c2e752012a19 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Tue, 1 Mar 2016 17:19:23 +0900 Subject: [PATCH] Enhanced to create a modified reason. --- modules/board/board.view.php | 15 +++++++++++ modules/board/conf/module.xml | 1 + modules/board/lang/ko.php | 1 + modules/board/skins/xedition/update_list.html | 2 +- modules/board/skins/xedition/update_view.html | 27 +++++++++++++++++++ modules/document/document.model.php | 10 +++++++ modules/document/queries/getUpdateLog.xml | 11 ++++++++ 7 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 modules/board/skins/xedition/update_view.html create mode 100644 modules/document/queries/getUpdateLog.xml diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 6aa308221..54e634521 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -1162,6 +1162,21 @@ class boardView extends board $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); + 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 diff --git a/modules/board/conf/module.xml b/modules/board/conf/module.xml index 2069ad1e8..9643ceff0 100644 --- a/modules/board/conf/module.xml +++ b/modules/board/conf/module.xml @@ -77,6 +77,7 @@ + diff --git a/modules/board/lang/ko.php b/modules/board/lang/ko.php index 289851a1b..9f8334b92 100644 --- a/modules/board/lang/ko.php +++ b/modules/board/lang/ko.php @@ -59,3 +59,4 @@ $lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 $lang->msg_dont_have_update_log = '업데이트 로그가 기록되어 있지 않은 게시글입니다.'; $lang->original_letter = '원본글'; $lang->msg_warning_update_log = '주의! 사용시 디비가 많이 늘어날 수 있습니다.'; +$lang->reason_update = '수정한 이유'; diff --git a/modules/board/skins/xedition/update_list.html b/modules/board/skins/xedition/update_list.html index b629c6bcb..09d962bbc 100644 --- a/modules/board/skins/xedition/update_list.html +++ b/modules/board/skins/xedition/update_list.html @@ -12,7 +12,7 @@ - {$val->title} + {$val->title} {$val->update_nick_name} diff --git a/modules/board/skins/xedition/update_view.html b/modules/board/skins/xedition/update_view.html new file mode 100644 index 000000000..7a546b8e3 --- /dev/null +++ b/modules/board/skins/xedition/update_view.html @@ -0,0 +1,27 @@ + +
+
+ +
+

+ {$category_list[$update_log->category_srl]->title} + {$update_log->title} +

+

+ + {zdate($update_log->regdate,'Y.m.d H:i:s')} + +

+
+ + +
+ {$update_log->content} +
+
+ {$lang->reason_update} : + {$update_log->reason_update} +
+ +
+
diff --git a/modules/document/document.model.php b/modules/document/document.model.php index 8c7668804..673d4f416 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -1557,6 +1557,16 @@ class documentModel extends document return $output; } + + function getUpdateLog($update_id) + { + $args = new stdClass(); + $args->update_id = $update_id; + $output = exeCuteQuery('document.getUpdateLog', $args); + $updage_log = $output->data; + + return $updage_log; + } } /* End of file document.model.php */ /* Location: ./modules/document/document.model.php */ diff --git a/modules/document/queries/getUpdateLog.xml b/modules/document/queries/getUpdateLog.xml new file mode 100644 index 000000000..daae71601 --- /dev/null +++ b/modules/document/queries/getUpdateLog.xml @@ -0,0 +1,11 @@ + + + + + + + + + + +