Merge commit '8737640341f72bd78f5ebabc0d9c46e1541274c5'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / __commentJavaScript.tpl
1 <script data-relocate="true">
2 //<![CDATA[
3 $(function() {
4 WCF.Language.addObject({
5 'wcf.comment.add': '{lang}wcf.comment.add{/lang}',
6 'wcf.comment.button.response.add': '{lang}wcf.comment.button.response.add{/lang}',
7 'wcf.comment.delete.confirmMessage': '{lang}wcf.comment.delete.confirmMessage{/lang}',
8 'wcf.comment.description': '{lang}wcf.comment.description{/lang}',
9 'wcf.comment.guestDialog.title': '{lang}wcf.comment.guestDialog.title{/lang}',
10 'wcf.comment.more': '{lang}wcf.comment.more{/lang}',
11 'wcf.comment.response.add': '{lang}wcf.comment.response.add{/lang}',
12 'wcf.comment.response.more': '{lang}wcf.comment.response.more{/lang}',
13 'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
14 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
15 });
16
17 new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}');
18 {if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike')}
19 new WCF.Comment.Like({if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}1{else}0{/if}, {@LIKE_ENABLE_DISLIKE}, false, {@LIKE_ALLOW_FOR_OWN_CONTENT});
20 new WCF.Comment.Response.Like({if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}1{else}0{/if}, {@LIKE_ENABLE_DISLIKE}, false, {@LIKE_ALLOW_FOR_OWN_CONTENT});
21 {/if}
22
23 {if $commentList->getCommentManager()->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
24 new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.comment', '.jsReportCommentComment');
25 new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.response', '.jsReportCommentResponse');
26 {/if}
27 });
28 //]]>
29 </script>
30
31 {event name='javascriptInclude'}