]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 223541: Make flags show up correctly in "View all attachments" mode.
authorjouni%heikniemi.net <>
Sun, 30 May 2004 22:52:12 +0000 (22:52 +0000)
committerjouni%heikniemi.net <>
Sun, 30 May 2004 22:52:12 +0000 (22:52 +0000)
r=joel
a=justdave

attachment.cgi
template/en/default/attachment/show-multiple.html.tmpl
template/en/default/filterexceptions.pl

index 83a910ee01378caa69a3f62d5c00d0d023aeba81..c1e8f9dd0fc83bf8966192e8bf3504348b102f92 100755 (executable)
@@ -768,6 +768,7 @@ sub viewall
      $a{'description'}, $a{'ispatch'}, $a{'isobsolete'}, $a{'isprivate'},
      $a{'datasize'}) = FetchSQLData();
     $a{'isviewable'} = isViewable($a{'contenttype'});
+    $a{'flags'} = Bugzilla::Flag::match({ 'attach_id' => $a{'attachid'} });
 
     # Add the hash representing the attachment to the array of attachments.
     push @attachments, \%a;
index bcfae488dddeebc4cf674d07fe6a12b8151fb731..e7043a1420d3a8092f5d65470b0a9b68107eafb9 100644 (file)
       <td valign="top">[% a.datasize FILTER unitconvert %]</td>
 
       <td valign="top">
-        [% IF a.statuses.size == 0 %]
-          <i>none</i>
+        [% IF a.flags.size == 0 %]
+          <i>no flags</i>
         [% ELSE %]
-          [% FOREACH s = a.statuses %]
-            [% s FILTER html FILTER replace('\s', '&nbsp;') %]<br>
+          [% FOREACH flag = a.flags %]
+            [% IF flag.setter %]
+              [% flag.setter.nick FILTER html %]:
+            [% END %]
+            [%+ flag.type.name FILTER html %][% flag.status %]
+            [% IF flag.status == "?" && flag.requestee %]
+              ([% flag.requestee.nick FILTER html %])
+            [% END %]
+            [% ", " IF !loop.last %]
           [% END %]
         [% END %]
       </td>
index 1c74c3b899ae73b44efb76ae32d4de9e773e6cb8..c030fa04fabd5eaa2377ef7d9f01a2f3c903b2fb 100644 (file)
 
 'attachment/show-multiple.html.tmpl' => [
   'a.attachid', 
+  'flag.status'
 ],
 
 'attachment/updated.html.tmpl' => [