mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
added a column for administrators.
This commit is contained in:
parent
3272c5a021
commit
9c653d210b
10 changed files with 59 additions and 7 deletions
|
|
@ -50,6 +50,10 @@ class boardController extends board
|
|||
unset($obj->title_color);
|
||||
unset($obj->title_bold);
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->is_admin = 'Y';
|
||||
}
|
||||
|
||||
// generate document module model object
|
||||
$oDocumentModel = getModel('document');
|
||||
|
|
@ -227,12 +231,11 @@ class boardController extends board
|
|||
$isadminDocument = false;
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
$update_log_list = $oDocumentModel->getDocumentUpdateLog($update_log->document_srl);
|
||||
foreach($update_log_list->data as $val)
|
||||
$update_log_list = $oDocumentModel->getUpdateLogAdminisExists($update_log->document_srl);
|
||||
|
||||
foreach($update_log_list as $val)
|
||||
{
|
||||
$oMemberModel = getModel('member');
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($val->update_member_srl);
|
||||
if($member_info->is_admin === 'Y')
|
||||
if($val->is_admin == 'Y')
|
||||
{
|
||||
$isadminDocument = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@ $lang->msg_no_update_log = '업데이트 로그가 존재하지 않습니다.';
|
|||
$lang->cmd_modify_by_update_log = '이 로그로 게시물을 수정하기';
|
||||
$lang->msg_admin_update_log = '관리자가 수정한 적이 있는 게시물입니다. 관리자에게 문의하세요.';
|
||||
$lang->msg_update_log_revert = '정말로 이 게시물로 되돌리시겠습니까?';
|
||||
$lang->write_admin = '관리자작성';
|
||||
|
|
|
|||
|
|
@ -455,6 +455,13 @@
|
|||
text-overflow: ellipsis;
|
||||
color: #555;
|
||||
}
|
||||
.read_header h1 span.is_admin {
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
line-height:15px;
|
||||
color:#FF6C00;
|
||||
}
|
||||
|
||||
.read_header h1 a {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<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>
|
||||
<a>{$update_log->title}</a> <span class="is_admin" cond="$update_log->is_admin == 'Y'">{$lang->write_admin}</span>
|
||||
</h1>
|
||||
<p class="meta">
|
||||
<span class="time">
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<!-- /READ BODY -->
|
||||
</div>
|
||||
|
||||
<form action="./" method="post" onsubmit="if(!confirm('{$lang->msg_update_log_revert}')) return false; return procFilter(this, window.update)">
|
||||
<form action="./" method="post" onsubmit="if(!confirm('{$lang->msg_update_log_revert}')) return false; return procFilter(this, window.update)" cond="$update_log->is_admin !== 'Y' && $logged_info->is_admin !=='Y' || $logged_info->is_admin === 'Y'">
|
||||
<input type="hidden" name="module" value="board" />
|
||||
<input type="hidden" name="act" value="procBoardUpdateDocument" />
|
||||
<input type="hidden" name="update_id" value="{$update_log->update_id}" />
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ class document extends ModuleObject
|
|||
// 2016. 1. 27: Add a column(declare_message) for report
|
||||
if(!$oDB->isColumnExists("document_declared_log","declare_message")) return true;
|
||||
|
||||
// 2016. 3. 14 Add a column(document_upate_log) for admin
|
||||
if(!$oDB->isColumnExists('document_update_log', 'is_admin')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -328,6 +331,12 @@ class document extends ModuleObject
|
|||
$oDB->addColumn('document_declared_log',"declare_message","text");
|
||||
}
|
||||
|
||||
// 2016. 3. 14 Add a column(document_update_log) for admin
|
||||
if(!$oDB->isColumnExists('document_update_log', 'is_admin'))
|
||||
{
|
||||
$oDB->addColumn('document_update_log', 'is_admin', 'varchar', 1);
|
||||
}
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -476,6 +476,7 @@ class documentController extends document
|
|||
{
|
||||
$obj->extra_vars = serialize($extra_vars);
|
||||
$update_output = $this->insertDocumentUpdateLog($obj);
|
||||
|
||||
if(!$update_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -749,6 +750,10 @@ class documentController extends document
|
|||
if($obj->update_log_setting === 'Y')
|
||||
{
|
||||
$obj->extra_vars = serialize($extra_vars);
|
||||
if($this->grant->manager)
|
||||
{
|
||||
$obj->is_admin = 'Y';
|
||||
}
|
||||
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
|
||||
if(!$update_output->toBool())
|
||||
{
|
||||
|
|
@ -816,6 +821,7 @@ class documentController extends document
|
|||
$update_args->tags = $obj->tags;
|
||||
$update_args->extra_vars = $obj->extra_vars;
|
||||
$update_args->reason_update = $obj->reason_update;
|
||||
$update_args->is_admin = $obj->is_admin;
|
||||
$update_output = executeQuery('document.insertDocumentUpdateLog', $update_args);
|
||||
|
||||
return $update_output;
|
||||
|
|
|
|||
|
|
@ -1567,6 +1567,19 @@ class documentModel extends document
|
|||
|
||||
return $updage_log;
|
||||
}
|
||||
|
||||
function getUpdateLogAdminisExists($document_srl = null)
|
||||
{
|
||||
if($document_srl == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('document.getUpdateLogAdminisExists', $args);
|
||||
|
||||
return $output->data;
|
||||
}
|
||||
}
|
||||
/* End of file document.model.php */
|
||||
/* Location: ./modules/document/document.model.php */
|
||||
|
|
|
|||
11
modules/document/queries/getUpdateLogAdminisExists.xml
Normal file
11
modules/document/queries/getUpdateLogAdminisExists.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getUpdateLog" action="select">
|
||||
<tables>
|
||||
<table name="document_update_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="is_admin" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -18,5 +18,6 @@
|
|||
<column name="extra_vars" var="extra_vars" />
|
||||
<column name="reason_update" var="reason_update" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="is_admin" var="is_admin" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@
|
|||
<column name="tags" type="text" />
|
||||
<column name="extra_vars" type="text" />
|
||||
<column name="reason_update" type="text" />
|
||||
<column name="is_admin" type="varchar" size="1" />
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue