From 6552b6447cd99c2b5e380421860793a68fc72507 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 11 Dec 2014 14:30:18 +0100 Subject: [PATCH] Added 'mark as read' system for moderation queue items --- com.woltlab.wcf/objectType.xml | 7 ++ com.woltlab.wcf/templates/moderationList.tpl | 23 +++- com.woltlab.wcf/templates/userPanel.tpl | 2 +- wcfsetup/install/files/js/WCF.Moderation.js | 116 ++++++++++++++++++ .../queue/ModerationQueue.class.php | 2 +- .../queue/ModerationQueueAction.class.php | 53 ++++++++ .../queue/ViewableModerationQueue.class.php | 12 ++ .../lib/form/AbstractModerationForm.class.php | 9 ++ .../queue/ModerationQueueManager.class.php | 97 +++++++++++---- wcfsetup/install/lang/de.xml | 2 + wcfsetup/install/lang/en.xml | 2 + 11 files changed, 296 insertions(+), 29 deletions(-) diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 4a9c9c370d..488a260746 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -152,6 +152,13 @@ + + + com.woltlab.wcf.moderation.queue + com.woltlab.wcf.visitTracker.objectType + + + com.woltlab.wcf.like.activityPointEvent.receivedLikes diff --git a/com.woltlab.wcf/templates/moderationList.tpl b/com.woltlab.wcf/templates/moderationList.tpl index 228e8b9f50..7c135ac442 100644 --- a/com.woltlab.wcf/templates/moderationList.tpl +++ b/com.woltlab.wcf/templates/moderationList.tpl @@ -4,6 +4,15 @@ {lang}wcf.moderation.moderation{/lang} {if $pageNo > 1}- {lang}wcf.page.pageNo{/lang} {/if}- {PAGE_TITLE|language} {include file='headInclude'} + + @@ -57,6 +66,10 @@ {event name='sidebarBoxes'} {/capture} +{capture assign='headerNavigation'} +
  • +{/capture} + {include file='header' sidebarOrientation='left'}
    @@ -88,7 +101,6 @@ - @@ -100,9 +112,12 @@ {foreach from=$objects item=entry} - - - + +
    {lang}wcf.global.objectID{/lang} {lang}wcf.moderation.title{/lang} {lang}wcf.moderation.assignedUser{/lang} {lang}wcf.moderation.comments{/lang}
    {@$entry->queueID}

    {@$entry->getUserProfile()->getAvatar()->getImageTag(32)}

    +
    +

    isNew()} title="{lang}wcf.moderation.markAsRead.doubleClick{/lang}"{/if}>{@$entry->getUserProfile()->getAvatar()->getImageTag(32)}

    +
    +

    {lang}wcf.moderation.type.{@$definitionNames[$entry->objectTypeID]}{/lang} diff --git a/com.woltlab.wcf/templates/userPanel.tpl b/com.woltlab.wcf/templates/userPanel.tpl index a1adbde952..684b58ebae 100644 --- a/com.woltlab.wcf/templates/userPanel.tpl +++ b/com.woltlab.wcf/templates/userPanel.tpl @@ -188,7 +188,7 @@ {lang}wcf.moderation.moderation{/lang} - {if $__wcf->getModerationQueueManager()->getOutstandingModerationCount()}{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}{/if} + {if $__wcf->getModerationQueueManager()->getUnreadModerationCount()}{#$__wcf->getModerationQueueManager()->getUnreadModerationCount()}{/if} {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')}