From: lpsolit%gmail.com <> Date: Sun, 9 Aug 2009 20:17:44 +0000 (+0000) Subject: Bug 365259: The "Product" select menu in request.cgi doesn't group products by classi... X-Git-Tag: bugzilla-3.5.1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ddb4373679d584ffa5524c854ce5fa3261cee8;p=thirdparty%2Fbugzilla.git Bug 365259: The "Product" select menu in request.cgi doesn't group products by classifications - Patch by Frédéric Buclin r=dkl a=LpSolit --- diff --git a/request.cgi b/request.cgi index 5dfb76ddb9..594ed18336 100755 --- a/request.cgi +++ b/request.cgi @@ -73,12 +73,11 @@ else { my @types = ('all', @$flagtypes); my $vars = {}; - $vars->{'products'} = $user->get_selectable_products; $vars->{'types'} = \@types; $vars->{'requests'} = {}; my %components; - foreach my $prod (@{$vars->{'products'}}) { + foreach my $prod (@{$user->get_selectable_products}) { foreach my $comp (@{$prod->components}) { $components{$comp->name} = 1; } @@ -303,14 +302,13 @@ sub queue { my $flagtypes = get_flag_types(); push(@types, @$flagtypes); - $vars->{'products'} = $user->get_selectable_products; $vars->{'excluded_columns'} = \@excluded_columns; $vars->{'group_field'} = $form_group; $vars->{'requests'} = \@requests; $vars->{'types'} = \@types; my %components; - foreach my $prod (@{$vars->{'products'}}) { + foreach my $prod (@{$user->get_selectable_products}) { foreach my $comp (@{$prod->components}) { $components{$comp->name} = 1; } diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl index aa555417cc..4be33ca88a 100644 --- a/template/en/default/request/queue.html.tmpl +++ b/template/en/default/request/queue.html.tmpl @@ -23,8 +23,6 @@ [% USE Bugzilla %] [% cgi = Bugzilla.cgi %] -[% PROCESS "global/js-products.html.tmpl" %] - [% PROCESS global/header.html.tmpl title="Request Queue" style = " @@ -35,6 +33,31 @@ javascript_urls=["js/productform.js"] %] + + +[% BLOCK js_comp %] + cpts['[% n %]'] = [ + [%- FOREACH comp = prod.components %]'[% comp.name FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%]]; + [% n = n+1 %] +[% END %] +

When you are logged in, only requests made by you or addressed to you are shown by default. You can change the criteria using the form below. @@ -54,10 +77,24 @@ to some group are shown by default.