Hide comment counter when comments are disabled
authorMarcel Werk <burntime@woltlab.com>
Sun, 28 Mar 2021 11:02:52 +0000 (13:02 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 28 Mar 2021 11:02:52 +0000 (13:02 +0200)
com.woltlab.wcf/templates/articleListItems.tpl

index cb2b593b0b6e44fe8aedc426cc73313ff179694c..ae5f39bab58d0ef75d6015670c276c3529918ca3 100644 (file)
                                                        {include file='__topReaction' cachedReactions=$article->cachedReactions render='short'}
                                                </div>
                                        {/if}
-                                       <div class="contentItemMetaIcon">
-                                               <span class="icon icon16 fa-comments"></span>
-                                               <span aria-label="{$article->getDiscussionProvider()->getDiscussionCountPhrase()}">
-                                                       {$article->getDiscussionProvider()->getDiscussionCount()}
-                                               </span>
-                                       </div>
-                                       
+                                       {if $article->getDiscussionProvider()->getDiscussionCountPhrase()}{* empty phrase indicates that comments are disabled *}
+                                               <div class="contentItemMetaIcon">
+                                                       <span class="icon icon16 fa-comments"></span>
+                                                       <span aria-label="{$article->getDiscussionProvider()->getDiscussionCountPhrase()}">
+                                                               {$article->getDiscussionProvider()->getDiscussionCount()}
+                                                       </span>
+                                               </div>
+                                       {/if}
+
                                        {event name='contentItemMetaIcons'}
                                </div>
                        </div>