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
$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;
......
......@@ -61,11 +61,18 @@
<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>
......
......@@ -450,6 +450,7 @@
'attachment/show-multiple.html.tmpl' => [
'a.attachid',
'flag.status'
],
'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