From: Magnus Hagander Date: Sun, 10 Mar 2013 15:34:42 +0000 (+0100) Subject: Show the size of an attachment next to the description X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=b8f8d80bda720d0fa979e430f11e14692b260e8f;p=pgarchives.git Show the size of an attachment next to the description --- diff --git a/django/archives/mailarchives/templates/message.html b/django/archives/mailarchives/templates/message.html index 7f74c11..6fda4b1 100644 --- a/django/archives/mailarchives/templates/message.html +++ b/django/archives/mailarchives/templates/message.html @@ -73,7 +73,7 @@ $(function(){ {%for a in msg.attachments%}
Attachment: {{a.filename}}
-Description: {{a.contenttype}} {%if a.inlineable%}(inlined above){%endif%} +Description: {{a.contenttype}} ({{a.len|filesizeformat}}) {%if a.inlineable%}(inlined above){%endif%}
{%endfor%} {%endif%} diff --git a/django/archives/mailarchives/templates/message_flat.html b/django/archives/mailarchives/templates/message_flat.html index 2c49469..7dff03c 100644 --- a/django/archives/mailarchives/templates/message_flat.html +++ b/django/archives/mailarchives/templates/message_flat.html @@ -49,10 +49,10 @@ window.onload = load;
{{m.bodytxt|hideallemail|urlize}}
{%if m.has_attachment%} -{%for a in m.attachment_set.all%} +{%for a in m.attachments.all%}
Attachment: {{a.filename}}
-Description: {{a.contenttype}} +Description: {{a.contenttype}} ({{a.len|filesizeformat}})
{%endfor%} {%endif%}