Hide comment counter if comments are disabled
authorMarcel Werk <burntime@woltlab.com>
Wed, 28 Sep 2016 09:34:45 +0000 (11:34 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 28 Sep 2016 09:34:51 +0000 (11:34 +0200)
com.woltlab.wcf/templates/article.tpl
com.woltlab.wcf/templates/articleListItems.tpl

index d62a8d8154052417a258fbdf8d3e4893c78818ba..1ee8b7d21b08654e419524a74bea1ac92b10d8f9 100644 (file)
                                        <meta itemprop="dateModified" content="{@$article->time|date:'c'}">
                                </li>
                                
-                               <li itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
-                                       <span class="icon icon16 fa-comments"></span>
-                                       <span>{lang}wcf.article.articleComments{/lang}</span>
-                                       <meta itemprop="interactionType" content="http://schema.org/CommentAction">
-                                       <meta itemprop="userInteractionCount" content="{@$article->comments}">
-                               </li>
+                               {if $article->enableComments}
+                                       <li itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
+                                               <span class="icon icon16 fa-comments"></span>
+                                               <span>{lang}wcf.article.articleComments{/lang}</span>
+                                               <meta itemprop="interactionType" content="http://schema.org/CommentAction">
+                                               <meta itemprop="userInteractionCount" content="{@$article->comments}">
+                                       </li>
+                               {/if}
                                
                                <li>
                                        <span class="icon icon16 fa-eye"></span>
index e8d4ee5e50a3389929ceb3538a447707df1d33d9..242e623770f4c9f7147702a1c1558d6ef0687236 100644 (file)
                                                                        {@$article->time|time}
                                                                </li>
                                                                
-                                                               <li>
-                                                                       <span class="icon icon16 fa-comments"></span>
-                                                                       {lang}wcf.article.articleComments{/lang}
-                                                               </li>
+                                                               {if $article->enableComments}
+                                                                       <li>
+                                                                               <span class="icon icon16 fa-comments"></span>
+                                                                               {lang}wcf.article.articleComments{/lang}
+                                                                       </li>
+                                                               {/if}
                                                                
                                                                {if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike')}
                                                                        <li class="wcfLikeCounter{if $article->cumulativeLikes > 0} likeCounterLiked{elseif $article->cumulativeLikes < 0}likeCounterDisliked{/if}">