6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Administration › 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.css") | $raw %]
14 <body id="admin_preferences" class="admin">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'prefs-admin-search.inc' %]
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › System preferences</div>
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
25 [% IF ( jump_not_found ) %]
26 <h2>System preferences</h2>
27 <div class="dialog alert">
28 Could not find a system preference named <code>[% jumpfield | html %]</code>.
31 [% IF ( search_not_found ) %]
32 <div class="dialog alert">
33 No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
35 [% ELSIF searchfield %]
36 <h1>You searched for: [% searchfield | html %]</h1>
38 [% FOREACH TAB IN TABS %]
39 <div class="prefs-tab">
40 <h2>[% TAB.tab_title | html %] preferences</h2>
41 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
42 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
43 <input type="hidden" name="op" value="save" />
44 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
46 [% FOREACH LINE IN TAB.LINES %]
47 [% IF ( LINE.is_group_title ) %]
48 [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
49 <h3>[% LINE.title | html %]</h3>
50 <table class="preferences">
51 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
52 [% UNLESS ( loop.last ) %]<tbody>[% END %]
54 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
56 <td class="name-cell">
58 [% FOREACH NAME IN LINE.NAMES %]
59 <label for="pref_[% NAME.name | html %]">
60 [% IF ( NAME.jumped ) %]
61 <span class="term" id="jumped">[% NAME.name | html %]</span>
62 [% ELSIF ( NAME.highlighted ) %]
63 <span class="term">[% NAME.name | html %]</span>
65 [% NAME.name | html %]
68 [% IF NAME.overridden %]
69 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
74 [% UNLESS ( loop.last ) %]<br />[% END %]
79 [% FOREACH CHUNK IN LINE.CHUNKS %]
80 [% IF ( CHUNK.type_text ) %]
81 [% CHUNK.contents | $raw %]
82 [% ELSIF ( CHUNK.type_input ) %]
83 <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 %]
84 [% ELSIF ( CHUNK.type_select ) %]
85 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
86 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
87 [% IF ( CHOICE.selected ) %]
88 <option value="[% CHOICE.value | html %]" selected="selected">
90 <option value="[% CHOICE.value | html %]">
92 [% CHOICE.text | html %]
96 [% ELSIF ( CHUNK.type_multiple ) %]
97 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
98 [% 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 %]
100 [% ELSIF ( CHUNK.type_textarea )%]
101 [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
102 <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>
104 <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
105 <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>
106 <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>
108 [% ELSIF ( CHUNK.type_languages ) %]
109 <ul class="sortable">
110 [% FOREACH language IN CHUNK.languages %]
111 [% IF ( language.plural ) %]
113 [% IF ( language.native_description ) %]
114 [% language.native_description | html %]
116 [% language.rfc4646_subtag | html %]
118 [% IF language.sublanguages_loop.size > 0 %]
120 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
122 <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>
123 [% IF ( sublanguages_loo.enabled ) %]
124 <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"/>
126 <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"/>
129 [% END # FOREACH sublanguages %]
135 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
136 [% IF ( language.group_enabled ) %]
137 <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"/>
139 <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"/>
142 [% END # IF language.plural %]
143 [% END # FOREACH language %]
144 </ul> <!-- / ul.sortable -->
149 [% IF ( loop.last ) %]</tbody></table>[% END %]
152 <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 </div> <!-- /.col-sm-10.col-sm-push-2 -->
160 <div class="col-sm-2 col-sm-pull-10">
162 [% INCLUDE 'prefs-menu.inc' %]
164 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
165 </div> <!-- /.row -->
167 [% MACRO jsinclude BLOCK %]
168 [% INCLUDE 'datatables.inc' %]
169 [% Asset.js("lib/hc-sticky.js") | $raw %]
170 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
171 [% Asset.js( "lib/codemirror/codemirror-compressed.js" ) | $raw %]
172 [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
173 [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
174 [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
175 [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
178 $(document).ready(function(){
179 [% UNLESS ( searchfield ) %]
180 Sticky = $("#toolbar");
183 stickyClass: "floating"
186 $("select[multiple='multiple']").multipleSelect( {
187 placeholder: _("Please select ..."),
188 selectAllText: _("Select all"),
189 allSelected: _("All selected"),
190 countSelected: _("# of % selected"),
191 noMatchesFound: _("No matches found")
193 $(".force_reload").on("click",function(e){
195 window.location.reload(true);
199 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
200 var to_highlight = "[% To.json( searchfield ) | $raw %]";
201 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
202 var MSG_NOTHING_TO_SAVE = _("Nothing to save");
203 var MSG_SAVING = _("Saving...");
204 var MSG_SAVED_PREFERENCE = _("Saved preference %s");
205 var MSG_MODIFIED = _("modified");
206 var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
207 var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
208 var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
209 var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
210 var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
211 var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
212 var MSG_LOADING = _( "Loading..." );
213 var MSG_ALL_VALUE_WARN = _("Note: _ALL_ value will override all other values");
214 var MSG_UPD_LOC_FORMAT_WARN = _("The following values are not formatted correctly:");
215 var MSG_INVALID = _( "Error: presence of invalid data prevent saving. Please make the corrections and try again." );
217 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
218 [% Asset.js("js/ajax.js") | $raw %]
219 [% Asset.js("js/pages/preferences.js") | $raw %]
220 [%# Add WYSIWYG editor for htmlarea system preferences %]
221 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
224 [% INCLUDE 'intranet-bottom.inc' %]