From 6b44875b901ac8d1d7383fed017c973a9f954051 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 3 Sep 2005 04:12:07 +0000 Subject: Bug 286158: Remove GetSelectableProducts() from globals.pl and use Bugzilla::User::get_selectable_products() instead - Patch by Frédéric Buclin r=joel,kiko a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/config.js.tmpl | 8 +-- template/en/default/config.rdf.tmpl | 60 ++++++++++++---------- template/en/default/filterexceptions.pl | 2 +- .../default/global/choose-classification.html.tmpl | 16 +++--- template/en/default/reports/duplicates.html.tmpl | 8 +-- template/en/default/request/queue.html.tmpl | 21 ++++---- 6 files changed, 61 insertions(+), 54 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/config.js.tmpl b/template/en/default/config.js.tmpl index e3ec91435..00ba58983 100644 --- a/template/en/default/config.js.tmpl +++ b/template/en/default/config.js.tmpl @@ -73,10 +73,10 @@ var component = new Object(); var version = new Object(); var target_milestone = new Object(); -[% FOREACH p = legal_products %] - component['[% p FILTER js %]'] = [ [% FOREACH x = components_by_product.$p %]'[% x FILTER js %]', [% END %] ]; - version['[% p FILTER js %]'] = [ [% FOREACH x = versions_by_product.$p %]'[% x FILTER js %]', [% END %] ]; - target_milestone['[% p FILTER js %]'] = [ [% FOREACH x = milestones_by_product.$p %]'[% x FILTER js %]', [% END %] ]; +[% FOREACH p = products %] + component['[% p.name FILTER js %]'] = [ [% FOREACH x = p.components %]'[% x.name FILTER js %]', [% END %] ]; + version['[% p.name FILTER js %]'] = [ [% FOREACH x = p.versions %]'[% x.name FILTER js %]', [% END %] ]; + target_milestone['[% p.name FILTER js %]'] = [ [% FOREACH x = p.milestones %]'[% x.name FILTER js %]', [% END %] ]; [% END %] // Product and Component Exceptions diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl index 27a7ba3a0..4c1047f50 100644 --- a/template/en/default/config.rdf.tmpl +++ b/template/en/default/config.rdf.tmpl @@ -105,23 +105,23 @@ - [% FOREACH product = legal_products %] + [% FOREACH product = products %]
  • - - [% product FILTER html %] + + [% product.name FILTER html %] - [% FOREACH component = components_by_product.$product %] -
  • + [% FOREACH component = product.components %] +
  • [% END %] - [% FOREACH version = versions_by_product.$product %] -
  • + [% FOREACH version = product.versions %] +
  • [% END %] @@ -129,8 +129,8 @@ [% IF Param('usetargetmilestone') %] - [% FOREACH milestone = milestones_by_product.$product %] -
  • + [% FOREACH milestone = product.milestones %] +
  • [% END %] @@ -144,24 +144,28 @@ - [% FOREACH item = legal_components %] -
  • - - [% item FILTER html %] - -
  • + [% FOREACH product = products %] + [% FOREACH component = product.components %] +
  • + + [% component.name FILTER html %] + +
  • + [% END %] [% END %]
    - [% FOREACH item = legal_versions %] -
  • - - [% item FILTER html %] - -
  • + [% FOREACH product = products %] + [% FOREACH version = product.versions %] +
  • + + [% version.name FILTER html %] + +
  • + [% END %] [% END %]
    @@ -169,12 +173,14 @@ [% IF Param('usetargetmilestone') %] - [% FOREACH item = legal_milestones %] -
  • - - [% item FILTER html %] - -
  • + [% FOREACH product = products %] + [% FOREACH milestone = product.milestones %] +
  • + + [% milestone.name FILTER html %] + +
  • + [% END %] [% END %]
    diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 8ed71f008..28ea2c7ba 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -244,7 +244,7 @@ ], 'global/choose-classification.html.tmpl' => [ - 'classdesc.$p', + 'class.description', ], 'global/choose-product.html.tmpl' => [ diff --git a/template/en/default/global/choose-classification.html.tmpl b/template/en/default/global/choose-classification.html.tmpl index b2021f234..627ac860f 100644 --- a/template/en/default/global/choose-classification.html.tmpl +++ b/template/en/default/global/choose-classification.html.tmpl @@ -18,8 +18,8 @@ #%] [%# INTERFACE: - # classdesc: hash. May be empty. The hash keys are the classifications, and the values - # are their descriptions. + # classifications: an array of classification objects containing + # at least one product accessible by the user. #%] [% IF target == "enter_bug.cgi" %] @@ -45,21 +45,19 @@ [% END %] -[% FOREACH p = classdesc.keys.sort %] - [% IF classifications.$p.size > 0 %] +[% FOREACH class = classifications %] - - [% p FILTER html %]: + [% class.name FILTER html %]: - [% IF classdesc.$p %] -  [% classdesc.$p %] + [% IF class.description %] +  [% class.description %] [% END %] - [% END %] [% END %] diff --git a/template/en/default/reports/duplicates.html.tmpl b/template/en/default/reports/duplicates.html.tmpl index 5cbf84fe2..897bbf17f 100644 --- a/template/en/default/reports/duplicates.html.tmpl +++ b/template/en/default/reports/duplicates.html.tmpl @@ -20,7 +20,7 @@ #%] [%# INTERFACE: - # products: list of strings. The products this user can see. + # products: an array of product objects this user can see. # # sortby: string. the column on which we are sorting the buglist. # reverse: boolean. True if we are reversing the current sort. @@ -84,9 +84,9 @@ diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl index a6edcd8a3..73bbd8195 100644 --- a/template/en/default/request/queue.html.tmpl +++ b/template/en/default/request/queue.html.tmpl @@ -30,9 +30,9 @@ var first_load = 1; // is this the first time we load the page? var last_sel = []; // caches last selection var cpts = new Array(); - [% FOREACH p = products %] - cpts['[% p FILTER js %]'] = [ - [%- FOREACH item = components_by_product.$p %]'[% item FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%] ]; + [% FOREACH prod = products %] + cpts['[% prod.name FILTER js %]'] = [ + [%- FOREACH comp = prod.components %]'[% comp.name FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%] ]; [% END %] [% END %] @@ -58,9 +58,10 @@ @@ -92,9 +93,11 @@ -- cgit v1.2.3-24-g4f1b