]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 771107 - List of attachments in attachment details screen does not distinguish...
authorDave Lawrence <dlawrence@mozilla.com>
Mon, 23 Jul 2012 22:14:02 +0000 (18:14 -0400)
committerDave Lawrence <dlawrence@mozilla.com>
Mon, 23 Jul 2012 22:14:02 +0000 (18:14 -0400)
r=glob, a=LpSolit

attachment.cgi
template/en/default/attachment/edit.html.tmpl
template/en/default/filterexceptions.pl

index 16c964e477d4942f09a47758557db5c4c89bf6fb..e696c95a765a9fa28dab8692589fbf24fd0ea9c1 100755 (executable)
@@ -606,8 +606,6 @@ sub edit {
 
   my $bugattachments =
       Bugzilla::Attachment->get_attachments_by_bug($attachment->bug);
-  # We only want attachment IDs.
-  @$bugattachments = map { $_->id } @$bugattachments;
 
   my $any_flags_requesteeble =
     grep { $_->is_requestable && $_->is_requesteeble } @{$attachment->flag_types};
index 2062e6d6cc458a9253845bee269468bc7957352f..67dcabd7563f45727ad479e27633bf210aeec754 100644 (file)
 <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 %]
index e3cfec8a2ebb0eed322cc7432f2f4b4086b5d57d..5401772ea285ad3a5802a4beb3d86713c3904ea8 100644 (file)
 'attachment/edit.html.tmpl' => [
   'attachment.id', 
   'attachment.bug_id', 
-  'a',
   'editable_or_hide',
 ],