summaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/attachment')
-rw-r--r--template/en/default/attachment/createformcontents.html.tmpl2
-rw-r--r--template/en/default/attachment/list.html.tmpl10
2 files changed, 11 insertions, 1 deletions
diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl
index 5b04382b6..7f738c07f 100644
--- a/template/en/default/attachment/createformcontents.html.tmpl
+++ b/template/en/default/attachment/createformcontents.html.tmpl
@@ -54,6 +54,7 @@
<th>Content Type:</th>
<td>
<em>If the attachment is a patch, check the box below.</em><br>
+ [% Hook.process("patch_notes") %]
<input type="checkbox" id="ispatch" name="ispatch" value="1"
onchange="setContentTypeDisabledState(this.form);">
<label for="ispatch">patch</label><br><br>
@@ -99,6 +100,7 @@
{type => "image/gif", desc => "GIF image"},
{type => "image/jpeg", desc => "JPEG image"},
{type => "image/png", desc => "PNG image"},
+ {type => "application/pdf", desc => "PDF document"},
{type => "application/octet-stream", desc => "binary file"}]
%]
[% Hook.process("mimetypes", "attachment/createformcontents.html.tmpl") %]
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl
index fa8e4774e..5079a0eec 100644
--- a/template/en/default/attachment/list.html.tmpl
+++ b/template/en/default/attachment/list.html.tmpl
@@ -64,6 +64,7 @@ function toggle_display(link) {
[% count = 0 %]
[% obsolete_attachments = 0 %]
+ [% user_cache = template_cache.users %]
[% FOREACH attachment = attachments %]
[% count = count + 1 %]
@@ -102,7 +103,14 @@ function toggle_display(link) {
title="Go to the comment associated with the attachment">
[%- attachment.attached FILTER time %]</a>,
- [% INCLUDE global/user.html.tmpl who = attachment.attacher %]
+ [%# No need to recreate the exact same template if we already have it. %]
+ [% attacher_id = attachment.attacher.id %]
+ [% UNLESS user_cache.$attacher_id %]
+ [% user_cache.$attacher_id = BLOCK %]
+ [% INCLUDE global/user.html.tmpl who = attachment.attacher %]
+ [% END %]
+ [% END %]
+ [% user_cache.$attacher_id FILTER none %]
</span>
</td>