From bfba7ba69ad6315a9e0f50b0edda89ba51a0afef Mon Sep 17 00:00:00 2001 From: Joe Alcorn Date: Mon, 4 Feb 2013 22:12:18 +0000 Subject: [PATCH] Prevent likes, dislikes and unvoted scores being shown in the widget at the same time --- r2/r2/templates/link.htmllite | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/r2/r2/templates/link.htmllite b/r2/r2/templates/link.htmllite index 73cd2b1f3..dcac03632 100644 --- a/r2/r2/templates/link.htmllite +++ b/r2/r2/templates/link.htmllite @@ -37,6 +37,12 @@ %endif +<%def name="hide_if_appropriate(state)"> + %if thing.like_cls != state: + ${optionalstyle("display: none;")} + %endif + + <%def name="entry()"> <% from r2.lib.strings import Score @@ -96,13 +102,13 @@ <% score_dislikes, score_unvoted, score_likes = thing.display_score %> - + ${score_dislikes} - + ${score_unvoted} -