From c4ffece940379fa7f8174df8dd6ce9dfc5669928 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Thu, 18 Mar 2010 14:04:07 +0000 Subject: [PATCH] Bug 553267: Allow specifying that you don't want flag data, for config.cgi r=gerv, a=mkanat git-svn-id: svn://10.0.0.236/trunk@260008 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/config.cgi | 9 +++ .../template/en/default/config.rdf.tmpl | 70 ++++++++++--------- 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 80bc331ddc6..75469fa2420 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -7073 \ No newline at end of file +7074 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/config.cgi b/mozilla/webtools/bugzilla/config.cgi index 658f04d390a..2e1746ac229 100755 --- a/mozilla/webtools/bugzilla/config.cgi +++ b/mozilla/webtools/bugzilla/config.cgi @@ -83,6 +83,15 @@ if ($cgi->param('product')) { Bugzilla::Product::preload($vars->{'products'}); +# Allow consumers to specify whether or not they want flag data. +if (defined $cgi->param('flags')) { + $vars->{'show_flags'} = $cgi->param('flags'); +} +else { + # We default to sending flag data. + $vars->{'show_flags'} = 1; +} + # Create separate lists of open versus resolved statuses. This should really # be made part of the configuration. my @open_status; diff --git a/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl b/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl index e8050489a2b..ec80f760106 100644 --- a/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/config.rdf.tmpl @@ -163,17 +163,19 @@ [% component.name FILTER html %] - - - [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %] - [% FOREACH flag_type = flag_types %] - [% NEXT UNLESS flag_type.is_active %] - [% all_visible_flag_types.${flag_type.id} = flag_type %] -
  • - [% END %] - - + [% IF show_flags %] + + + [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %] + [% FOREACH flag_type = flag_types %] + [% NEXT UNLESS flag_type.is_active %] + [% all_visible_flag_types.${flag_type.id} = flag_type %] +
  • + [% END %] + + + [% END %]
  • [% END %] @@ -211,28 +213,30 @@ [% END %] - - - [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] -
  • - - [% flag_type.id FILTER html %] - [% flag_type.name FILTER html %] - [% flag_type.description FILTER html %] - [% flag_type.target_type FILTER html %] - [% flag_type.is_requestable FILTER html %] - [% flag_type.is_requesteeble FILTER html %] - [% flag_type.is_multiplicable FILTER html %] - [% IF user.in_group("editcomponents") %] - [% flag_type.grant_group.name FILTER html %] - [% flag_type.request_group.name FILTER html %] - [% END %] - -
  • - [% END %] -
    -
    + [% IF show_flags %] + + + [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] +
  • + + [% flag_type.id FILTER html %] + [% flag_type.name FILTER html %] + [% flag_type.description FILTER html %] + [% flag_type.target_type FILTER html %] + [% flag_type.is_requestable FILTER html %] + [% flag_type.is_requesteeble FILTER html %] + [% flag_type.is_multiplicable FILTER html %] + [% IF user.in_group("editcomponents") %] + [% flag_type.grant_group.name FILTER html %] + [% flag_type.request_group.name FILTER html %] + [% END %] + +
  • + [% END %] +
    +
    + [% END %]