diff options
author | jocuri%softhome.net <> | 2006-03-02 07:24:13 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2006-03-02 07:24:13 +0100 |
commit | 620bb51b19bf6bf5c3bced099fc8a65aa1438267 (patch) | |
tree | 02d79736f9b95831e468b59df407ecd86f8b1a81 | |
parent | bf646df2bc21afc10dc0b074b13c8742ef43d461 (diff) | |
download | bugzilla-620bb51b19bf6bf5c3bced099fc8a65aa1438267.tar.gz bugzilla-620bb51b19bf6bf5c3bced099fc8a65aa1438267.tar.xz |
Patch for bug 325567: display more information when listing flag types in editflagtypes.cgi (especially the grant and request group); patch by Remi Zara <remi_zara@mac.com>, r=LpSolit, a=justdave.
-rwxr-xr-x | editflagtypes.cgi | 14 | ||||
-rw-r--r-- | template/en/default/admin/flag-type/list.html.tmpl | 17 |
2 files changed, 31 insertions, 0 deletions
diff --git a/editflagtypes.cgi b/editflagtypes.cgi index dfef55647..1851e8b13 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -102,6 +102,20 @@ sub list { 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(); diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl index bd1d7cb72..a9dc40519 100644 --- a/template/en/default/admin/flag-type/list.html.tmpl +++ b/template/en/default/admin/flag-type/list.html.tmpl @@ -26,6 +26,7 @@ style = " table#flag_types tr th { text-align: left; } .inactive { color: #787878; } + .multiplicable { display: block; } " %] @@ -88,6 +89,9 @@ <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> @@ -98,6 +102,19 @@ <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 %]" onclick="return confirmDelete([% type.id %], '[% type.name FILTER js FILTER html %]', |