Add indicator for reputation on article list
authorJoshua Rüsweg <josh@bastelstu.be>
Mon, 8 Oct 2018 09:36:03 +0000 (11:36 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Mon, 8 Oct 2018 09:36:03 +0000 (11:36 +0200)
See #2508

com.woltlab.wcf/templates/articleListItems.tpl

index 21dc237435f26479633d7bbd9f306def3ca5c4a4..19088682871838e0b3093b7f67d3136e3ac40816 100644 (file)
                                                                        </li>
                                                                {/if}
                                                                
+                                                               {if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike')}
+                                                                       <li class="reputationCounter {if $article->cumulativeLikes > 0}positive{elseif $article->cumulativeLikes < 0}negative{else}neutral{/if}" data-object-id="{@$article->articleID}" data-object-type="com.woltlab.wcf.likeableArticle">
+                                                                               {if $article->likes || $article->dislikes || $article->neutralReactions}
+                                                                                       <span class="icon icon16 fa-smile-o"></span>{if $article->cumulativeLikes > 0}+{elseif $article->cumulativeLikes == 0}±{/if}{#$article->cumulativeLikes}
+                                                                               {/if}
+                                                                       </li>
+                                                               {/if}
+                                                               
                                                                {if ARTICLE_ENABLE_VISIT_TRACKING && $article->isNew()}<li><span class="badge label newMessageBadge">{lang}wcf.message.new{/lang}</span></li>{/if}
 
                                                                {if $article->isDeleted}<li><span class="badge label red">{lang}wcf.message.status.deleted{/lang}</span></li>{/if}