diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-09-12 09:31:21 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-09-12 09:31:21 +0200 |
commit | bf62d083d818f074522f7fb095f93987afbb5bdc (patch) | |
tree | 87a26e868eec95f6d1a65a224f159731143a7b45 /hyperkitty/templates | |
parent | 643a4a97ff7cd5013e25d2eeb6bcc68cf524c1d7 (diff) | |
download | hyperkitty-bf62d083d818f074522f7fb095f93987afbb5bdc.tar.gz hyperkitty-bf62d083d818f074522f7fb095f93987afbb5bdc.tar.xz hyperkitty-bf62d083d818f074522f7fb095f93987afbb5bdc.zip |
Improve the user voting display (only one SQL query)
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/user_profile.html | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/hyperkitty/templates/user_profile.html b/hyperkitty/templates/user_profile.html index 3077141..8f73e81 100644 --- a/hyperkitty/templates/user_profile.html +++ b/hyperkitty/templates/user_profile.html @@ -33,12 +33,12 @@ </tr> </tbody> </table> + {% if settings.USE_MOCKUPS %} - <h3> Up Votes : </h3> + <h3> Up Votes : </h3> <ul> - {% for vote in user_profile.votes %} - {% if vote.vote == 1 %} + {% for vote in votes_up %} <li> {% if vote.message.content|trimString|length > 0 %} <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">{{ vote.message.content|truncatechars:20 }}</a> @@ -46,15 +46,12 @@ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">Message is empty</a> {% endif %} </li> - {% endif %} {% endfor %} </ul> <h3> Down Votes : </h3> - <ul> - {% for vote in user_profile.votes %} - {% if vote.vote == -1 %} + {% for vote in votes_down %} <li> {% if vote.message.content|trimString|length > 0 %} <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">{{ vote.message.content|truncatechars:20 }}</a> @@ -62,9 +59,9 @@ <a href="{% url message_index mlist_fqdn=vote.list_address, hashid=vote.messageid %}">Message is empty</a> {% endif %} </li> - {% endif %} {% endfor %} </ul> + {% endif %} |