]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 312195: Add an index to all parameters to editparams - Patch by Frédéric Buclin...
authorlpsolit%gmail.com <>
Thu, 13 Oct 2005 16:18:13 +0000 (16:18 +0000)
committerlpsolit%gmail.com <>
Thu, 13 Oct 2005 16:18:13 +0000 (16:18 +0000)
editparams.cgi
skins/standard/params.css
template/en/default/admin/params/common.html.tmpl
template/en/default/admin/params/editparams.html.tmpl
template/en/default/admin/params/index.html.tmpl [new file with mode: 0644]

index 9efd30f2ce11ce4ef2663cf57dce07eadf099129..54d3a3a0a38d6cd64c0d3ac6c8237ebd68a4fac1 100755 (executable)
@@ -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();
 
index 4f46353bd9489c98e9c402b181199f3f6aaf6632..0390c50e37983b949d64d47476975e9c3fcdd311 100644 (file)
@@ -35,6 +35,11 @@ td.selected_section {
   background-color: white;
 }
 
+td.index {
+  color: black;
+  background-color: #edf;
+}
+
 dt {
   font-weight: bold;
 }
index d04e83d3f089b19084722158237689323f26655c..a13babccb72b0e8f8796852a72b124715cb9c33f 100644 (file)
@@ -24,7 +24,7 @@
 
 <dl>
   [% FOREACH param = panel.param_list %]
-    <dt>[% param.name FILTER html %]</dt>
+    <dt><a name="[% param.name FILTER html %]">[% param.name FILTER html %]</a></dt>
     <dd>[% panel.param_descs.${param.name} FILTER none %]
       <p>
       [% IF param.type == "t" %]
index bd94cc5132533ef8b329614f22e3de5b6f442ff5..0560cac6cbd9ca1a63d61bc2508d0e1a9979bac0 100644 (file)
@@ -27,7 +27,7 @@
 
 [% PROCESS global/variables.none.tmpl %]
 
-[% curpanel = 0 %]
+[% curpanel = -1 %]
 [% panels = panels.sort('sortkey') %]
 
 [% FOREACH panel = panels %]
 
 [% 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']
 %]
     <td>
       [%# NAVIGATION BAR %]
       <table id="menu">
+        <tr>
+          <td class="index">
+            <a href="editparams.cgi?section=index" title="Show all parameters">Index</a>
+          </td>
+        </tr>
         [% FOREACH panel = panels %]
           <tr>
             [% IF panel.current %]
       </table>
     </td>
     <td>
-      <p>
-        This lets you edit the basic operating parameters of [% terms.Bugzilla %].
-        Be careful!<br>
-        Any item you check "Reset" on will get reset to its default value.
-      </p>
-      [%# CONTENT PANEL %]
-      <form method="post" action="editparams.cgi">
-        [% PROCESS admin/params/common.html.tmpl panel = current_panel %]
-        <input type="hidden" name="section" value="[% current_panel.name FILTER html %]">
-        <input type="hidden" name="action" value="save">
-        <input type="reset" value="Reset form">
-        <input type="submit" name="action" value="Save Changes">
-      </form>
+      [% IF curpanel == -1 %]
+        [% PROCESS admin/params/index.html.tmpl panels = panels %]
+      [% ELSE %]
+        <p>
+          This lets you edit the basic operating parameters of [% terms.Bugzilla %].
+          Be careful!<br>
+          Any item you check "Reset" on will get reset to its default value.
+        </p>
+        [%# CONTENT PANEL %]
+        <form method="post" action="editparams.cgi">
+          [% PROCESS admin/params/common.html.tmpl panel = current_panel %]
+          <input type="hidden" name="section" value="[% current_panel.name FILTER html %]">
+          <input type="hidden" name="action" value="save">
+          <input type="reset" value="Reset form">
+          <input type="submit" name="action" value="Save Changes">
+        </form>
+      [% END %]
     </td>
   </tr>
 </table>
diff --git a/template/en/default/admin/params/index.html.tmpl b/template/en/default/admin/params/index.html.tmpl
new file mode 100644 (file)
index 0000000..317ac6c
--- /dev/null
@@ -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 <LpSolit@gmail.com>
+  #%]
+
+<p>
+  All parameters are displayed below, per section.
+  If you cannot find one from here, then the parameter does not exist.
+</p>
+
+<div align="center">
+  <table>
+    <tr>
+      <th>Parameter</th>
+      <th>Section</th>
+    </tr>
+    [% FOREACH panel = panels %]
+      [% FOREACH param = panel.param_list.sort('name') %]
+        <tr>
+          <td>[% param.name FILTER html %]</td>
+          <td>
+            <a href="editparams.cgi?section=
+               [%- panel.name FILTER url_quote %]#[% param.name FILTER url_quote %]">
+               [% panel.title FILTER html %]</a>
+          </td>
+        </tr>
+      [% END %]
+      <tr>
+        <td>&nbsp;</td><td>&nbsp;</td>
+      </tr>
+    [% END %]
+  </table>
+</div>