Added type-badge in moderation drop-down
authorMarcel Werk <burntime@woltlab.com>
Sun, 19 Jun 2016 16:43:34 +0000 (18:43 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 19 Jun 2016 16:43:40 +0000 (18:43 +0200)
com.woltlab.wcf/templates/moderationQueueList.tpl
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php

index 323eee588c2df155ef1a10117f8c2aed2f9ab250..3d4c95f4b39cdfaa06e2cf40a996c9ff08db3a64 100644 (file)
@@ -5,7 +5,10 @@
                                {@$queue->getUserProfile()->getAvatar()->getImageTag(48)}
                        </div>
                        <div>
-                               <h3><a href="{@$queue->getLink()}">{$queue->getAffectedObject()->getTitle()}</a></h3>
+                               <h3>
+                                       <span class="badge label">{lang}wcf.moderation.type.{@$definitionNames[$queue->objectTypeID]}{/lang}</span>
+                                       <a href="{@$queue->getLink()}">{$queue->getAffectedObject()->getTitle()}</a>
+                               </h3>
                                <small>{if $queue->getUserProfile()->userID}<a href="{link controller='User' object=$queue->getUserProfile()->getDecoratedObject()}{/link}">{$queue->getAffectedObject()->getUsername()}</a>{else}{$queue->getAffectedObject()->getUsername()}{/if} <span class="separatorLeft">{@$queue->lastChangeTime|time}</span></small>
                        </div>
                </div>
index 1c8f904281efcd67301b099ac10eab7a81f5d762..ec446480e21131e6b073f0e0a6c518994b159609 100644 (file)
@@ -163,7 +163,8 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction {
                }
                
                WCF::getTPL()->assign([
-                       'queues' => $queues
+                       'queues' => $queues,
+                       'definitionNames' => ModerationQueueManager::getInstance()->getDefinitionNamesByObjectTypeIDs()
                ]);
                
                return [