Merge branch '2.0'
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / __commentJavaScript.tpl
1 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Comment{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
2 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Moderation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
3 {if !$__wcf->user->userID}
4 <script data-relocate="true" src="http{if $__wcf->secureConnection()}s{/if}://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
5 {/if}
6 <script data-relocate="true">
7 //<![CDATA[
8 $(function() {
9 WCF.Language.addObject({
10 'wcf.comment.add': '{lang}wcf.comment.add{/lang}',
11 'wcf.comment.button.response.add': '{lang}wcf.comment.button.response.add{/lang}',
12 'wcf.comment.delete.confirmMessage': '{lang}wcf.comment.delete.confirmMessage{/lang}',
13 'wcf.comment.description': '{lang}wcf.comment.description{/lang}',
14 'wcf.comment.more': '{lang}wcf.comment.more{/lang}',
15 'wcf.comment.response.add': '{lang}wcf.comment.response.add{/lang}',
16 'wcf.comment.response.more': '{lang}wcf.comment.response.more{/lang}',
17 'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
18 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
19 });
20
21 new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}');
22 {if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike')}
23 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});
24 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});
25 {/if}
26
27 new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.comment', '.jsReportCommentComment');
28 new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.response', '.jsReportCommentResponse');
29 });
30 //]]>
31 </script>
32
33 {event name='javascriptInclude'}