summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-07-24 00:16:11 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-07-24 00:16:11 +0200
commitd6884d80b88f120cbf81c904034eaddd1b54d3e7 (patch)
treef7e554db5944d724bf2c41316e3bc579cf8e9750
parentc393215bb6dd344045a4ac63b1107864b2fcbffe (diff)
downloadbugzilla-d6884d80b88f120cbf81c904034eaddd1b54d3e7.tar.gz
bugzilla-d6884d80b88f120cbf81c904034eaddd1b54d3e7.tar.xz
Bug 771107 - List of attachments in attachment details screen does not distinguish obsolete attachments
r=glob, a=LpSolit
-rwxr-xr-xattachment.cgi2
-rw-r--r--template/en/default/attachment/edit.html.tmpl13
-rw-r--r--template/en/default/filterexceptions.pl1
3 files changed, 10 insertions, 6 deletions
diff --git a/attachment.cgi b/attachment.cgi
index a028bc8b0..707bf788b 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -625,8 +625,6 @@ sub edit {
my $bugattachments =
Bugzilla::Attachment->get_attachments_by_bug($attachment->bug_id);
- # We only want attachment IDs.
- @$bugattachments = map { $_->id } @$bugattachments;
my $any_flags_requesteeble =
grep { $_->is_requestable && $_->is_requesteeble } @{$attachment->flag_types};
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/filterexceptions.pl b/template/en/default/filterexceptions.pl
index c755fa1ed..ff2620589 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -322,7 +322,6 @@
'attachment/edit.html.tmpl' => [
'attachment.id',
'attachment.bug_id',
- 'a',
'editable_or_hide',
],