summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-09-12 09:26:28 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-09-12 09:31:21 +0200
commitc8e6a738a6133ae82f50ead31d09d2b63569fe41 (patch)
tree87a26e868eec95f6d1a65a224f159731143a7b45 /hyperkitty/templates
parentf8a65b41490de49b6abbe459e5ee382d19ce8d46 (diff)
Improve the user voting display (only one SQL query)
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/user_profile.html13
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 %}