From 620bb51b19bf6bf5c3bced099fc8a65aa1438267 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Thu, 2 Mar 2006 06:24:13 +0000 Subject: Patch for bug 325567: display more information when listing flag types in editflagtypes.cgi (especially the grant and request group); patch by Remi Zara , r=LpSolit, a=justdave. --- editflagtypes.cgi | 14 ++++++++++++++ template/en/default/admin/flag-type/list.html.tmpl | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) 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 @@ Edit name ... Description Sortkey + Properties + Grant group + Request group Actions @@ -97,6 +101,19 @@ [% type.name FILTER html FILTER no_break %] [% type.description FILTER html %] [% type.sortkey FILTER html %] + + [% IF type.is_requestable %] + requestable + [% END %] + [% IF type.is_requestable && type.is_requesteeble %] + (specifically) + [% END %] + [% IF type.is_multiplicable %] + multiplicable + [% END %] + + [% type.grant_group_name FILTER html %] + [% type.request_group_name FILTER html %] Copy |