<classname><![CDATA[wcf\system\user\notification\object\type\UserProfileCommentResponseLikeUserNotificationObjectType]]></classname>
<category>com.woltlab.wcf.user</category>
</type>
+
+ <type>
+ <name>com.woltlab.wcf.moderation.queue</name>
+ <definitionname>com.woltlab.wcf.comment.commentableContent</definitionname>
+ <classname><![CDATA[wcf\system\comment\manager\ModerationQueueCommentManager]]></classname>
+ </type>
<!-- /comments -->
<!-- moderation -->
});
new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}');
- {if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike')}
+ {if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike')}
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});
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});
{/if}
- {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ {if $commentList->getCommentManager()->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.comment', '.jsReportCommentComment');
new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.response', '.jsReportCommentResponse');
{/if}
+{if !$commentManager|isset}{assign var='commentManager' value=$commentList->getCommentManager()}{/if}
{foreach from=$commentList item=comment}
<li class="comment jsComment" data-comment-id="{@$comment->commentID}" data-object-type="com.woltlab.wcf.comment" data-like-liked="{if $likeData[comment][$comment->commentID]|isset}{@$likeData[comment][$comment->commentID]->liked}{/if}" data-like-likes="{if $likeData[comment][$comment->commentID]|isset}{@$likeData[comment][$comment->commentID]->likes}{else}0{/if}" data-like-dislikes="{if $likeData[comment][$comment->commentID]|isset}{@$likeData[comment][$comment->commentID]->dislikes}{else}0{/if}" data-like-users='{if $likeData[comment][$comment->commentID]|isset}{ {implode from=$likeData[comment][$comment->commentID]->getUsers() item=likeUser}"{@$likeUser->userID}": { "username": "{$likeUser->username|encodeJSON}" }{/implode} }{else}{ }{/if}' data-can-edit="{if $comment->isEditable()}true{else}false{/if}" data-can-delete="{if $comment->isDeletable()}true{else}false{/if}" data-responses="{@$comment->responses}" data-last-response-time="{@$comment->getLastResponseTime()}" data-user-id="{@$comment->userID}">
<div class="box32">
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="commentOptions">
- {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ {if $commentManager->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
<li class="jsReportCommentComment jsOnly" data-object-id="{@$comment->commentID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
{/if}
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="commentOptions">
- {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ {if $commentManager->supportsReport() && $__wcf->session->getPermission('user.profile.canReportContent')}
<li class="jsReportCommentResponse jsOnly" data-object-id="{@$response->responseID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
{/if}
{include file='documentHeader'}
<head>
- <title>{lang}wcf.moderation.activation{/lang} - {PAGE_TITLE|language}</title>
+ <title>{lang}wcf.moderation.activation{/lang}: {$queue->getTitle()} - {PAGE_TITLE|language}</title>
{include file='headInclude'}
<body id="tpl{$templateName|ucfirst}">
-{include file='header' sidebarOrientation='left'}
+{capture assign='sidebar'}
+ <form method="post" action="{link controller='ModerationActivation' id=$queue->queueID}{/link}">
+ <fieldset>
+ <legend>{lang}wcf.moderation.report.details{/lang}</legend>
+
+ <dl>
+ <dt>{lang}wcf.moderation.assignedUser{/lang}</dt>
+ <dd>
+ <ul>
+ {if $assignedUserID && ($assignedUserID != $__wcf->getUser()->userID)}
+ <li><label><input type="radio" name="assignedUserID" value="{@$assignedUserID}" checked="checked" /> {$queue->assignedUsername}</label></li>
+ {/if}
+ <li><label><input type="radio" name="assignedUserID" value="{@$__wcf->getUser()->userID}"{if $assignedUserID == $__wcf->getUser()->userID} checked="checked"{/if} /> {$__wcf->getUser()->username}</label></li>
+ <li><label><input type="radio" name="assignedUserID" value="0"{if !$assignedUserID} checked="checked"{/if} /> {lang}wcf.moderation.assignedUser.nobody{/lang}</label></li>
+ </ul>
+ </dd>
+ </dl>
+ {if $queue->assignedUser}
+ <dl>
+ <dt></dt>
+ <dd><a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-user-id="{@$assignedUserID}">{$queue->assignedUsername}</a></dd>
+ </dl>
+ {/if}
+
+ {event name='detailsFields'}
+
+ <div class="formSubmit">
+ <input type="submit" value="{lang}wcf.global.button.submit{/lang}" />
+ {@SECURITY_TOKEN_INPUT_TAG}
+ </div>
+ </fieldset>
+
+ {event name='fieldsets'}
+ </form>
+
+ {event name='boxes'}
+{/capture}
+
+{include file='header' sidebarOrientation='right'}
<header class="boxHeadline">
- <h1>{lang}wcf.moderation.activation{/lang}</h1>
+ <h1>{lang}wcf.moderation.activation{/lang}: {$queue->getTitle()}</h1>
+
+ {if $queue->lastChangeTime}
+ <dl class="plain inlineDataList">
+ <dt>{lang}wcf.moderation.lastChangeTime{/lang}</dt>
+ <dd>{@$queue->lastChangeTime|time}</dd>
+ </dl>
+ {/if}
</header>
{include file='userNotice'}
{include file='formError'}
-<div class="contentNavigation">
- <nav>
- <ul>
- <li><a href="{link controller='ModerationList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.moderation.moderation{/lang}</span></a></li>
-
- {event name='contentNavigationButtonsTop'}
- </ul>
- </nav>
-</div>
-
-<form method="post" action="{link controller='ModerationActivation' id=$queue->queueID}{/link}" class="container containerPadding marginTop">
- <fieldset>
- <legend>{lang}wcf.moderation.activation.details{/lang}</legend>
-
- <dl>
- <dt>{lang}wcf.global.objectID{/lang}</dt>
- <dd>{#$queue->queueID}</dd>
- </dl>
- {if $queue->lastChangeTime}
- <dl>
- <dt>{lang}wcf.moderation.lastChangeTime{/lang}</dt>
- <dd>{@$queue->lastChangeTime|time}</dd>
- </dl>
- {/if}
- <dl>
- <dt>{lang}wcf.moderation.assignedUser{/lang}</dt>
- <dd>
- <ul>
- {if $assignedUserID && ($assignedUserID != $__wcf->getUser()->userID)}
- <li><label><input type="radio" name="assignedUserID" value="{@$assignedUserID}" checked="checked" /> {$queue->assignedUsername}</label></li>
- {/if}
- <li><label><input type="radio" name="assignedUserID" value="{@$__wcf->getUser()->userID}"{if $assignedUserID == $__wcf->getUser()->userID} checked="checked"{/if} /> {$__wcf->getUser()->username}</label></li>
- <li><label><input type="radio" name="assignedUserID" value="0"{if !$assignedUserID} checked="checked"{/if} /> {lang}wcf.moderation.assignedUser.nobody{/lang}</label></li>
- </ul>
- </dd>
- </dl>
- {if $queue->assignedUser}
- <dl>
- <dt></dt>
- <dd><a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-user-id="{@$assignedUserID}">{$queue->assignedUsername}</a></dd>
- </dl>
- {/if}
- <dl>
- <dt><label for="comment">{lang}wcf.moderation.comment{/lang}</label></dt>
- <dd><textarea id="comment" name="comment" rows="4" cols="40">{$comment}</textarea></dd>
- </dl>
-
- {event name='detailsFields'}
-
- <div class="formSubmit">
- <input type="submit" value="{lang}wcf.global.button.submit{/lang}" />
- {@SECURITY_TOKEN_INPUT_TAG}
- </div>
- </fieldset>
-
- {event name='fieldsets'}
-</form>
-
<header class="boxHeadline boxSubHeadline">
<h2>{lang}wcf.moderation.activation.content{/lang}</h2>
</header>
{if $queueManager->canRemoveContent($queue->getDecoratedObject())}<li class="jsOnly"><a id="enableContent" class="button"><span class="icon icon16 icon-check"></span> <span>{lang}wcf.moderation.activation.enableContent{/lang}</span></a></li>{/if}
<li class="jsOnly"><a id="removeContent" class="button"><span class="icon icon16 icon-remove"></span> <span>{lang}wcf.moderation.activation.removeContent{/lang}</span></a></li>
{/if}
- <li><a href="{link controller='ModerationList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.moderation.moderation{/lang}</span></a></li>
+ {if $queue->getAffectedObject()}<li><a href="{$queue->getAffectedObject()->getLink()}" class="button"><span class="icon icon16 fa-arrow-right"></span> <span>{lang}wcf.moderation.jumpToContent{/lang}</span></a></li>{/if}
- {event name='contentNavigationButtonsBottom'}
+ {event name='contentNavigationButtons'}
</ul>
</nav>
</div>
+<header id="comments" class="boxHeadline boxSubHeadline">
+ <h2>{lang}wcf.moderation.comments{/lang} <span class="badge">{#$queue->comments}</span></h2>
+ <p>{lang}wcf.moderation.comments.description{/lang}</p>
+</header>
+
+{include file='__commentJavaScript' commentContainerID='moderationQueueCommentList'}
+
+<div class="container containerList marginTop blogEntryComments">
+ <ul id="moderationQueueCommentList" class="commentList containerList" data-can-add="true" data-object-id="{@$queueID}" data-object-type-id="{@$commentObjectTypeID}" data-comments="{@$commentList->countObjects()}" data-last-comment-time="{@$lastCommentTime}">
+ {include file='commentList'}
+ </ul>
+</div>
+
{include file='footer'}
</body>
{include file='documentHeader'}
<head>
- <title>{lang}wcf.moderation.report{/lang} - {PAGE_TITLE|language}</title>
+ <title>{lang}wcf.moderation.report{/lang}: {$queue->getTitle()} - {PAGE_TITLE|language}</title>
{include file='headInclude'}
<body id="tpl{$templateName|ucfirst}">
-{include file='header' sidebarOrientation='left'}
+{capture assign='sidebar'}
+ <form method="post" action="{link controller='ModerationReport' id=$queue->queueID}{/link}">
+ <fieldset>
+ <legend>{lang}wcf.moderation.report.details{/lang}</legend>
+
+ <dl>
+ <dt>{lang}wcf.moderation.assignedUser{/lang}</dt>
+ <dd>
+ <ul>
+ {if $assignedUserID && ($assignedUserID != $__wcf->getUser()->userID)}
+ <li><label><input type="radio" name="assignedUserID" value="{@$assignedUserID}" checked="checked" /> {$queue->assignedUsername}</label></li>
+ {/if}
+ <li><label><input type="radio" name="assignedUserID" value="{@$__wcf->getUser()->userID}"{if $assignedUserID == $__wcf->getUser()->userID} checked="checked"{/if} /> {$__wcf->getUser()->username}</label></li>
+ <li><label><input type="radio" name="assignedUserID" value="0"{if !$assignedUserID} checked="checked"{/if} /> {lang}wcf.moderation.assignedUser.nobody{/lang}</label></li>
+ </ul>
+ </dd>
+ </dl>
+ {if $queue->assignedUser}
+ <dl>
+ <dt></dt>
+ <dd><a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-user-id="{@$assignedUserID}">{$queue->assignedUsername}</a></dd>
+ </dl>
+ {/if}
+
+ {event name='detailsFields'}
+
+ <div class="formSubmit">
+ <input type="submit" value="{lang}wcf.global.button.submit{/lang}" />
+ {@SECURITY_TOKEN_INPUT_TAG}
+ </div>
+ </fieldset>
+
+ {event name='fieldsets'}
+ </form>
+
+ {event name='boxes'}
+{/capture}
+
+{include file='header' sidebarOrientation='right'}
<header class="boxHeadline">
- <h1>{lang}wcf.moderation.report{/lang}</h1>
+ <h1>{lang}wcf.moderation.report{/lang}: {$queue->getTitle()}</h1>
+
+ {if $queue->lastChangeTime}
+ <dl class="plain inlineDataList">
+ <dt>{lang}wcf.moderation.lastChangeTime{/lang}</dt>
+ <dd>{@$queue->lastChangeTime|time}</dd>
+ </dl>
+ {/if}
</header>
{include file='userNotice'}
{include file='formError'}
-<div class="contentNavigation">
- <nav>
- <ul>
- <li><a href="{link controller='ModerationList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.moderation.moderation{/lang}</span></a></li>
-
- {event name='contentNavigationButtonsTop'}
- </ul>
- </nav>
-</div>
-
-<form method="post" action="{link controller='ModerationReport' id=$queue->queueID}{/link}" class="container containerPadding marginTop">
- <fieldset>
- <legend>{lang}wcf.moderation.report.details{/lang}</legend>
-
- <dl>
- <dt>{lang}wcf.global.objectID{/lang}</dt>
- <dd>{#$queue->queueID}</dd>
- </dl>
- <dl>
- <dt>{lang}wcf.moderation.report.reportedBy{/lang}</dt>
- <dd>{if $queue->userID}<a href="{link controller='User' id=$queue->userID}{/link}" class="userLink" data-user-id="{@$queue->userID}">{$queue->username}</a>{else}{lang}wcf.user.guest{/lang}{/if} ({@$queue->time|time})</dd>
- </dl>
- {if $queue->lastChangeTime}
- <dl>
- <dt>{lang}wcf.moderation.lastChangeTime{/lang}</dt>
- <dd>{@$queue->lastChangeTime|time}</dd>
- </dl>
- {/if}
- <dl>
- <dt>{lang}wcf.moderation.assignedUser{/lang}</dt>
- <dd>
- <ul>
- {if $assignedUserID && ($assignedUserID != $__wcf->getUser()->userID)}
- <li><label><input type="radio" name="assignedUserID" value="{@$assignedUserID}" checked="checked" /> {$queue->assignedUsername}</label></li>
- {/if}
- <li><label><input type="radio" name="assignedUserID" value="{@$__wcf->getUser()->userID}"{if $assignedUserID == $__wcf->getUser()->userID} checked="checked"{/if} /> {$__wcf->getUser()->username}</label></li>
- <li><label><input type="radio" name="assignedUserID" value="0"{if !$assignedUserID} checked="checked"{/if} /> {lang}wcf.moderation.assignedUser.nobody{/lang}</label></li>
- </ul>
- </dd>
- </dl>
- {if $queue->assignedUser}
- <dl>
- <dt></dt>
- <dd><a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-user-id="{@$assignedUserID}">{$queue->assignedUsername}</a></dd>
- </dl>
- {/if}
- <dl>
- <dt>{lang}wcf.moderation.report.reason{/lang}</dt>
- <dd>{@$queue->getFormattedMessage()}</dd>
- </dl>
- <dl>
- <dt><label for="comment">{lang}wcf.moderation.comment{/lang}</label></dt>
- <dd><textarea id="comment" name="comment" rows="4" cols="40">{$comment}</textarea></dd>
- </dl>
-
- {event name='detailsFields'}
-
- <div class="formSubmit">
- <input type="submit" value="{lang}wcf.global.button.submit{/lang}" />
- {@SECURITY_TOKEN_INPUT_TAG}
- </div>
- </fieldset>
-
- {event name='fieldsets'}
-</form>
-
<header class="boxHeadline boxSubHeadline">
<h2>{lang}wcf.moderation.report.reportedContent{/lang}</h2>
</header>
{if $queueManager->canRemoveContent($queue->getDecoratedObject())}<li class="jsOnly"><a id="removeContent" class="button"><span class="icon icon16 icon-remove"></span> <span>{lang}wcf.moderation.report.removeContent{/lang}</span></a></li>{/if}
<li class="jsOnly"><a id="removeReport" class="button"><span class="icon icon16 icon-remove"></span> <span>{lang}wcf.moderation.report.removeReport{/lang}</span></a></li>
{/if}
- <li><a href="{link controller='ModerationList'}{/link}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}wcf.moderation.moderation{/lang}</span></a></li>
+ {if $queue->getAffectedObject()}<li><a href="{$queue->getAffectedObject()->getLink()}" class="button"><span class="icon icon16 fa-arrow-right"></span> <span>{lang}wcf.moderation.jumpToContent{/lang}</span></a></li>{/if}
- {event name='contentNavigationButtonsBottom'}
+ {event name='contentNavigationButtons'}
</ul>
</nav>
</div>
+<header class="boxHeadline boxSubHeadline">
+ <h2>{lang}wcf.moderation.report.reportedBy{/lang}</h2>
+</header>
+
+<div class="container containerPadding marginTop">
+ <div class="box32">
+ {if $reportUser->userID}
+ <a href="{link controller='User' object=$reportUser}{/link}" title="{$reportUser->username}" class="framed">
+ {@$reportUser->getAvatar()->getImageTag(32)}
+ </a>
+ {else}
+ <span class="framed">{@$reportUser->getAvatar()->getImageTag(32)}</span>
+ {/if}
+
+ <div>
+ <div class="containerHeadline">
+ <h3>
+ {if $queue->userID}
+ <a href="{link controller='User' id=$queue->userID}{/link}" class="userLink" data-user-id="{@$queue->userID}">{$queue->username}</a>
+ {else}
+ {lang}wcf.user.guest{/lang}
+ {/if}
+
+ <small> - {@$queue->time|time}</small>
+ </h3>
+ </div>
+
+ <div>{@$queue->getFormattedMessage()}</div>
+ </div>
+ </div>
+</div>
+
+<header id="comments" class="boxHeadline boxSubHeadline">
+ <h2>{lang}wcf.moderation.comments{/lang} <span class="badge">{#$queue->comments}</span></h2>
+ <p>{lang}wcf.moderation.comments.description{/lang}</p>
+</header>
+
+{include file='__commentJavaScript' commentContainerID='moderationQueueCommentList'}
+
+<div class="container containerList marginTop blogEntryComments">
+ <ul id="moderationQueueCommentList" class="commentList containerList" data-can-add="true" data-object-id="{@$queueID}" data-object-type-id="{@$commentObjectTypeID}" data-comments="{@$commentList->countObjects()}" data-last-comment-time="{@$lastCommentTime}">
+ {include file='commentList'}
+ </ul>
+</div>
+
{include file='footer'}
</body>
}
WCF::getTPL()->assign(array(
- 'commentList' => array($comment)
+ 'commentList' => array($comment),
+ 'commentManager' => $this->commentProcessor
));
return WCF::getTPL()->fetch('commentList');
}
// render response
WCF::getTPL()->assign(array(
- 'responseList' => array($response)
+ 'responseList' => array($response),
+ 'commentManager' => $this->commentProcessor
));
return WCF::getTPL()->fetch('commentResponseList');
}
public function getMinCommentTime() {
return $this->minCommentTime;
}
+
+ /**
+ * Returns the comment manager object.
+ *
+ * @return \wcf\system\comment\manager\ICommentManager
+ */
+ public function getCommentManager() {
+ return $this->commentManager;
+ }
}
WCF::getTPL()->assign(array(
'likeData' => (MODULE_LIKE ? $responseList->getLikeData() : array()),
- 'responseList' => $responseList
+ 'responseList' => $responseList,
+ 'commentManager' => $this->commentManager
));
return array(
use wcf\data\moderation\queue\ModerationQueueAction;
use wcf\data\moderation\queue\ViewableModerationQueue;
use wcf\system\breadcrumb\Breadcrumb;
+use wcf\system\comment\CommentHandler;
use wcf\system\event\EventHandler;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
use wcf\system\request\LinkHandler;
+use wcf\system\user\collapsible\content\UserCollapsibleContentHandler;
use wcf\system\WCF;
-use wcf\util\StringUtil;
/**
* Provides an abstract form for moderation queue processing.
*/
public $assignedUserID = 0;
- /**
- * comment
- * @var string
- */
- public $comment = '';
-
/**
* data used for moderation queue update
* @var array
*/
public $queueID = 0;
+ /**
+ * comment object type id
+ * @var integer
+ */
+ public $commentObjectTypeID = 0;
+
+ /**
+ * comment manager object
+ * @var \wcf\system\comment\manager\ICommentManager
+ */
+ public $commentManager = null;
+
+ /**
+ * list of comments
+ * @var \wcf\data\comment\StructuredCommentList
+ */
+ public $commentList = null;
+
/**
* @see \wcf\page\IPage::readParameters()
*/
public function readFormParameters() {
parent::readFormParameters();
- if (isset($_POST['comment'])) $this->comment = StringUtil::trim($_POST['comment']);
-
// verify assigned user id
if (isset($_POST['assignedUserID'])) {
$this->assignedUserID = intval($_POST['assignedUserID']);
if (empty($_POST)) {
$this->assignedUserID = $this->queue->assignedUserID;
- $this->comment = $this->queue->comment;
}
WCF::getBreadcrumbs()->add(new Breadcrumb(
WCF::getLanguage()->get('wcf.moderation.moderation'),
LinkHandler::getInstance()->getLink('ModerationList')
));
+
+ $this->commentObjectTypeID = CommentHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue');
+ $this->commentManager = CommentHandler::getInstance()->getObjectType($this->commentObjectTypeID)->getProcessor();
+ $this->commentList = CommentHandler::getInstance()->getCommentList($this->commentManager, $this->commentObjectTypeID, $this->queueID);
}
/**
WCF::getTPL()->assign(array(
'assignedUserID' => $this->assignedUserID,
- 'comment' => $this->comment,
- 'queue' => $this->queue
+ 'queue' => $this->queue,
+ 'queueID' => $this->queueID,
+ 'commentCanAdd' => true,
+ 'commentList' => $this->commentList,
+ 'commentObjectTypeID' => $this->commentObjectTypeID,
+ 'lastCommentTime' => ($this->commentList ? $this->commentList->getMinCommentTime() : 0),
+ 'sidebarCollapsed' => UserCollapsibleContentHandler::getInstance()->isCollapsed('com.woltlab.wcf.collapsibleSidebar', 'com.woltlab.wcf.ModerationForm'),
+ 'sidebarName' => 'com.woltlab.wcf.ModerationForm'
));
}
$this->data = array(
'assignedUserID' => ($this->assignedUserID ?: null),
- 'comment' => $this->comment
);
if ($this->queue->status != ModerationQueue::STATUS_DONE) {
if ($this->assignedUserID) {
<?php
namespace wcf\form;
+use wcf\data\user\UserProfile;
+use wcf\data\user\User;
use wcf\system\moderation\queue\ModerationQueueReportManager;
use wcf\system\WCF;
public function assignVariables() {
parent::assignVariables();
+ $reportUser = UserProfile::getUserProfile($this->queue->userID);
+ if ($reportUser === null) $reportUser = new UserProfile(new User(null, array()));
WCF::getTPL()->assign(array(
'reportedContent' => ModerationQueueReportManager::getInstance()->getReportedContent($this->queue),
- 'queueManager' => ModerationQueueReportManager::getInstance()
+ 'queueManager' => ModerationQueueReportManager::getInstance(),
+ 'reportUser' => $reportUser
));
}
}
public function getCommentsPerPage() {
return $this->commentsPerPage;
}
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::supportsLike()
+ */
+ public function supportsLike() {
+ return true;
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::supportsReport()
+ */
+ public function supportsReport() {
+ return true;
+ }
}
* @param integer $value
*/
public function updateCounter($objectID, $value);
+
+ /**
+ * Returns true, if this comment type supports likes.
+ *
+ * @return boolean
+ */
+ public function supportsLike();
+
+ /**
+ * Returns true, if this comment type supports reports.
+ *
+ * @return boolean
+ */
+ public function supportsReport();
}
--- /dev/null
+<?php
+namespace wcf\system\comment\manager;
+use wcf\data\moderation\queue\ModerationQueue;
+use wcf\data\moderation\queue\ModerationQueueEditor;
+use wcf\data\moderation\queue\ViewableModerationQueue;
+
+/**
+ * Moderation queue comment manager implementation.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2014 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage system.comment.manager
+ * @category Community Framework
+ */
+class ModerationQueueCommentManager extends AbstractCommentManager {
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::isAccessible()
+ */
+ public function isAccessible($objectID, $validateWritePermission = false) {
+ $entry = new ModerationQueue($objectID);
+ return $entry->canEdit();
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::getLink()
+ */
+ public function getLink($objectTypeID, $objectID) {
+ $entry = new ViewableModerationQueue(new ModerationQueue($objectID));
+ return $entry->getLink();
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::getTitle()
+ */
+ public function getTitle($objectTypeID, $objectID, $isResponse = false) {
+ return '';
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::updateCounter()
+ */
+ public function updateCounter($objectID, $value) {
+ $entry = new ModerationQueue($objectID);
+ $editor = new ModerationQueueEditor($entry);
+ $editor->updateCounters(array(
+ 'comments' => $value
+ ));
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::canAdd()
+ */
+ public function canAdd($objectID) {
+ if (!$this->isAccessible($objectID, true)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\AbstractCommentManager::canEdit()
+ */
+ protected function canEdit($isOwner) {
+ return $isOwner;
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\AbstractCommentManager::canDelete()
+ */
+ protected function canDelete($isOwner) {
+ return $isOwner;
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::supportsLike()
+ */
+ public function supportsLike() {
+ return false;
+ }
+
+ /**
+ * @see \wcf\system\comment\manager\ICommentManager::supportsReport()
+ */
+ public function supportsReport() {
+ return false;
+ }
+}
<category name="wcf.moderation">
<item name="wcf.moderation.assignedUser"><![CDATA[Zugewiesener Benutzer]]></item>
<item name="wcf.moderation.assignedUser.nobody"><![CDATA[Niemand]]></item>
- <item name="wcf.moderation.comment"><![CDATA[Kommentar (intern)]]></item>
<item name="wcf.moderation.filterByType"><![CDATA[Typ]]></item>
<item name="wcf.moderation.filterByUser"><![CDATA[Zugewiesener Benutzer]]></item>
<item name="wcf.moderation.filterByUser.allEntries"><![CDATA[Alle Einträge]]></item>
</category>
<category name="wcf.moderation.report">
- <item name="wcf.moderation.report"><![CDATA[Meldung bearbeiten]]></item>
+ <item name="wcf.moderation.report"><![CDATA[Meldung]]></item>
<item name="wcf.moderation.report.alreadyReported"><![CDATA[Dieser Inhalt wurde bereits gemeldet.]]></item>
<item name="wcf.moderation.report.details"><![CDATA[Informationen]]></item>
<item name="wcf.moderation.report.reason"><![CDATA[Grund der Meldung]]></item>
<category name="wcf.moderation">
<item name="wcf.moderation.assignedUser"><![CDATA[Assigned User]]></item>
<item name="wcf.moderation.assignedUser.nobody"><![CDATA[Nobody]]></item>
- <item name="wcf.moderation.comment"><![CDATA[Comment (internal)]]></item>
<item name="wcf.moderation.filterByType"><![CDATA[Type]]></item>
<item name="wcf.moderation.filterByUser"><![CDATA[Assigned User]]></item>
<item name="wcf.moderation.filterByUser.allEntries"><![CDATA[All Items]]></item>
</category>
<category name="wcf.moderation.report">
- <item name="wcf.moderation.report"><![CDATA[Edit Report]]></item>
+ <item name="wcf.moderation.report"><![CDATA[Report]]></item>
<item name="wcf.moderation.report.alreadyReported"><![CDATA[This content has already been reported.]]></item>
<item name="wcf.moderation.report.details"><![CDATA[Information]]></item>
<item name="wcf.moderation.report.reason"><![CDATA[Reason]]></item>
-- internal
assignedUserID INT(10) NULL,
status TINYINT(1) NOT NULL DEFAULT 0,
- comment TEXT,
+ comments SMALLINT(5) NOT NULL DEFAULT 0,
lastChangeTime INT(10) NOT NULL DEFAULT 0,
-- additional data, e.g. message if reporting content