diff options
Diffstat (limited to 'template/en/default/attachment')
6 files changed, 43 insertions, 23 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/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl index c13b2e7ba..8cb5525f7 100644 --- a/template/en/default/attachment/diff-header.html.tmpl +++ b/template/en/default/attachment/diff-header.html.tmpl @@ -133,15 +133,18 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %] [% END %] [% IF warning %] -<h2 class="warning">Warning: +<h2 class="warning"> + Warning: [% IF warning == "interdiff1" %] - this difference between two patches may show things in the wrong places due - to a limitation in [% terms.Bugzilla %] when comparing patches with different - sets of files. - [% END %] - [% IF warning == "interdiff2" %] - this difference between two patches may be inaccurate due to a limitation in - [%+ terms.Bugzilla %] when comparing patches made against different revisions. + this difference between two patches may show things in the wrong places due + to a limitation in [% terms.Bugzilla %] when comparing patches with + different sets of files. + [% ELSIF warning == "interdiff2" %] + this difference between two patches may be inaccurate due to a limitation + in [%+ terms.Bugzilla %] when comparing patches made against different + revisions. + [% ELSIF warning == "interdiff3" %] + interdiff encountered errors while comparing these patches. [% END %] </h2> [% ELSE %] diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 95ad4d335..cbc66e95a 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -208,7 +208,8 @@ readonly = 'readonly' %] [% ELSE %] - <iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]"> + <iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %] + [%- "&content_type=text/plain" IF attachment.contenttype == 'text/x-github-pull-request' %]"> <b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs. <a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b> </iframe> @@ -306,10 +307,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 %]&action=edit">[% a %]</a> + <a href="attachment.cgi?id=[% a.id FILTER uri %]&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..05ad0bb26 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> @@ -134,7 +142,7 @@ function toggle_display(link) { </td> [% END %] - <td valign="top"> + <td class="bz_attach_actions" valign="top"> <a href="attachment.cgi?id=[% attachment.id %]&action=edit">Details</a> [% IF attachment.ispatch && feature_enabled('patch_viewer') %] | <a href="attachment.cgi?id=[% attachment.id %]&action=diff">Diff</a> |