Added 'canReportContent' permission
authorMarcel Werk <burntime@woltlab.com>
Fri, 23 May 2014 20:05:29 +0000 (22:05 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 23 May 2014 20:05:29 +0000 (22:05 +0200)
templates/conversation.tpl
templates/conversationMessageList.tpl

index 219fab60a792fc8300d2e7ec6c1344a623ae8932..ab19ed136792c1dcaabd3967654e6a90872e4881 100644 (file)
@@ -38,7 +38,9 @@
                        new WCF.Conversation.Message.QuoteHandler($quoteManager);
                        {if !$conversation->isClosed}new WCF.Conversation.QuickReply($quoteManager);{/if}
                        
-                       new WCF.Moderation.Report.Content('com.woltlab.wcf.conversation.message', '.jsReportConversationMessage');
+                       {if $__wcf->session->getPermission('user.profile.canReportContent')}
+                               new WCF.Moderation.Report.Content('com.woltlab.wcf.conversation.message', '.jsReportConversationMessage');
+                       {/if}
                        new WCF.Conversation.RemoveParticipant({@$conversation->conversationID});
                        new WCF.Message.BBCode.CodeViewer();
                });
index 845a76badca459b64a3ff58cd5e4b35c5a97dc57..0930fcf3d7603642b672d484763f8c76f636cebb 100644 (file)
@@ -57,7 +57,7 @@
                                                                        <ul class="smallButtons buttonGroup">
                                                                                {if $message->canEdit()}<li><a href="{link controller='ConversationMessageEdit' id=$message->messageID}{/link}" title="{lang}wcf.conversation.message.edit{/lang}" class="button jsMessageEditButton"><span class="icon icon16 icon-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>{/if}
                                                                                <li class="jsQuoteMessage" data-object-id="{@$message->messageID}" data-is-quoted="{if $__quoteFullQuote|isset && $message->messageID|in_array:$__quoteFullQuote}1{else}0{/if}"><a href="{link controller='ConversationMessageAdd' id=$conversation->conversationID quoteMessageID=$message->messageID}{/link}" title="{lang}wcf.message.quote.quoteMessage{/lang}" class="button jsTooltip{if $__quoteFullQuote|isset && $message->messageID|in_array:$__quoteFullQuote} active{/if}"><span class="icon icon16 icon-quote-left"></span> <span class="invisible">{lang}wcf.message.quote.quoteMessage{/lang}</span></a></li>
-                                                                               {if $message->userID != $__wcf->getUser()->userID}<li class="jsReportConversationMessage jsOnly" data-object-id="{@$message->messageID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>{/if}
+                                                                               {if $message->userID != $__wcf->getUser()->userID && $__wcf->session->getPermission('user.profile.canReportContent')}<li class="jsReportConversationMessage jsOnly" data-object-id="{@$message->messageID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>{/if}
                                                                                {event name='messageOptions'}
                                                                                <li class="toTopLink"><a href="{$__wcf->getAnchor('top')}" title="{lang}wcf.global.scrollUp{/lang}" class="button jsTooltip"><span class="icon icon16 icon-arrow-up"></span> <span class="invisible">{lang}wcf.global.scrollUp{/lang}</span></a></li>
                                                                        </ul>