From 727410cca17ff168ba4337de42782d496b9679fc Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 13 Oct 2005 16:18:13 +0000 Subject: Bug 312195: Add an index to all parameters to editparams - Patch by Frédéric Buclin r=joel a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- editparams.cgi | 2 +- skins/standard/params.css | 5 +++ template/en/default/admin/params/common.html.tmpl | 2 +- .../en/default/admin/params/editparams.html.tmpl | 52 +++++++++++++++------- template/en/default/admin/params/index.html.tmpl | 49 ++++++++++++++++++++ 5 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 template/en/default/admin/params/index.html.tmpl diff --git a/editparams.cgi b/editparams.cgi index 9efd30f2c..54d3a3a0a 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -65,7 +65,7 @@ foreach my $panel (@parampanels) { $vars->{panels} = \@panels; -if ($action eq "save") { +if ($action eq 'save' && $current_module) { my @changes = (); my @module_param_list = "Bugzilla::Config::${current_module}"->get_param_list(); diff --git a/skins/standard/params.css b/skins/standard/params.css index 4f46353bd..0390c50e3 100644 --- a/skins/standard/params.css +++ b/skins/standard/params.css @@ -35,6 +35,11 @@ td.selected_section { background-color: white; } +td.index { + color: black; + background-color: #edf; +} + dt { font-weight: bold; } diff --git a/template/en/default/admin/params/common.html.tmpl b/template/en/default/admin/params/common.html.tmpl index d04e83d3f..a13babccb 100644 --- a/template/en/default/admin/params/common.html.tmpl +++ b/template/en/default/admin/params/common.html.tmpl @@ -24,7 +24,7 @@
[% FOREACH param = panel.param_list %] -
[% param.name FILTER html %]
+
[% param.name FILTER html %]
[% panel.param_descs.${param.name} FILTER none %]

[% IF param.type == "t" %] diff --git a/template/en/default/admin/params/editparams.html.tmpl b/template/en/default/admin/params/editparams.html.tmpl index bd94cc513..0560cac6c 100644 --- a/template/en/default/admin/params/editparams.html.tmpl +++ b/template/en/default/admin/params/editparams.html.tmpl @@ -27,7 +27,7 @@ [% PROCESS global/variables.none.tmpl %] -[% curpanel = 0 %] +[% curpanel = -1 %] [% panels = panels.sort('sortkey') %] [% FOREACH panel = panels %] @@ -41,9 +41,20 @@ [% current_panel = panels.$curpanel %] -[%# We cannot call header.html.tmpl earlier as we have to know which panel is active first %] +[%# We cannot call header.html.tmpl earlier as we have to know + which panel is active first, in order to get its title %] + +[% title = BLOCK %] + [% IF curpanel == -1 %] + [% terms.Bugzilla FILTER html %] Parameters: Index + [% ELSE %] + [% terms.Bugzilla FILTER html %] Configuration: + [%+ current_panel.title FILTER html %] + [% END %] +[% END %] + [% PROCESS global/header.html.tmpl - title = "$terms.Bugzilla Configuration: $current_panel.title" + title = title message = message style_urls = ['skins/standard/params.css'] %] @@ -53,6 +64,11 @@ [%# NAVIGATION BAR %] + + + [% FOREACH panel = panels %] [% IF panel.current %] @@ -70,19 +86,23 @@ -

- This lets you edit the basic operating parameters of [% terms.Bugzilla %]. - Be careful!
- Any item you check "Reset" on will get reset to its default value. -

- [%# CONTENT PANEL %] -
- [% PROCESS admin/params/common.html.tmpl panel = current_panel %] - - - - -
+ [% IF curpanel == -1 %] + [% PROCESS admin/params/index.html.tmpl panels = panels %] + [% ELSE %] +

+ This lets you edit the basic operating parameters of [% terms.Bugzilla %]. + Be careful!
+ Any item you check "Reset" on will get reset to its default value. +

+ [%# CONTENT PANEL %] +
+ [% PROCESS admin/params/common.html.tmpl panel = current_panel %] + + + + +
+ [% END %] diff --git a/template/en/default/admin/params/index.html.tmpl b/template/en/default/admin/params/index.html.tmpl new file mode 100644 index 000000000..317ac6cf3 --- /dev/null +++ b/template/en/default/admin/params/index.html.tmpl @@ -0,0 +1,49 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Frédéric Buclin + #%] + +

+ All parameters are displayed below, per section. + If you cannot find one from here, then the parameter does not exist. +

+ +
+ + + + + + [% FOREACH panel = panels %] + [% FOREACH param = panel.param_list.sort('name') %] + + + + + [% END %] + + + + [% END %] +
ParameterSection
[% param.name FILTER html %] + + [% panel.title FILTER html %] +
  
+
-- cgit v1.2.3-24-g4f1b