handling multiple languages gracefully in sysprefs, allow the user to enable specific...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / systempreferences.tmpl
index e2b684c..df3d72e 100644 (file)
@@ -1,10 +1,17 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; Administration &rsaquo;
-<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF --></title>
+<title>Koha &rsaquo; Administration &rsaquo; <!-- TMPL_IF name="add_form" --> System Preferences &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> System Preferences &rsaquo; Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" --> <a href="">System Preferences &rsaquo; <!-- TMPL_VAR NAME="searchfield" --> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> System Preferences &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript">
 //<![CDATA[
+<!-- TMPL_IF NAME="add_form" -->
+    $(document).ready(function() {
+        $('.variabletype').css({ color: "#0000CC", cursor: "pointer" });
+        $('.variabletype').click(function() {
+            $('#preftype').attr("value",$(this).attr("id"));
+        });
+    });
+<!-- /TMPL_IF -->
         //
         function isNotNull(f,noalert) {
             if (f.value.length ==0) {
 </head>
 <body>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
-<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
+<!-- TMPL_INCLUDE NAME="sysprefs-admin-search.inc" -->
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF --></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <!-- TMPL_IF name="add_form" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&searchfield=<!-- TMPL_VAR NAME="searchfield" -->"><!-- TMPL_VAR NAME="searchfield" --></a> &rsaquo; Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" --> <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->System Preferences<!-- /TMPL_IF --></div>
 
 <div id="doc3" class="yui-t2">
    
    <div id="bd">
-       <div id="yui-main">
-       <div class="yui-b">
-
-
+    <div id="yui-main">
+    <div class="yui-b">
 
 <!-- TMPL_IF NAME="add_form" -->
     
@@ -85,9 +90,9 @@
             Add a system preference
         <!-- /TMPL_IF --></legend><ol>
             <li><label for="explanation">Explanation: </label><input type="text" name="explanation" id="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" /><input type="hidden" name="op" value="add_validate" /></li>
-            <li><!-- TMPL_IF NAME="searchfield" --><td><label>Variable</label><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->">
-            <!-- TMPL_ELSE --><td><label for="variable">Variable</label><input type="text" name="variable" id="variable" size="60" /><!-- /TMPL_IF --></li>
-            <li><label for="value">Value</label><!-- TMPL_IF NAME="type-free" -->
+            <li><!-- TMPL_IF NAME="searchfield" --><span class="label">Variable: </span><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+            <!-- TMPL_ELSE --><label for="variable">Variable: </label><input type="text" name="variable" id="variable" size="60" /><!-- /TMPL_IF --></li>
+            <li><label for="value">Value</label><!-- TMPL_IF NAME="type-free" -->
                     <textarea id="value" name="value" cols="<!-- TMPL_VAR NAME="fieldlength" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
                 <!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="type-textarea" -->
                         <!-- /TMPL_LOOP -->
                     </select>
                 <!-- /TMPL_IF -->
+        <!-- TMPL_IF NAME="type-langselector" -->
+        <!-- TMPL_IF NAME="languages_loop" -->
+       <table>
+        <!-- TMPL_LOOP NAME="languages_loop" -->
+           <tr><td>
+            <!-- TMPL_IF NAME="plural" -->
+            <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
+            <!-- TMPL_LOOP NAME="sublanguages_loop" --><table><tr><td>
+                <!-- TMPL_IF NAME="sublanguage_current" -->
+                    <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
+                    <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
+
+                <!-- TMPL_ELSE -->
+                    <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" --> <!-- TMPL_VAR NAME="script_description" --> <!-- TMPL_VAR NAME="region_description" --> <!-- TMPL_VAR NAME="variant_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
+                    <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
+                <!-- /TMPL_IF --></td></tr></table>
+            <!-- /TMPL_LOOP -->
+
+            <!-- TMPL_ELSE -->
+                <!-- TMPL_IF NAME="current" -->
+            <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
+                    <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
+                <!-- TMPL_ELSE -->
+            <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)
+                    <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="value" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" <!-- TMPL_IF NAME="group_enabled" -->checked="checked"<!-- /TMPL_IF --> /> </label>
+                <!-- /TMPL_IF -->
+            <!-- /TMPL_IF -->
+           </td></tr>
+        <!-- /TMPL_LOOP -->
+       </table>
+        <!-- /TMPL_IF -->
+
+        <!-- /TMPL_IF -->
+
                 <!-- TMPL_IF NAME="type-yesno" -->
                     <!-- TMPL_IF NAME="value-yes" -->
-                    <input type="radio" name="value" id="value" value="1" checked="checked"><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF -->ON
-                <!-- TMPL_IF NAME="value-no" -->       
-                    <input type="radio" name="value" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" value="0" /><!-- /TMPL_IF -->OFF<!-- /TMPL_IF -->
+                    <input type="radio" name="value" id="value" value="1" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF --> <label for="value" class="yesno">ON</label>
+                <!-- TMPL_IF NAME="value-no" -->    
+                    <input type="radio" name="value" id="value-no" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" id="value-no" value="0" /><!-- /TMPL_IF --> <label for="value-no" class="yesno">OFF</label><!-- /TMPL_IF -->
                 </li>
         </ol></fieldset>
-        <fieldset class="action"><input type="submit" value="<!-- TMPL_IF NAME="modify" -->Save Changes<!-- TMPL_ELSE -->Add this Preference<!-- /TMPL_IF -->"> <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a></fieldset>
+        <fieldset class="action"><input type="submit" value="Save" /> 
+          <!-- TMPL_IF name="return_tab" -->
+            <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl?tab=<!-- TMPL_VAR name="return_tab" -->">Cancel</a>
+          <!-- TMPL_ELSE -->
+            <a class="cancel" href="/cgi-bin/koha/admin/systempreferences.pl">Cancel</a>
+          <!-- /TMPL_IF -->
+        </fieldset>
         
         <fieldset class="brief">
-               <legend>Koha internal</legend>
-               <div class="hint">Note: you should have no reasons to modify the following default values</div>
-               <ol>
-        <label for="preftype">Variable type:</label>
-               <div class="hint"> (Choice, YesNo, Integer, Textarea, Float, Themes, Languages, or ClassSources)</div>
-               <input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40">
-        <label for="prefoptions">Variable options:</label>
-               <div class="hint">(a choice list for Choice (separated by |) or cols|rows for Texarea)</div>
-               <input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" />
-               </fieldset>
+        <legend>Koha internal</legend>
+        <div class="hint">Note: you should have no reasons to modify the following default values</div>
+        <ol>
+        <li><label for="preftype">Variable type:</label>
+        <div class="hint"> (<span class="variabletype" id="Choice">Choice</span>, <span class="variabletype" id="YesNo">YesNo</span>, <span class="variabletype" id="Integer">Integer</span>, <span class="variabletype" id="Textarea">Textarea</span>, <span class="variabletype" id="Float">Float</span>, <span class="variabletype" id="Themes">Themes</span>, <span class="variabletype" id="Languages">Languages</span>, or <span class="variabletype" id="ClassSources">ClassSources</span>)</div>
+        <input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40" /></li>
+        <li><label for="prefoptions">Variable options:</label>
+        <div class="hint">(a choice list for Choice (separated by |) or cols|rows for Texarea)</div>
+        <input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" /></li>
+        </ol>
+        </fieldset>
         </form>
     <!-- /TMPL_IF -->
     
             <td><!-- TMPL_VAR NAME="searchfield" --></td>
         </tr>
         <tr><th>Value: </th><td>
-               <!-- TMPL_VAR NAME="Tvalue" -->
-               </td></tr></table>
+        <!-- TMPL_VAR NAME="Tvalue" -->
+        </td></tr></table>
         <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
-        <input type="submit"  value="Yes, Delete"></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
+        <input type="submit"  value="Yes, Delete" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete" /></form>
     
     
     <!-- /TMPL_IF -->
         </form>
     <!-- /TMPL_IF -->
    
-
-
-
-
-
-
-
-
-
-
     <!-- TMPL_IF NAME="else" -->
-       
-       <div id="toolbar">
-       <script type="text/javascript">
-       //<![CDATA[
-       // prepare DOM for YUI Toolbar
-        $(document).ready(function() {
-           yuiToolbar();
-        });
-       // YUI Toolbar Functions
-       function yuiToolbar() {
-           new YAHOO.widget.Button("newstopword");
-       }       //]]>
-       </script>
-       <ul class="toolbar">
-       <li><a id="newstopword" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Preference</a></li>
-
-<li>
-<form action=/cgi-bin/koha/admin/systempreferences.pl method=post>
-     Search for Sys-Pref <input type=text name=searchfield value="">
-                <input type="hidden" value="all" name="tab"/>
-                <input type=submit name=submit value="submit">
-                </form>
-</li>
-
+    
+    <div id="toolbar">
+    <script type="text/javascript">
+    //<![CDATA[
+    // prepare DOM for YUI Toolbar
+     $(document).ready(function() {
+        yuiToolbar();
+     });
+    // YUI Toolbar Functions
+    function yuiToolbar() {
+        new YAHOO.widget.Button("newstopword");
+    }   //]]>
+    </script>
+    <ul class="toolbar">
+    <li><a id="newstopword" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Preference</a></li>
 </ul></div>
-       
+    
     <h1>System preferences admin</h1>
-    <div id="action">
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Patrons</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPACFeatures">OPAC Features</a>
-               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=FRBR">FRBR</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Intranet">Staff Client</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=LOGFeatures">Logs</a>
-        <a href="/cgi-bin/koha/admin/systempreferences.pl?">Other</a>
-    </div>
-    <h2>Editing preferences for <!-- TMPL_VAR name="tab" --> module</h2>
+    <h2>'<!-- TMPL_VAR name="tab" -->' preferences</h2>
     <!-- TMPL_VAR NAME="searchfield" -->
     <table width="80%">
     <tr>
     <!-- TMPL_LOOP NAME="loop" -->
     <tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
 
-        <td><strong><!-- TMPL_VAR NAME="variable" --></strong></td><td> <!-- TMPL_VAR NAME="explanation" --></td>
+        <td><strong><a href="<!-- TMPL_VAR NAME="edit" -->"><!-- TMPL_VAR NAME="variable" --></a></strong></td><td> <!-- TMPL_VAR NAME="explanation" --></td>
         <td><!-- TMPL_IF NAME="yesno" -->
-               <!-- TMPL_IF NAME="yes" -->ON<!-- TMPL_ELSE -->OFF<!-- /TMPL_IF -->
-               <!-- TMPL_ELSE --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF --></td>
+        <!-- TMPL_IF NAME="yes" -->ON<!-- TMPL_ELSE -->OFF<!-- /TMPL_IF -->
+        <!-- TMPL_ELSE --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF --></td>
 
         <td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit </a></td>
         <td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
 </div>
 </div>
 <div class="yui-b">
-<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
+<!-- TMPL_INCLUDE NAME="sysprefs-menu.inc" -->
 </div>
 </div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->