6 [% PROCESS 'i18n.inc' %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10 [% t("System preferences") | html %] ›
11 [% t("Administration") | html %] ›
12 [% t("Koha") | html %]
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
16 [% Asset.css("css/preferences.css") | $raw %]
17 [% Asset.css("css/humanmsg.css") | $raw %]
18 [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %]
19 [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
21 <body id="admin_preferences" class="admin">
22 [% WRAPPER 'header.inc' %]
23 [% INCLUDE 'prefs-admin-search.inc' %]
26 [% WRAPPER 'sub-header.inc' %]
27 [% WRAPPER breadcrumbs %]
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
32 <span>System preferences</span>
34 [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
42 [% IF ( jump_not_found ) %]
43 <div class="dialog alert">
44 Could not find a system preference named <code>[% jumpfield | html %]</code>.
47 [% IF ( search_not_found ) %]
48 <div class="dialog alert">
49 No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
51 <h1>System preferences</h1>
52 [% ELSIF searchfield %]
53 <h1>System preferences matching: [% searchfield | html %]</h1>
55 <h1>System preferences</h1>
57 [% FOREACH TAB IN TABS %]
58 <div class="prefs-tab">
59 <h2>[% TAB.tab_title | html %] preferences</h2>
60 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
61 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all btn btn-primary" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
62 <input type="hidden" name="op" value="save" />
63 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
65 [% FOREACH LINE IN TAB.LINES %]
66 [% IF ( LINE.is_group_title ) %]
67 [% UNLESS ( loop.first ) %]</tbody></table></div>[% END %]
68 <div class="page-section">
70 <div class="col-sm-6">
71 <h3 id="[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-caret-down"></i> [% LINE.title | html %]</h3>
73 <div class="col-sm-6">
74 [% IF ( searchfield ) %]
75 <div class="pull-right"><a class="btn btn-link" href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab_id | html %]#[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]"><i class="fa fa-list-ul"></i> View all [% LINE.title | html %] preferences</a></div>
80 <table class="preferences" id="collapse_[% TAB.tab_id | $HtmlId %]_[% LINE.title | $HtmlId %]">
81 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
82 [% UNLESS ( loop.last ) %]<tbody>[% END %]
84 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
86 <td class="name-cell">
88 [% FOREACH NAME IN LINE.NAMES %]
89 <label for="pref_[% NAME.name | html %]" class="nowrap">
90 <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=[% NAME.name | uri %]">
91 <i class="fa fa-bookmark" aria-hidden="true"></i></a>
92 [% IF ( NAME.jumped ) %]
93 <span class="term" id="jumped">[% NAME.name | html %]</span>
94 [% ELSIF ( NAME.highlighted ) %]
95 <span class="term">[% NAME.name | html %]</span>
97 [% NAME.name | html %]
100 [% IF NAME.overridden %]
101 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
106 [% UNLESS ( loop.last ) %]<br />[% END %]
111 [% FOREACH CHUNK IN LINE.CHUNKS %]
112 [% IF ( CHUNK.type_text ) %]
113 [% CHUNK.contents | $raw %]
114 [% ELSIF ( CHUNK.type_input ) %]
115 [% IF CHUNK.name == 'UsageStatsGeolocation' %]
116 <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 %]
118 <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 %]
120 [% ELSIF ( CHUNK.type_select ) %]
121 [% IF CHUNK.disabled %]
122 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" disabled="disabled" class="preference preference-[% CHUNK.class or "choice" | html %]">
124 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
126 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
127 [% IF ( CHOICE.selected ) %]
128 <option value="[% CHOICE.value | html %]" selected="selected">
130 <option value="[% CHOICE.value | html %]">
132 [% CHOICE.text | html %]
136 [% ELSIF ( CHUNK.type_modalselect ) %]
137 <input type="text" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="modalselect preference preference-[% CHUNK.type | html %]" data-source="[% CHUNK.source | html %]" data-required="[% CHUNK.required | html %]" data-exclusions="[% CHUNK.exclusions | html %]" data-inclusions="[% CHUNK.inclusions | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
138 [% ELSIF ( CHUNK.type_modaljs ) %]
139 <input type="text" name="pref_[% CHUNK.name | html %]" data-initiator="[% CHUNK.initiator | html %]" data-processor="[% CHUNK.processor | html %]" id="pref_[% CHUNK.name | html %]" class="modaljs preference preference-[% CHUNK.type | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
140 [% ELSIF ( CHUNK.type_multiple ) %]
141 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
142 [% 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 %]
144 [% ELSIF ( CHUNK.type_textarea )%]
145 [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
146 <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>
148 <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
149 <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>
150 <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>
152 [% ELSIF ( CHUNK.type_languages ) %]
153 <ul class="sortable">
154 [% FOREACH language IN CHUNK.languages %]
155 [% IF ( language.plural ) %]
157 [% IF ( language.native_description ) %]
158 [% language.native_description | html %]
160 [% language.rfc4646_subtag | html %]
162 [% IF language.sublanguages_loop.size > 0 %]
164 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
166 <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>
167 [% IF ( sublanguages_loo.enabled ) %]
168 <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"/>
170 <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"/>
173 [% END # FOREACH sublanguages %]
179 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
180 [% IF ( language.group_enabled ) %]
181 <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"/>
183 <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"/>
186 [% END # IF language.plural %]
187 [% END # FOREACH language %]
188 </ul> <!-- / ul.sortable -->
191 [% IF LINE.WARNINGS.size %]
192 [% FOR w IN LINE.WARNINGS %]
193 <div class="dialog alert">
195 [% CASE "bcrypt_config_not_set" %]<span>Pseudonymization must only be turned on if the 'bcrypt_settings' configuration entry exists and is correctly filled in the Koha configuration file.</span>
196 [% CASE %]<span>Unknown warning "[% w | html %]"</span>
203 [% IF ( loop.last ) %]</tbody></table></div>[% END %]
206 <fieldset class="action"><button class="save-all submit btn btn-primary" 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>
212 </div> <!-- /.col-sm-10.col-sm-push-2 -->
214 <div class="col-sm-2 col-sm-pull-10">
216 [% INCLUDE 'prefs-menu.inc' %]
218 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
219 </div> <!-- /.row -->
222 <div class="modal" id="prefModal" tabindex="-1" role="dialog" aria-labelledby="prefModalLabel">
223 <div class="modal-dialog modal-wide" role="document">
224 <div class="modal-content">
225 <div class="modal-header">
226 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
227 <h4 class="modal-title" id="prefModalLabel">Modal title</h4>
229 <div class="modal-body">
231 <a href="#" id="select_all"><i class="fa fa-check"></i> Select all</a>
233 <a href="#" id="clear_all"><i class="fa fa-times"></i> Clear all</a>
235 <form action="#" id="prefModalForm">
238 <div class="modal-footer">
239 <button id="saveModalPrefs" data-target="" type="button" class="btn btn-primary">Save</button>
240 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
246 [% MACRO jsinclude BLOCK %]
247 [% INCLUDE 'datatables.inc' %]
248 [% Asset.js("lib/hc-sticky.js") | $raw %]
249 [% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
250 [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
251 [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
252 [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
253 [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
254 [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
255 [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
256 [% Asset.js( "lib/linters/jshint.min.js" ) | $raw %]
257 [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
258 [% Asset.js( "lib/linters/csslint.min.js" ) | $raw %]
259 [% Asset.js( "lib/linters/js-yaml.min.js" ) | $raw %]
260 [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
261 [% Asset.js( "lib/codemirror/javascript-lint.min.js" ) | $raw %]
262 [% Asset.js( "lib/codemirror/css-lint.min.js" ) | $raw %]
263 [% Asset.js( "lib/codemirror/yaml-lint.min.js" ) | $raw %]
267 var themelang = "[% themelang | html %]";
268 $(document).ready(function(){
269 [% UNLESS ( searchfield ) %]
270 Sticky = $("#toolbar");
273 stickyClass: "floating"
276 $("select[multiple='multiple']").multipleSelect( {
277 placeholder: _("Please select ..."),
278 selectAllText: _("Select all"),
279 allSelected: _("All selected"),
280 countSelected: _("# of % selected"),
281 noMatchesFound: _("No matches found")
283 $(".force_reload").on("click",function(e){
285 window.location.reload(true);
288 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
289 var to_highlight = "[% To.json( searchfield ) | html %]";
290 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
291 var db_columns = [% To.json( db_columns ) | $raw %];
293 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
294 [% Asset.js("js/ajax.js") | $raw %]
295 [% Asset.js("js/pages/preferences.js") | $raw %]
296 [%# Add WYSIWYG editor for htmlarea system preferences %]
297 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
300 [% INCLUDE 'intranet-bottom.inc' %]