5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › System preferences</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% Asset.css("css/preferences.css") | $raw %]
9 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") | $raw %]
10 [% Asset.css("css/humanmsg.css") | $raw %]
11 [% Asset.css("lib/codemirror/codemirror.css") | $raw %]
13 <body id="admin_preferences" class="admin">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'prefs-admin-search.inc' %]
17 <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>
19 <div class="main container-fluid">
21 <div class="col-sm-10 col-sm-push-2">
24 [% IF ( jump_not_found ) %]
25 <h2>System preferences</h2>
26 <div class="dialog alert">
27 Could not find a system preference named <code>[% jumpfield | html %]</code>.
30 [% IF ( search_not_found ) %]
31 <div class="dialog alert">
32 No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
34 [% ELSIF searchfield %]
35 <h1>You searched for: [% searchfield | html %]</h1>
37 [% FOREACH TAB IN TABS %]
38 <div class="prefs-tab">
39 <h2>[% TAB.tab_title | html %] preferences</h2>
40 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
41 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
42 <input type="hidden" name="op" value="save" />
43 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
45 [% FOREACH LINE IN TAB.LINES %]
46 [% IF ( LINE.is_group_title ) %]
47 [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
48 <h3>[% LINE.title | html %]</h3>
49 <table class="preferences">
50 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
51 [% UNLESS ( loop.last ) %]<tbody>[% END %]
53 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
55 <td class="name-cell">
57 [% FOREACH NAME IN LINE.NAMES %]
58 <label for="pref_[% NAME.name | html %]">
59 [% IF ( NAME.jumped ) %]
60 <span class="term" id="jumped">[% NAME.name | html %]</span>
61 [% ELSIF ( NAME.highlighted ) %]
62 <span class="term">[% NAME.name | html %]</span>
64 [% NAME.name | html %]
67 [% IF NAME.overridden %]
68 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
73 [% UNLESS ( loop.last ) %]<br />[% END %]
78 [% FOREACH CHUNK IN LINE.CHUNKS %]
79 [% IF ( CHUNK.type_text ) %]
80 [% CHUNK.contents | $raw %]
81 [% ELSIF ( CHUNK.type_input ) %]
82 <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 %]
83 [% ELSIF ( CHUNK.type_select ) %]
84 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
85 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
86 [% IF ( CHOICE.selected ) %]
87 <option value="[% CHOICE.value | html %]" selected="selected">
89 <option value="[% CHOICE.value | html %]">
91 [% CHOICE.text | html %]
95 [% ELSIF ( CHUNK.type_multiple ) %]
96 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
97 [% 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 %]
99 [% ELSIF ( CHUNK.type_textarea )%]
100 [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
101 <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>
103 <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
104 <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>
105 <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>
107 [% ELSIF ( CHUNK.type_languages ) %]
108 <ul class="sortable">
109 [% FOREACH language IN CHUNK.languages %]
110 [% IF ( language.plural ) %]
112 [% IF ( language.native_description ) %]
113 [% language.native_description | html %]
115 [% language.rfc4646_subtag | html %]
117 [% IF language.sublanguages_loop.size > 0 %]
119 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
121 <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>
122 [% IF ( sublanguages_loo.enabled ) %]
123 <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"/>
125 <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"/>
128 [% END # FOREACH sublanguages %]
134 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label>
135 [% IF ( language.group_enabled ) %]
136 <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"/>
138 <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"/>
141 [% END # IF language.plural %]
142 [% END # FOREACH language %]
143 </ul> <!-- / ul.sortable -->
148 [% IF ( loop.last ) %]</tbody></table>[% END %]
151 <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>
157 </div> <!-- /.col-sm-10.col-sm-push-2 -->
159 <div class="col-sm-2 col-sm-pull-10">
161 [% INCLUDE 'prefs-menu.inc' %]
163 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
164 </div> <!-- /.row -->
166 [% MACRO jsinclude BLOCK %]
167 [% INCLUDE 'datatables.inc' %]
168 [% Asset.js("lib/hc-sticky.js") | $raw %]
169 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
170 [% Asset.js( "lib/codemirror/codemirror-compressed.js" ) | $raw %]
171 [% Asset.js( "lib/codemirror/css.min.js" ) | $raw %]
172 [% Asset.js( "lib/codemirror/javascript.min.js" ) | $raw %]
173 [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
174 [% Asset.js( "lib/codemirror/yaml.min.js" ) | $raw %]
177 $(document).ready(function(){
178 [% UNLESS ( searchfield ) %]
179 Sticky = $("#toolbar");
182 stickyClass: "floating"
185 $("select[multiple='multiple']").multipleSelect( {
186 placeholder: _("Please select ..."),
187 selectAllText: _("Select all"),
188 allSelected: _("All selected"),
189 countSelected: _("# of % selected"),
190 noMatchesFound: _("No matches found")
192 $(".force_reload").on("click",function(e){
194 window.location.reload(true);
198 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
199 var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
200 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
201 var MSG_NOTHING_TO_SAVE = _("Nothing to save");
202 var MSG_SAVING = _("Saving...");
203 var MSG_SAVED_PREFERENCE = _("Saved preference %s");
204 var MSG_MODIFIED = _("modified");
205 var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
206 var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
207 var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
208 var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
209 var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
210 var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
211 var MSG_LOADING = _( "Loading..." );
213 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
214 [% Asset.js("js/ajax.js") | $raw %]
215 [% Asset.js("js/pages/preferences.js") | $raw %]
216 [%# Add WYSIWYG editor for htmlarea system preferences %]
217 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
220 [% INCLUDE 'intranet-bottom.inc' %]