Fix #1652 non-member vote not working for comments

This commit is contained in:
Kijin Sung 2021-03-17 23:22:41 +09:00
parent d94226ffb1
commit 1db10e4ada
2 changed files with 8 additions and 8 deletions

View file

@ -39,10 +39,10 @@
</div>
<p class="action" cond="!$comment->isDeleted()">
<a href="{getUrl('act','dispBoardVoteLog','target_srl',$comment->comment_srl,'target','comment')}">{$lang->cmd_comment_vote_user}</a>
<a cond="$comment->getMyVote() === false || $comment->getMyVote() < 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteUp','{$comment->comment_srl}');return false;"|cond="$is_logged" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote}{$comment->get('voted_count')}</a>
<a cond="$comment->getMyVote() > 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteUpCancel','{$comment->comment_srl}');return false;"|cond="$is_logged" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote}{$comment->get('voted_count')}</a>
<a cond="$comment->getMyVote() === false || $comment->getMyVote() > 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteDown','{$comment->comment_srl}');return false;"|cond="$is_logged" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote_down}{$comment->get('blamed_count')}</a>
<a cond="$comment->getMyVote() < 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteDownCancel','{$comment->comment_srl}');return false;"|cond="$is_logged" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote_down}{$comment->get('blamed_count')}</a>
<a cond="$comment->getMyVote() === false || $comment->getMyVote() < 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteUp','{$comment->comment_srl}');return false;" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote}{$comment->get('voted_count')}</a>
<a cond="$comment->getMyVote() > 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteUpCancel','{$comment->comment_srl}');return false;" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote}{$comment->get('voted_count')}</a>
<a cond="$comment->getMyVote() === false || $comment->getMyVote() > 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteDown','{$comment->comment_srl}');return false;" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote_down}{$comment->get('blamed_count')}</a>
<a cond="$comment->getMyVote() < 0" href="#" onclick="doCallModuleAction('comment','procCommentVoteDownCancel','{$comment->comment_srl}');return false;" class="voted"><i class="xi-thumbs-up"></i>{$lang->cmd_vote_down}{$comment->get('blamed_count')}</a>
<a cond="$oDocument->allowComment()" href="{getUrl('act','dispBoardReplyComment','comment_srl',$comment->comment_srl)}" class="reply"><i class="xi-reply"></i> {$lang->cmd_reply}</a>
<a cond="$comment->isGranted()||!$comment->get('member_srl')" href="{getUrl('act','dispBoardModifyComment','comment_srl',$comment->comment_srl)}" class="modify"><i class="xi-eraser"></i> {$lang->cmd_modify}</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>

View file

@ -7,10 +7,10 @@
<action name="getCommentMenu" type="model" />
<action name="getCommentVotedMemberList" type="model" permission="root" />
<action name="procCommentVoteUp" type="controller" permission="member" />
<action name="procCommentVoteUpCancel" type="controller" permission="member" />
<action name="procCommentVoteDown" type="controller" permission="member" />
<action name="procCommentVoteDownCancel" type="controller" permission="member" />
<action name="procCommentVoteUp" type="controller" />
<action name="procCommentVoteUpCancel" type="controller" />
<action name="procCommentVoteDown" type="controller" />
<action name="procCommentVoteDownCancel" type="controller" />
<action name="procCommentDeclare" type="controller" permission="member" />
<action name="procCommentGetList" type="controller" permission="manager" check_type="comment" check_var="comment_srls" />
<action name="procCommentInsertModuleConfig" type="controller" permission="manager" check_var="target_module_srl" ruleset="insertCommentModuleConfig" />