Commit 90f6e932 authored by jouni%heikniemi.net's avatar jouni%heikniemi.net

Bug 223541: Make flags show up correctly in "View all attachments" mode.

r=joel a=justdave
parent 15ca6f2c
...@@ -768,6 +768,7 @@ sub viewall ...@@ -768,6 +768,7 @@ sub viewall
$a{'description'}, $a{'ispatch'}, $a{'isobsolete'}, $a{'isprivate'}, $a{'description'}, $a{'ispatch'}, $a{'isobsolete'}, $a{'isprivate'},
$a{'datasize'}) = FetchSQLData(); $a{'datasize'}) = FetchSQLData();
$a{'isviewable'} = isViewable($a{'contenttype'}); $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. # Add the hash representing the attachment to the array of attachments.
push @attachments, \%a; push @attachments, \%a;
......
...@@ -61,11 +61,18 @@ ...@@ -61,11 +61,18 @@
<td valign="top">[% a.datasize FILTER unitconvert %]</td> <td valign="top">[% a.datasize FILTER unitconvert %]</td>
<td valign="top"> <td valign="top">
[% IF a.statuses.size == 0 %] [% IF a.flags.size == 0 %]
<i>none</i> <i>no flags</i>
[% ELSE %] [% ELSE %]
[% FOREACH s = a.statuses %] [% FOREACH flag = a.flags %]
[% s FILTER html FILTER replace('\s', '&nbsp;') %]<br> [% 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 %]
[% END %] [% END %]
</td> </td>
......
...@@ -450,6 +450,7 @@ ...@@ -450,6 +450,7 @@
'attachment/show-multiple.html.tmpl' => [ 'attachment/show-multiple.html.tmpl' => [
'a.attachid', 'a.attachid',
'flag.status'
], ],
'attachment/updated.html.tmpl' => [ 'attachment/updated.html.tmpl' => [
......
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