From a2dd3b00284fd4724d3408274cb1156c7a77d187 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 24 Oct 2009 05:21:06 +0000 Subject: Bug 520948: Use Bugzilla->feature and feature_enabled everywhere instead of checking if modules are installed Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- template/en/default/global/code-error.html.tmpl | 37 +++++---------------- template/en/default/index.html.tmpl | 3 -- template/en/default/reports/menu.html.tmpl | 44 ++++++++++++++----------- 3 files changed, 34 insertions(+), 50 deletions(-) (limited to 'template/en') diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 8ad0c4ae9..3c9f73f4c 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -110,11 +110,6 @@ [% ELSIF error == "chart_file_open_fail" %] Unable to open the chart datafile [% filename FILTER html %]. - [% ELSIF error == "chart_lines_not_installed" %] - [% admindocslinks = {'installation.html#install-perlmodules' => 'Installing Perl modules necessary for Charting'} %] - Charts will not work without the Chart::Lines Perl module being installed. - Run checksetup.pl for installation instructions. - [% ELSIF error == "column_not_null_without_default" %] Failed adding the column [% name FILTER html %]: You cannot add a NOT NULL column with no default to an existing table @@ -167,11 +162,6 @@ '[% field.description FILTER html %]' ([% field.name FILTER html %]) is not a custom field. - [% ELSIF error == "gd_not_installed" %] - [% admindocslinks = {'installation.html#install-perlmodules' => 'Installing Perl modules necessary for Charting'} %] - Charts will not work without the GD Perl module being installed. - Run checksetup.pl for installation instructions. - [% ELSIF error == "illegal_content_type_method" %] Your form submission got corrupted somehow. The content method field, which specifies how the content type gets determined, @@ -228,6 +218,15 @@ but you tried to flag it as obsolete while creating a new attachment to [% terms.bug %] [%+ my_bug_id FILTER html %]. + [% ELSIF error == "feature_disabled" %] + The [% install_string("feature_$feature") FILTER html %] feature is not + available in this [% terms.Bugzilla %]. + [% IF user.in_group('admin') %] + If you would like to enable this feature, please run + checksetup.pl to see how to install the necessary + requirements for this feature. + [% END %] + [% ELSIF error == "flag_unexpected_object" %] [% title = "Object Not Recognized" %] Flags cannot be set for objects of type [% caller FILTER html %]. @@ -280,23 +279,11 @@ Inserting a [% job FILTER html %] job into the Job Queue failed with the following error: [% errmsg FILTER html %] - [% ELSIF error == "jobqueue_not_configured" %] - Using the job queue system requires that certain Perl modules - be installed. Run checksetup.pl to see what modules - you are missing. - [% ELSIF error == "jobqueue_no_job_mapping" %] Bugzilla::JobQueue has not been configured to handle the job "[% job FILTER html %]". You need to add this job type to the JOB_MAP constant in Bugzilla::JobQueue. - [% ELSIF error == "json_rpc_not_installed" %] - [% admindocslinks = { 'installation.html#install-perlmodules' - => 'Installing Perl modules' } %] - The JSON-RPC interface will not work without the JSON::RPC - Perl module being installed. Run checksetup.pl for - installation instructions. - [% ELSIF error == "ldap_bind_failed" %] Failed to bind to the LDAP server. The error message was: [% errstr FILTER html %] @@ -426,12 +413,6 @@ The value "[% value FILTER html %]" is not in the list of legal values for the [% name FILTER html %] setting. - [% ELSIF error == "soap_not_installed" %] - [% admindocslinks = {'installation.html#install-perlmodules' => 'Installing Perl modules'} %] - The XMLRPC interface will not work without the SOAP::Lite Perl module being - installed. - Run checksetup.pl for installation instructions. - [% ELSIF error == "token_generation_error" %] Something is seriously wrong with the token generation system. diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl index 6231baa43..dd00d3550 100644 --- a/template/en/default/index.html.tmpl +++ b/template/en/default/index.html.tmpl @@ -97,9 +97,6 @@ YAHOO.util.Event.onDOMReady(onLoadActions);

This message is only shown to logged in users with admin privs. You can configure this notification from the Parameters page.

- [% ELSIF release.error == "missing_package" %] -

Missing package '[% release.package FILTER html %]'. This package is required to - notify you about new releases.

[% ELSIF release.error == "cannot_download" %]

The local XML file '[% release.xml_file FILTER html %]' cannot be created. Please make sure the web server can write in this directory and that you can access diff --git a/template/en/default/reports/menu.html.tmpl b/template/en/default/reports/menu.html.tmpl index db5b19293..f7613ec01 100644 --- a/template/en/default/reports/menu.html.tmpl +++ b/template/en/default/reports/menu.html.tmpl @@ -48,28 +48,34 @@ - tables of [% terms.bug %] counts in 1, 2 or 3 dimensions, as HTML or CSV. -

  • - - Graphical reports - - - line graphs, bar and pie charts. -
  • - - -

    Change Over Time

    - - +[% IF feature_enabled('new_charts') OR feature_enabled('old_charts') %] +

    Change Over Time

    + + +[% END %] + [% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b