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/delete_reason.txt.tmpl11
-rw-r--r--template/en/default/attachment/diff-footer.html.tmpl6
-rw-r--r--template/en/default/attachment/edit.html.tmpl13
-rw-r--r--template/en/default/attachment/list.html.tmpl10
5 files changed, 29 insertions, 13 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/delete_reason.txt.tmpl b/template/en/default/attachment/delete_reason.txt.tmpl
index e4a1fc41f..87175c1a3 100644
--- a/template/en/default/attachment/delete_reason.txt.tmpl
+++ b/template/en/default/attachment/delete_reason.txt.tmpl
@@ -16,17 +16,10 @@
[%# INTERFACE:
# attachment: object of the attachment the user wants to delete.
# reason: string; The reason provided by the user.
- # date: the date when the request to delete the attachment was made.
#%]
-The content of attachment [% attachment.id %] has been deleted by
- [%+ user.identity %]
-[% IF reason %]
-who provided the following reason:
+The content of attachment [% attachment.id %] has been deleted
+[%~ IF reason %] for the following reason:
[%+ reason %]
-[% ELSE %]
-without providing any reason.
[% END %]
-
-The token used to delete this attachment was generated at [% date FILTER time %].
diff --git a/template/en/default/attachment/diff-footer.html.tmpl b/template/en/default/attachment/diff-footer.html.tmpl
index 49c662a98..e9965a9a8 100644
--- a/template/en/default/attachment/diff-footer.html.tmpl
+++ b/template/en/default/attachment/diff-footer.html.tmpl
@@ -20,6 +20,12 @@
</form>
+[% IF !file_count %]
+<div id="error_msg" class="throw_error">
+ No valid patch files were found in the attachment.
+</div>
+[% END %]
+
[% IF headers %]
<br>
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 95ad4d335..530b2d04c 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -306,10 +306,17 @@
<div id="attachment_list">
Attachments on [% "$terms.bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %]:
[% FOREACH a = attachments %]
- [% IF a == attachment.id %]
- [%+ a %]
+ [% IF a.isobsolete %]
+ <span class="bz_obsolete">
+ [% END %]
+ [% IF a.id == attachment.id %]
+ [%+ a.id FILTER html %]
[% ELSE %]
- <a href="attachment.cgi?id=[% a %]&amp;action=edit">[% a %]</a>
+ <a href="attachment.cgi?id=[% a.id FILTER uri %]&amp;action=edit"
+ title="[% a.description FILTER html %]">[% a.id FILTER html %]</a>
+ [% END %]
+ [% IF a.isobsolete %]
+ </span>
[% END %]
[% " |" UNLESS loop.last() %]
[% END %]
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>