diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-08-26 23:34:38 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-08-26 23:34:38 +0200 |
commit | 4b3f99ad09407a6c145f39641257060035e71303 (patch) | |
tree | de5a2e632a077988d99c5a9a18a484e00517c643 /template/en/default | |
parent | 246c04a3b156d5c9c2c4fedd9ba55c2037b66586 (diff) | |
download | bugzilla-4b3f99ad09407a6c145f39641257060035e71303.tar.gz bugzilla-4b3f99ad09407a6c145f39641257060035e71303.tar.xz |
Bug 1197822: Do not display the "View" link for deleted attachments
r=gerv a=sgreen
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/attachment/edit.html.tmpl | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 092f3e76a..d3d5dae95 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -46,9 +46,9 @@ <div id="attachment_attributes"> <div id="attachment_information_read_only" class="[% "bz_private" IF attachment.isprivate %]"> <div class="title"> - [% "[patch]" IF attachment.ispatch%] - <span class="[% "bz_obsolete" IF attachment.isobsolete %]" title="[% "obsolete" IF attachment.isobsolete %]"> - [% attachment.description FILTER html %] + [% IF attachment.ispatch %][patch][% END %] + <span [% IF attachment.isobsolete %]class="bz_obsolete" title="obsolete"[% END %]> + [%~ attachment.description FILTER html ~%] </span> [% IF can_edit %] <span class="bz_edit">(<a href="javascript:toggle_attachment_details_visibility()">edit details</a>)</span> @@ -293,25 +293,27 @@ [% END %] <input type="submit" value="Submit" id="update"> </div> - [% END %] - </div> + [% END %] + </div> </div> </div> </form> -<div id="attachment_actions"> - <span class="label">Actions:</span> - <a href="attachment.cgi?id=[% attachment.id %]">View</a> - [% IF use_patchviewer %] - | <a href="attachment.cgi?id=[% attachment.id %]&action=diff">Diff</a> - [% END %] - [% IF Param("allow_attachment_deletion") - && user.in_group('admin') - && attachment.datasize > 0 %] - | <a href="attachment.cgi?id=[% attachment.id %]&action=delete">Delete</a> - [% END %] - [% Hook.process('action') %] -</div> +[% IF attachment.datasize %] + <div id="attachment_actions"> + <span class="label">Actions:</span> + <a href="attachment.cgi?id=[% attachment.id %]"> + [% IF attachment.is_viewable %]View[% ELSE %]Download[% END %] + </a> + [% IF use_patchviewer %] + | <a href="attachment.cgi?id=[% attachment.id %]&action=diff">Diff</a> + [% END %] + [% IF Param("allow_attachment_deletion") && user.in_group('admin') %] + | <a href="attachment.cgi?id=[% attachment.id %]&action=delete">Delete</a> + [% END %] + [% Hook.process('action') %] + </div> +[% END %] <div id="attachment_list"> Attachments on [% "$terms.bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %]: |