Bug 27936: Clarify AllowItemsOnHoldCheckoutSIP syspref help text
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / preferences.tt
1 [% USE raw %]
2 [% USE To %]
3 [% USE Asset %]
4 [% USE Koha %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Administration &rsaquo; System preferences</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/preferences.css") | $raw %]
10 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") | $raw %]
11 [% Asset.css("css/humanmsg.css") | $raw %]
12 [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %]
13 [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
14 </head>
15 <body id="admin_preferences" class="admin">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'prefs-admin-search.inc' %]
18
19 <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>
20
21 <div class="main container-fluid">
22     <div class="row">
23         <div class="col-sm-10 col-sm-push-2">
24             <main>
25
26     [% IF ( jump_not_found ) %]
27     <h2>System preferences</h2>
28     <div class="dialog alert">
29         Could not find a system preference named <code>[% jumpfield | html %]</code>.
30     </div>
31     [% END %]
32     [% IF ( search_not_found ) %]
33     <div class="dialog alert">
34         No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
35     </div>
36     [% ELSIF searchfield %]
37         <h1>You searched for: [% searchfield | html %]</h1>
38     [% END %]
39     [% FOREACH TAB IN TABS %]
40     <div class="prefs-tab">
41     <h2>[% TAB.tab_title | html %] preferences</h2>
42     <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
43         [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
44         <input type="hidden" name="op" value="save" />
45         <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
46
47             [% FOREACH LINE IN TAB.LINES %]
48             [% IF ( LINE.is_group_title ) %]
49             [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
50             <h3>[% LINE.title | html %]</h3>
51             <table class="preferences">
52             <thead><tr><th>Preference</th><th>Value</th></tr></thead>
53             [% UNLESS ( loop.last ) %]<tbody>[% END %]
54             [% ELSE %]
55             [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
56             <tr class="name-row">
57                 <td class="name-cell">
58                     <code>
59                         [% FOREACH NAME IN LINE.NAMES %]
60                                                 <label for="pref_[% NAME.name | html %]">
61                                                         [% IF ( NAME.jumped ) %]
62                                                         <span class="term" id="jumped">[% NAME.name | html %]</span>
63                             [% ELSIF ( NAME.highlighted ) %]
64                                                         <span class="term">[% NAME.name | html %]</span>
65                                                         [% ELSE %]
66                                                         [% NAME.name | html %]
67                                                         [% END %]
68
69                             [% IF NAME.overridden %]
70                                 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
71                                     [Overridden]
72                                 </span>
73                             [% END %]
74                                                 </label>
75                         [% UNLESS ( loop.last ) %]<br />[% END %]
76                         [% END %]
77                     </code>
78                 </td>
79                 <td><div>
80                     [% FOREACH CHUNK IN LINE.CHUNKS %]
81                     [% IF ( CHUNK.type_text ) %]
82                     [% CHUNK.contents | $raw %]
83                     [% ELSIF ( CHUNK.type_input ) %]
84                         [% IF CHUNK.name == 'UsageStatsGeolocation' %]
85                             <input type="[%IF CHUNK.input_type %][% CHUNK.input_type | html %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" value="[% CHUNK.value | html %]" autocomplete="off" readonly="readonly" size="40" style="width: auto;"/> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
86                         [% ELSE %]
87                             <input type="[%IF CHUNK.input_type %][% CHUNK.input_type | html %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" value="[% CHUNK.value | html %]" autocomplete="off" /> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %]
88                         [% END %]
89                     [% ELSIF ( CHUNK.type_select ) %]
90                     <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
91                         [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
92                         [% IF ( CHOICE.selected ) %]
93                         <option value="[% CHOICE.value | html %]" selected="selected">
94                         [% ELSE %]
95                         <option value="[% CHOICE.value | html %]">
96                         [% END %]
97                             [% CHOICE.text | html %]
98                         </option>
99                         [% END %]
100                     </select>
101                     [% ELSIF ( CHUNK.type_multiple ) %]
102                     <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
103                         [% FOREACH CHOICE IN CHUNK.CHOICES %][% IF ( CHOICE.selected ) %]<option value="[% CHOICE.value | html %]" selected="selected">[% ELSE %]<option value="[% CHOICE.value | html %]">[% END %][% CHOICE.text | html %]</option>[% END %]
104                     </select>
105                     [% ELSIF ( CHUNK.type_textarea )%]
106                         [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
107                             <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea>
108                         [% ELSE %]
109                             <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
110                             <textarea style="display:none" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] codemirror" rows="10" cols="40">[% CHUNK.value | html %]</textarea>
111                             <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Click to collapse</br></a>
112                         [% END %]
113                     [% ELSIF ( CHUNK.type_languages ) %]
114                         <ul class="sortable">
115                             [% FOREACH language IN CHUNK.languages %]
116                                 [% IF ( language.plural ) %]
117                                     <li>
118                                         [% IF ( language.native_description ) %]
119                                             [% language.native_description | html %]
120                                         [% ELSE %]
121                                             [% language.rfc4646_subtag | html %]
122                                         [% END %]
123                                         [% IF language.sublanguages_loop.size > 0 %]
124                                             <ul>
125                                                 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
126                                                     <li>
127                                                         <label for="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])</label>
128                                                         [% IF ( sublanguages_loo.enabled ) %]
129                                                             <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
130                                                         [% ELSE %]
131                                                             <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/>
132                                                         [% END %]
133                                                     </li>
134                                                 [% END # FOREACH sublanguages %]
135                                             </ul>
136                                         [% END %]
137                                     </li>
138                                 [% ELSE %]
139                                     <li>
140                                         <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
141                                         [% IF ( language.group_enabled ) %]
142                                             <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
143                                         [% ELSE %]
144                                             <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/>
145                                         [% END %]
146                                     </li>
147                                 [% END # IF language.plural %]
148                             [% END # FOREACH language %]
149                         </ul> <!-- / ul.sortable -->
150                     [% END %]
151                     [% END %]
152                 </div></td>
153             </tr>
154             [% IF ( loop.last ) %]</tbody></table>[% END %]
155             [% END %]
156         [% END %]
157         <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl" class="force_reload cancel">Cancel</a></fieldset>
158     </form>
159     </div>
160     [% END %]
161
162             </main>
163         </div> <!-- /.col-sm-10.col-sm-push-2 -->
164
165         <div class="col-sm-2 col-sm-pull-10">
166             <aside>
167                 [% INCLUDE 'prefs-menu.inc' %]
168             </aside>
169         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
170      </div> <!-- /.row -->
171
172 [% MACRO jsinclude BLOCK %]
173     [% INCLUDE 'datatables.inc' %]
174     [% Asset.js("lib/hc-sticky.js") | $raw %]
175     [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
176     [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
177     [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
178     [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
179     [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
180     [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
181     [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
182     [% Asset.js( "lib/linters/jshint.min.js" ) | $raw %]
183     [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
184     [% Asset.js( "lib/linters/csslint.min.js" ) | $raw %]
185     [% Asset.js( "lib/linters/js-yaml.min.js" ) | $raw %]
186     [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
187     [% Asset.js( "lib/codemirror/javascript-lint.min.js" ) | $raw %]
188     [% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %]
189     [% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %]
190
191     <script>
192         var Sticky;
193         $(document).ready(function(){
194             [% UNLESS ( searchfield ) %]
195                 Sticky = $("#toolbar");
196                 Sticky.hcSticky({
197                     stickTo: "main",
198                     stickyClass: "floating"
199                 });
200             [% END %]
201             $("select[multiple='multiple']").multipleSelect( {
202                 placeholder: _("Please select ..."),
203                 selectAllText: _("Select all"),
204                 allSelected: _("All selected"),
205                 countSelected: _("# of % selected"),
206                 noMatchesFound: _("No matches found")
207             } );
208             $(".force_reload").on("click",function(e){
209                 e.preventDefault();
210                 window.location.reload(true);
211             });
212
213         });
214         // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
215         var to_highlight = "[% To.json( searchfield ) | $raw %]";
216         var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
217         var MSG_NOTHING_TO_SAVE = _("Nothing to save");
218         var MSG_SAVING = _("Saving...");
219         var MSG_SAVED_PREFERENCE = _("Saved preference %s");
220         var MSG_MODIFIED = _("modified");
221         var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
222         var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
223         var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
224         var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
225         var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
226         var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
227         var MSG_LOADING = _( "Loading..." );
228         var MSG_ALL_VALUE_WARN = _("Note: _ALL_ value will override all other values");
229         var MSG_UPD_LOC_FORMAT_WARN = _("The following values are not formatted correctly:");
230         var MSG_INVALID = _( "Error: presence of invalid data prevent saving. Please make the corrections and try again." );
231     </script>
232     [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
233     [% Asset.js("js/ajax.js") | $raw %]
234     [% Asset.js("js/pages/preferences.js") | $raw %]
235     [%# Add WYSIWYG editor for htmlarea system preferences %]
236     [% INCLUDE 'wysiwyg-systempreferences.inc' %]
237 [% END %]
238
239 [% INCLUDE 'intranet-bottom.inc' %]