mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Add the delete placeholder feature.
This commit is contained in:
parent
e96ac0ba7a
commit
76b629860f
6 changed files with 21 additions and 4 deletions
|
|
@ -482,6 +482,13 @@ class boardController extends board
|
||||||
{
|
{
|
||||||
// get the comment_srl
|
// get the comment_srl
|
||||||
$comment_srl = Context::get('comment_srl');
|
$comment_srl = Context::get('comment_srl');
|
||||||
|
|
||||||
|
$perfect_delete = null;
|
||||||
|
if($this->grant->manager == true)
|
||||||
|
{
|
||||||
|
$perfect_delete = Context::get('perfect_delete');
|
||||||
|
}
|
||||||
|
|
||||||
if(!$comment_srl)
|
if(!$comment_srl)
|
||||||
{
|
{
|
||||||
return new Object(-1, 'msg_invalid_request');
|
return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
@ -510,13 +517,13 @@ class boardController extends board
|
||||||
// generate comment controller object
|
// generate comment controller object
|
||||||
$oCommentController = getController('comment');
|
$oCommentController = getController('comment');
|
||||||
|
|
||||||
if($this->module_info->comment_delete_message === 'yes')
|
if($this->module_info->comment_delete_message === 'yes' && $perfect_delete != 'Y')
|
||||||
{
|
{
|
||||||
$comment->content = '';
|
$comment->content = '';
|
||||||
$comment->status = 7;
|
$comment->status = 7;
|
||||||
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
|
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
|
||||||
}
|
}
|
||||||
elseif($this->module_info->comment_delete_message === 'only_commnet')
|
elseif($this->module_info->comment_delete_message === 'only_commnet' && $perfect_delete != 'Y')
|
||||||
{
|
{
|
||||||
$childs = $oCommentModel->getChildComments($comment_srl);
|
$childs = $oCommentModel->getChildComments($comment_srl);
|
||||||
if(count($childs) > 0)
|
if(count($childs) > 0)
|
||||||
|
|
|
||||||
|
|
@ -47,3 +47,4 @@ $lang->about_comment_delete_message = 'When a comment is deleted, leave a placeh
|
||||||
$lang->cmd_only_p_comment = 'Only if there are replies';
|
$lang->cmd_only_p_comment = 'Only if there are replies';
|
||||||
$lang->cmd_all_comment_message = 'Always';
|
$lang->cmd_all_comment_message = 'Always';
|
||||||
$lang->cmd_do_not_message = 'Never';
|
$lang->cmd_do_not_message = 'Never';
|
||||||
|
$lang->delete_placeholder = 'Delete Placeholder';
|
||||||
|
|
|
||||||
|
|
@ -76,3 +76,4 @@ $lang->about_comment_delete_message = '댓글 삭제시 완전히 지우지 않
|
||||||
$lang->cmd_only_p_comment = '대댓글이 있는 경우에만 남김';
|
$lang->cmd_only_p_comment = '대댓글이 있는 경우에만 남김';
|
||||||
$lang->cmd_all_comment_message = '모든 댓글에 남김';
|
$lang->cmd_all_comment_message = '모든 댓글에 남김';
|
||||||
$lang->cmd_do_not_message = '남기지 않음';
|
$lang->cmd_do_not_message = '남기지 않음';
|
||||||
|
$lang->delete_placeholder = '완전 삭제';
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,9 @@
|
||||||
<a cond="$comment->isGranted()||!$comment->get('member_srl')" href="{getUrl('act','dispBoardDeleteComment','comment_srl',$comment->comment_srl)}" class="delete"><i class="xi-trash"></i> {$lang->cmd_delete}</a>
|
<a cond="$comment->isGranted()||!$comment->get('member_srl')" href="{getUrl('act','dispBoardDeleteComment','comment_srl',$comment->comment_srl)}" class="delete"><i class="xi-trash"></i> {$lang->cmd_delete}</a>
|
||||||
<a cond="$is_logged" class="comment_{$comment->comment_srl} this" href="#popup_menu_area" onclick="return false">{$lang->cmd_comment_do}</a>
|
<a cond="$is_logged" class="comment_{$comment->comment_srl} this" href="#popup_menu_area" onclick="return false">{$lang->cmd_comment_do}</a>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="action" cond="$comment->status >= 7">
|
||||||
|
<a cond="$comment->isGranted()||!$comment->get('member_srl')" href="{getUrl('act','dispBoardDeleteComment','comment_srl',$comment->comment_srl)}" class="delete"><i class="xi-trash"></i> {$lang->delete_placeholder}</a>
|
||||||
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div cond="$oDocument->comment_page_navigation" class="pagination">
|
<div cond="$oDocument->comment_page_navigation" class="pagination">
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,15 @@
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
<input type="hidden" name="document_srl" value="{$oComment->get('document_srl')}" />
|
<input type="hidden" name="document_srl" value="{$oComment->get('document_srl')}" />
|
||||||
<input type="hidden" name="comment_srl" value="{$oComment->get('comment_srl')}" />
|
<input type="hidden" name="comment_srl" value="{$oComment->get('comment_srl')}" />
|
||||||
|
|
||||||
<h1>{sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}</h1>
|
<h1>{sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}</h1>
|
||||||
<div class="btnArea">
|
<div class="btnArea">
|
||||||
|
<label for="perfect_delete" cond="$logged_info->is_admin == 'Y'" style="line-height: 24px;">
|
||||||
|
<input type="checkbox" id="perfect_delete" name="perfect_delete" value="Y" cond="$oComment->isGranted()" checked="checked"|cond="$oComment->status >= 7" style="vertical-align: middle;" />
|
||||||
|
{$lang->delete_placeholder}
|
||||||
|
</label>
|
||||||
<input type="submit" class="btn" value="{$lang->cmd_delete}" />
|
<input type="submit" class="btn" value="{$lang->cmd_delete}" />
|
||||||
<button type="button" class="btn" onclick="history.back()">{$lang->cmd_cancel}</button>
|
<button type="button" class="btn" onclick="history.back()">{$lang->cmd_cancel}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<include target="_footer.html" />
|
<include target="_footer.html" />
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,4 @@
|
||||||
<button type="button" class="btn" onclick="history.back()">{$lang->cmd_cancel}</button>
|
<button type="button" class="btn" onclick="history.back()">{$lang->cmd_cancel}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<include target="_footer.html" />
|
<include target="_footer.html" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue