diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-10-04 12:02:52 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-10-04 12:02:52 +0200 |
commit | cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f (patch) | |
tree | a00aafaafbe919364ff8c9882bc5cf26935fb29a /hyperkitty/templates | |
parent | 5f9c7c8bba6db94f45cf0d0f2ca679ee8a0a3a92 (diff) | |
download | hyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.tar.gz hyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.tar.xz hyperkitty-cd1a2d5f2ec738ab2f17c86dcabe8733a682aa4f.zip |
Improve attachments display
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/message.html | 11 | ||||
-rw-r--r-- | hyperkitty/templates/messages/message.html | 32 | ||||
-rw-r--r-- | hyperkitty/templates/thread.html | 6 |
3 files changed, 30 insertions, 19 deletions
diff --git a/hyperkitty/templates/message.html b/hyperkitty/templates/message.html index e9f2806..5d061e5 100644 --- a/hyperkitty/templates/message.html +++ b/hyperkitty/templates/message.html @@ -9,17 +9,6 @@ <section id="thread_content"> {% include 'messages/first_email.html' with first_mail=message %} - - {% if attachments|length %} - <h2>Attachments</h2> - <ul> - {% for attachment in attachments %} - <li><a href="{% url message_attachment mlist_fqdn=list_address, hashid=hashid, counter=attachment.counter, filename=attachment.name %}">{{attachment.name}}</a> - ({{attachment.content_type}}, {{attachment.size}} octets) - </li> - {% endfor %} - </ul> - {% endif %} </section> {% endblock %} diff --git a/hyperkitty/templates/messages/message.html b/hyperkitty/templates/messages/message.html index 54613e0..08d5cca 100644 --- a/hyperkitty/templates/messages/message.html +++ b/hyperkitty/templates/messages/message.html @@ -1,3 +1,4 @@ +{% load storm %} {% load gravatar %} <div class="email_header"> @@ -14,18 +15,17 @@ <br /> </div> </div> + {% if unfolded %} - <div class="first_email_body"> +<div class="first_email_body"> {% else %} - <div class="email_body"> +<div class="email_body"> {% endif %} - - {{email.content}} - +{{email.content}} </div> -{% if settings.USE_MOCKUPS %} <ul class="email_info inline" messageid="{{email.message_id_hash}}"> +{% if settings.USE_MOCKUPS %} <li class="neutral"> +{{email.likes}}/-{{email.dislikes}} </li> @@ -35,5 +35,23 @@ <li class="votedown"> <a href="#dislike"> Dislike</a> </li> -</ul> {% endif %} +{% if email.attachments|count %} + {% if not unfolded %} + <li class="attachments"> + <a href="#attachments">{{ email.attachments|count }} attachments</a> + {% endif %} + <ul class="attachments-list"> + {% for attachment in email.attachments %} + <li><a href="{% url message_attachment mlist_fqdn=list_address, hashid=email.message_id_hash, counter=attachment.counter, filename=attachment.name %}">{{attachment.name}}</a> + ({{attachment.content_type}} — {{attachment.size|filesizeformat}}) + </li> + {% endfor %} + </ul> + {% if not unfolded %} + </li> + {% endif %} +{% endif %} +</ul> + + diff --git a/hyperkitty/templates/thread.html b/hyperkitty/templates/thread.html index 2730db9..a3d8c8b 100644 --- a/hyperkitty/templates/thread.html +++ b/hyperkitty/templates/thread.html @@ -110,7 +110,11 @@ alert('You need to login in order to add tag'); {% endif %} }); - + + $("ul.email_info li.attachments ul.attachments-list").hide(); + $("ul.email_info li.attachments > a").click(function() { + $(this).next("ul").fadeToggle('fast'); + }); }); </script> |