Reformat system pref sections as collapsible blocks
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / preferences.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; System Preferences</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang"-->/css/preferences.css" />
5 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang"-->/css/humanmsg.css" />
6 <script src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
7 <script src="<!-- TMPL_VAR NAME="themelang" -->/js/ajax.js" type="text/javascript"></script>
8 <script src="<!-- TMPL_VAR NAME="themelang" -->/js/pages/preferences.js" type="text/javascript"></script>
9 <script src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js" type="text/javascript"></script>
10 <script type="text/javascript">
11 //<![CDATA[
12         $(document).ready(function(){
13                 $("h3").attr("class","expanded").attr("title",_("Click to expand this section"));
14                 var collapsible = $(".collapsed,.expanded");
15         
16             $(collapsible).toggle(function () {
17              $(this).addClass("collapsed").removeClass("expanded").attr("title",_("Click to expand this section"));
18          $(this).next("table").hide();
19               },
20               function () {
21                 $(this).addClass("expanded").removeClass("collapsed").attr("title",_("Click to collapse this section"));
22                 $(this).next("table").show();
23               }
24     );
25
26                 
27         });
28     <!-- TMPL_IF NAME="searchfield" -->
29     var to_highlight = "<!-- TMPL_VAR NAME="searchfield" ESCAPE="JS"-->";
30
31     if ( to_highlight ) {
32         var words = to_highlight.split( ' ' );
33         $( document ).ready( function () {
34             $( '.prefs-tab table' ).find( 'td, th' ).not( '.name-cell' ).each( function ( i, td ) {
35                 $.each( words, function ( i, word ) { $( td ).highlight( word ) } );
36             } ).find( 'option' ).removeHighlight();
37         } );
38     }
39     <!-- /TMPL_IF -->
40 //]]>
41 </script>
42 </head>
43 <body>
44 <!-- TMPL_INCLUDE NAME="header.inc" -->
45 <!-- TMPL_INCLUDE NAME="prefs-admin-search.inc" -->
46
47 <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; System Preferences</div>
48
49 <div id="doc3" class="yui-t2">
50
51    <div id="bd">
52     <div id="yui-main">
53     <div class="yui-b">
54         <div id="toolbar">
55                 <form action="/cgi-bin/koha/admin/preferences.pl" method="get">
56                         <input type="hidden" name="op" value="jump" />
57                         <input type="hidden" name="tab" value="<!-- TMPL_VAR NAME="tab" -->" />
58                         <label for="jumpfield">Jump to named preference:</label>
59                         <input type="text" name="jumpfield" id="jumpfield" value="<!-- TMPL_VAR NAME="jumpfield" -->" />
60                         <input type="submit" value="Jump" />
61                 </form>
62         </div>
63
64     <!-- TMPL_IF NAME="jump_not_found" -->
65     <h2>System preferences</h2>
66     <div class="dialog error">
67         Could not find a system preference named <code><!-- TMPL_VAR NAME="jumpfield" --></code>.
68     </div>
69     <!-- /TMPL_IF -->
70     <!-- TMPL_IF NAME="search_not_found" -->
71     <div class="dialog error">
72         No system preferences matched your search for <strong><!-- TMPL_VAR NAME="searchfield" --></strong>. You can try a different search or <a href="/cgi-bin/koha/admin/preferences.pl?tab=<!-- TMPL_VAR NAME="last_tab" -->">return to where you were before.</a>
73     </div>
74     <!-- /TMPL_IF -->
75     <!-- TMPL_LOOP NAME="TABS" -->
76     <div class="prefs-tab">
77     <h2><!-- TMPL_VAR NAME="tab_title" --> preferences</h2>
78     <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
79         <input type="hidden" name="op" value="save" />
80         <input type="hidden" name="tab" value="<!-- TMPL_VAR NAME="tab" -->" />
81
82             <!-- TMPL_LOOP NAME="LINES" -->
83             <!-- TMPL_IF NAME="is_group_title" -->
84             <!-- TMPL_IF NAME="__first__" -->
85                                 <h3><!-- TMPL_IF NAME="highlighted" -->
86                                 <span class="term"><!-- TMPL_VAR NAME="title" --></span>
87                                 <!-- TMPL_ELSE -->
88                                 <!-- TMPL_VAR NAME="title" -->
89                                 <!-- /TMPL_IF --></h3><table><!-- TMPL_ELSE --></tbody></table>
90                                 <h3><!-- TMPL_IF NAME="highlighted" -->
91                                 <span class="term"><!-- TMPL_VAR NAME="title" --></span>
92                                 <!-- TMPL_ELSE -->
93                                 <!-- TMPL_VAR NAME="title" -->
94                                 <!-- /TMPL_IF --></h3><table><!-- /TMPL_IF -->
95             <thead><tr><th>Preference</th><th>Value</th></tr></thead>
96             <!-- TMPL_UNLESS NAME="__last__" --><tbody><!-- /TMPL_UNLESS -->
97             <!-- TMPL_ELSE -->
98             <!-- TMPL_IF NAME="__first__" --><table><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody><!-- /TMPL_IF -->
99             <tr>
100                 <td class="name-cell">
101                     <code>
102                         <!-- TMPL_LOOP NAME="NAMES" -->
103                                                 <label for="pref_<!-- TMPL_VAR NAME="name" -->">
104                                                         <!-- TMPL_IF NAME="highlighted" -->
105                                                         <span class="term" id="highlighted"><!-- TMPL_VAR NAME="name" --></span>
106                                                         <!-- TMPL_ELSE -->
107                                                         <!-- TMPL_VAR NAME="name" -->
108                                                         <!-- /TMPL_IF -->
109                                                 </label>
110                         <!-- TMPL_UNLESS NAME="__last__" --><br /><!-- /TMPL_UNLESS -->
111                         <!-- /TMPL_LOOP -->
112                     </code>
113                 </td>
114                 <td>
115                     <!-- TMPL_LOOP NAME="CHUNKS" -->
116                     <!-- TMPL_IF NAME="type_text" -->
117                     <!-- TMPL_IF NAME="highlighted" -->
118                     <span class="term"><!-- TMPL_VAR NAME="contents" --></span>
119                     <!-- TMPL_ELSE -->
120                     <!-- TMPL_VAR NAME="contents" -->
121                     <!-- /TMPL_IF -->
122                     <!-- TMPL_ELSIF NAME="type_input" -->
123                     <input type="<!-- TMPL_VAR NAME="input_type" DEFAULT="text" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="short" -->" value="<!-- TMPL_VAR NAME="value" -->" autocomplete="off" />
124                     <!-- TMPL_ELSIF NAME="type_select" -->
125                     <select name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="choice" -->">
126                         <!-- TMPL_LOOP NAME="CHOICES" -->
127                         <!-- TMPL_IF NAME="selected" -->
128                         <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected">
129                         <!-- TMPL_ELSE -->
130                         <option value="<!-- TMPL_VAR NAME="value" -->">
131                         <!-- /TMPL_IF -->
132                             <!-- TMPL_VAR NAME="text" -->
133                         </option>
134                         <!-- /TMPL_LOOP -->
135                     </select>
136                     <!-- TMPL_ELSIF NAME="type_textarea" -->
137                                         <a class="expand-textarea" style="display: none" href="#">Click to Edit</a>
138                                         <textarea name="pref_<!-- TMPL_VAR NAME="name" -->" id="pref_<!-- TMPL_VAR NAME="name" -->" class="preference preference-<!-- TMPL_VAR NAME="class" DEFAULT="short" -->"><!-- TMPL_VAR NAME="value" --></textarea>
139                     <!-- TMPL_ELSIF NAME="type_languages" -->
140                     <dl>
141                     <!-- TMPL_LOOP NAME="languages" -->
142                     <dt>
143                         <!-- TMPL_IF NAME="plural" -->
144                         <dt>
145                             <!-- TMPL_IF NAME="native_description" --><!-- TMPL_VAR NAME="native_description" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rfc4646_subtag" --><!-- /TMPL_IF -->
146                         </dt>
147                         <!-- TMPL_LOOP NAME="sublanguages_loop" -->
148                         <dd>
149                             <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" -->)</label>
150                             <!-- TMPL_IF NAME="enabled" -->
151                             <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" />
152                             <!-- TMPL_ELSE -->
153                             <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" />
154                             <!-- /TMPL_IF -->
155                         </dd>
156                         <!-- /TMPL_LOOP -->
157                         <!-- TMPL_ELSE -->
158                         <dt>
159                             <label for="<!-- TMPL_VAR NAME="rfc4646_subtag" -->"><!-- TMPL_VAR NAME="native_description" -->(<!-- TMPL_VAR NAME="rfc4646_subtag" -->)</label>
160                             <!-- TMPL_IF NAME="group_enabled" -->
161                             <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" checked="checked" />
162                             <!-- TMPL_ELSE -->
163                             <input value="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" name="pref_<!-- TMPL_VAR NAME="name" -->" id="<!-- TMPL_VAR NAME="rfc4646_subtag" -->" type="checkbox" />
164                             <!-- /TMPL_IF -->
165                         </dt>
166                         <!-- /TMPL_IF -->
167                     <!-- /TMPL_LOOP -->
168                     </dl>
169                     <!-- /TMPL_IF -->
170                     <!-- /TMPL_LOOP -->
171                 </td>
172             </tr>
173             <!-- TMPL_IF NAME="__last__" --></tbody></table><!-- /TMPL_IF -->
174             <!-- /TMPL_IF -->
175         <!-- /TMPL_LOOP -->
176         <fieldset class="action"><button class="save-all submit" type="submit">Save all <!-- TMPL_VAR NAME="tab_title" --> preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl?tab=<!-- TMPL_VAR NAME="tab" -->" class="cancel">Cancel</a></fieldset>
177     </form>
178     </div>
179     <!-- /TMPL_LOOP -->
180 </div>
181 </div>
182 <div class="yui-b">
183 <!-- TMPL_INCLUDE NAME="prefs-menu.inc" -->
184 </div>
185 </div>
186 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->