Commit 8c5d6e25 authored by Dave Lawrence's avatar Dave Lawrence

Bug 771107 - List of attachments in attachment details screen does not…

Bug 771107 - List of attachments in attachment details screen does not distinguish obsolete attachments r=glob, a=LpSolit
parent 9a63ac07
...@@ -606,8 +606,6 @@ sub edit { ...@@ -606,8 +606,6 @@ sub edit {
my $bugattachments = my $bugattachments =
Bugzilla::Attachment->get_attachments_by_bug($attachment->bug); Bugzilla::Attachment->get_attachments_by_bug($attachment->bug);
# We only want attachment IDs.
@$bugattachments = map { $_->id } @$bugattachments;
my $any_flags_requesteeble = my $any_flags_requesteeble =
grep { $_->is_requestable && $_->is_requesteeble } @{$attachment->flag_types}; grep { $_->is_requestable && $_->is_requesteeble } @{$attachment->flag_types};
......
...@@ -303,10 +303,17 @@ ...@@ -303,10 +303,17 @@
<div id="attachment_list"> <div id="attachment_list">
Attachments on [% "$terms.bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %]: Attachments on [% "$terms.bug ${attachment.bug_id}" FILTER bug_link(attachment.bug_id) FILTER none %]:
[% FOREACH a = attachments %] [% FOREACH a = attachments %]
[% IF a == attachment.id %] [% IF a.isobsolete %]
[%+ a %] <span class="bz_obsolete">
[% END %]
[% IF a.id == attachment.id %]
[%+ a.id FILTER html %]
[% ELSE %] [% 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 %] [% END %]
[% " |" UNLESS loop.last() %] [% " |" UNLESS loop.last() %]
[% END %] [% END %]
......
...@@ -304,7 +304,6 @@ ...@@ -304,7 +304,6 @@
'attachment/edit.html.tmpl' => [ 'attachment/edit.html.tmpl' => [
'attachment.id', 'attachment.id',
'attachment.bug_id', 'attachment.bug_id',
'a',
'editable_or_hide', 'editable_or_hide',
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment