Bugzilla::FlagType::match({ 'target_type' => 'attachment',
'group' => scalar $cgi->param('group') }, 1);
+ # Users want to see group names, not IDs
+ # So get the group names
+ my %group_name_cache = ();
+ foreach my $flag_type_set ("bug_types", "attachment_types") {
+ foreach my $flag_type (@{$vars->{$flag_type_set}}) {
+ foreach my $group ("grant", "request") {
+ my $gid = $flag_type->{$group . "_gid"};
+ next if (!$gid);
+ $group_name_cache{$gid} ||= new Bugzilla::Group($gid)->name();
+ $flag_type->{$group . "_group_name"} = $group_name_cache{$gid};
+ }
+ }
+ }
+
# Return the appropriate HTTP response headers.
print $cgi->header();
style = "
table#flag_types tr th { text-align: left; }
.inactive { color: #787878; }
+ .multiplicable { display: block; }
"
%]
<th>Edit name ...</th>
<th>Description</th>
<th>Sortkey</th>
+ <th>Properties</th>
+ <th>Grant group</th>
+ <th>Request group</th>
<th>Actions</th>
</tr>
<td><a href="editflagtypes.cgi?action=edit&id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td>
<td>[% type.description FILTER html %]</td>
<td align="right">[% type.sortkey FILTER html %]</td>
+ <td>
+ [% IF type.is_requestable %]
+ <span class="requestable">requestable</span>
+ [% END %]
+ [% IF type.is_requestable && type.is_requesteeble %]
+ <span class="requesteeble">(specifically)</span>
+ [% END %]
+ [% IF type.is_multiplicable %]
+ <span class="multiplicable">multiplicable</span>
+ [% END %]
+ </td>
+ <td>[% type.grant_group_name FILTER html %]</td>
+ <td>[% type.request_group_name FILTER html %]</td>
<td>
<a href="editflagtypes.cgi?action=copy&id=[% type.id %]">Copy</a>
| <a href="editflagtypes.cgi?action=confirmdelete&id=[% type.id %]"