Improved UI for done queues
authorAlexander Ebert <ebert@woltlab.com>
Wed, 31 Jul 2013 23:10:20 +0000 (01:10 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 31 Jul 2013 23:10:20 +0000 (01:10 +0200)
com.woltlab.wcf/templates/moderationActivation.tpl
com.woltlab.wcf/templates/moderationReport.tpl
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueue.class.php

index ee789582ae16a725a336a45f625500810e3875c3..ed1db0bed1f69675caae4701b161a255cd6e9a08 100644 (file)
 <div class="contentNavigation">
        <nav>
                <ul>
-                       <li class="jsOnly"><button id="enableContent">{lang}wcf.moderation.activation.enableContent{/lang}</button></li>
-                       <li class="jsOnly"><button id="removeContent">{lang}wcf.moderation.activation.removeContent{/lang}</button></li>
+                       {if !$queue->isDone()}
+                               <li class="jsOnly"><button id="enableContent">{lang}wcf.moderation.activation.enableContent{/lang}</button></li>
+                               <li class="jsOnly"><button id="removeContent">{lang}wcf.moderation.activation.removeContent{/lang}</button></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>
                        
                        {event name='contentNavigationButtonsBottom'}
index 985eb95e8d876a4f17cb2565346a8635a973ca6f..8955c644ac4e6832afa57305c2e4f70d8ccfe330 100644 (file)
 <div class="contentNavigation">
        <nav>
                <ul>
-                       <li class="jsOnly"><button id="removeContent">{lang}wcf.moderation.report.removeContent{/lang}</button></li>
-                       {if $queue->status != 2}
+                       {if !$queue->isDone()}
+                               <li class="jsOnly"><button id="removeContent">{lang}wcf.moderation.report.removeContent{/lang}</button></li>
                                <li class="jsOnly"><button id="removeReport">{lang}wcf.moderation.report.removeReport{/lang}</button></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>
index f31987756cb30531d8a38c13990d5f6d401f3894..b2b8447fcc701674efe382a2159a12cc72b85484 100644 (file)
@@ -76,4 +76,13 @@ class ModerationQueue extends DatabaseObject {
                
                return ($row !== false && $row['isAffected']);
        }
+       
+       /**
+        * Returns true, if this queue is done.
+        * 
+        * @return      boolean
+        */
+       public function isDone() {
+               return ($this->status == self::STATUS_DONE);
+       }
 }