Make trophy category description optional
authorJoshua Rüsweg <josh@bastelstu.be>
Wed, 16 Aug 2017 15:40:36 +0000 (17:40 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Wed, 16 Aug 2017 15:40:47 +0000 (17:40 +0200)
com.woltlab.wcf/templates/trophyList.tpl
wcfsetup/install/files/lib/system/category/TrophyCategoryType.class.php

index 3c1b122861fc05d27d5378432489287ea9b1b137..ef3fb4b57fd2d9dd42084069609d76c932a3dbb2 100644 (file)
@@ -4,11 +4,9 @@
        <header class="contentHeader messageGroupContentHeader">
                <div class="contentHeaderTitle">
                        <h1 class="contentTitle">{$category->getTitle()}</h1>
-                       <ul class="inlineList contentHeaderMetaData">
-                               <li>
-                                       {$category->getDescription()}
-                               </li>
-                       </ul>
+                       {if $category->getDescription()}
+                               <p class="contentHeaderDescription">{$category->getDescription()}</p>
+                       {/if}
                </div>
        </header>
 {/capture}
index 0258ba796c08ad5ce90285901e61e570b57e8e1f..e0ec86fac9d29b4017fa01a3f6e07a20ac48b99a 100644 (file)
@@ -25,6 +25,11 @@ class TrophyCategoryType extends AbstractCategoryType {
         */
        protected $maximumNestingLevel = 0;
        
+       /**
+        * @inheritDoc
+        */
+       protected $forceDescription = false;
+       
        /** @noinspection PhpMissingParentCallCommonInspection */
        /**
         * @inheritDoc