5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration › System preferences</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% Asset.css("css/datatables.css") | $raw %]
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 %]
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 ) || ( CHUNK.type_htmlarea )%]
100 [% IF ( CHUNK.type_htmlarea ) && ( 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" style="display: none" href="#">Click to Edit</a>
104 <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" rows="10" cols="40">[% CHUNK.value | html %]</textarea>
105 <a class="collapse-textarea" style="display:none" href="#">Click to collapse</br></a>
107 [% ELSIF ( CHUNK.type_languages ) %]
108 <dl class="sortable">
109 [% FOREACH language IN CHUNK.languages %]
111 [% IF ( language.plural ) %]
113 [% IF ( language.native_description ) %][% language.native_description | html %][% ELSE %][% language.rfc4646_subtag | html %][% END %]
115 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
117 <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>
118 [% IF ( sublanguages_loo.enabled ) %]
119 <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"/>
121 <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"/>
127 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %]([% language.rfc4646_subtag | html %])</label>
128 [% IF ( language.group_enabled ) %]
129 <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"/>
131 <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 [% IF ( loop.last ) %]</tbody></table>[% END %]
145 <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>
151 </div> <!-- /.col-sm-10.col-sm-push-2 -->
153 <div class="col-sm-2 col-sm-pull-10">
155 [% INCLUDE 'prefs-menu.inc' %]
157 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
158 </div> <!-- /.row -->
160 [% MACRO jsinclude BLOCK %]
161 [% INCLUDE 'datatables.inc' %]
162 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
163 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
165 [% UNLESS ( searchfield ) %]$(document).ready(function(){
166 $('#toolbar').fixFloat();
169 $(document).ready(function(){
170 $("select[multiple='multiple']").multipleSelect( {
171 placeholder: _("Please select ..."),
172 selectAllText: _("Select all"),
173 allSelected: _("All selected"),
174 countSelected: _("# of % selected"),
175 noMatchesFound: _("No matches found")
177 $(".force_reload").on("click",function(e){
179 window.location.reload(true);
182 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
183 var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
184 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
185 var MSG_NOTHING_TO_SAVE = _("Nothing to save");
186 var MSG_SAVING = _("Saving...");
187 var MSG_SAVED_PREFERENCE = _("Saved preference %s");
188 var MSG_MODIFIED = _("modified");
189 var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
190 var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
191 var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
192 var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
193 var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
194 var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
195 var MSG_LOADING = _( "Loading..." );
197 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
198 [% Asset.js("js/ajax.js") | $raw %]
199 [% Asset.js("js/pages/preferences.js") | $raw %]
200 [%# Add WYSIWYG editor for htmlarea system preferences %]
201 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
204 [% INCLUDE 'intranet-bottom.inc' %]