summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2012-04-23 19:29:05 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2012-04-23 19:29:05 +0200
commit8850d440b003ef86aabebd77e32b20c7d96a5e2f (patch)
treef81275ddddb282e4e01f05e6276ba64c8f05c8e7
parenta5599040601668b2cdb46c80e9e6380495a93ce9 (diff)
downloadhyperkitty-8850d440b003ef86aabebd77e32b20c7d96a5e2f.tar.gz
hyperkitty-8850d440b003ef86aabebd77e32b20c7d96a5e2f.tar.xz
hyperkitty-8850d440b003ef86aabebd77e32b20c7d96a5e2f.zip
Integrate gravatar within the thread view on the left column
-rw-r--r--templates/thread.html6
-rw-r--r--views/pages.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/templates/thread.html b/templates/thread.html
index 73685fc..bc0964e 100644
--- a/templates/thread.html
+++ b/templates/thread.html
@@ -57,10 +57,10 @@
<div id="participants">
<span id="participants_title"> participants </span>({{participants|length}})
<ul>
- {% for ppl in participants %}
+ {% for key,value in participants.items %}
<li>
- <img src="http://planet.fedoraproject.org/images/heads/default.png" alt="avatar" />
- {{ppl}}
+ {% gravatar_img_for_email value.Email 20%}
+ {{key}}
</li>
{% endfor %}
</ul>
diff --git a/views/pages.py b/views/pages.py
index 415316d..67ade37 100644
--- a/views/pages.py
+++ b/views/pages.py
@@ -346,13 +346,13 @@ def thread (request, mlist_fqdn, threadid):
if len(next_thread) > 30:
next_thread = '%s...' % next_thread[:31]
- participants = set()
+ participants = {}
cnt = 0
for msg in threads:
msg = Bunch(msg)
msg.email.Email = msg.email.Email.strip()
# Statistics on how many participants and threads this month
- participants.add(msg.email.From)
+ participants[msg.email.From] = Bunch({'Email': msg.email.Email})
cnt = cnt + 1
archives_length = mongo.get_archives_length(list_name)