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 %]
12 <body id="admin_preferences" class="admin">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'prefs-admin-search.inc' %]
16 <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>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
23 [% IF ( jump_not_found ) %]
24 <h2>System preferences</h2>
25 <div class="dialog alert">
26 Could not find a system preference named <code>[% jumpfield | html %]</code>.
29 [% IF ( search_not_found ) %]
30 <div class="dialog alert">
31 No system preferences matched your search for: <strong>[% searchfield | html %]</strong>
33 [% ELSIF searchfield %]
34 <h1>You searched for: [% searchfield | html %]</h1>
36 [% FOREACH TAB IN TABS %]
37 <div class="prefs-tab">
38 <h2>[% TAB.tab_title | html %] preferences</h2>
39 <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
40 [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title | html %] preferences</button></div>[% END %]
41 <input type="hidden" name="op" value="save" />
42 <input type="hidden" name="tab" value="[% TAB.tab_id | html %]" />
44 [% FOREACH LINE IN TAB.LINES %]
45 [% IF ( LINE.is_group_title ) %]
46 [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
47 <h3>[% LINE.title | html %]</h3>
48 <table class="preferences">
49 <thead><tr><th>Preference</th><th>Value</th></tr></thead>
50 [% UNLESS ( loop.last ) %]<tbody>[% END %]
52 [% IF ( loop.first ) %]<table class="preferences"><thead><tr><th>Preference</th><th>Value</th></tr></thead><tbody>[% END %]
54 <td class="name-cell">
56 [% FOREACH NAME IN LINE.NAMES %]
57 <label for="pref_[% NAME.name | html %]">
58 [% IF ( NAME.jumped ) %]
59 <span class="term" id="jumped">[% NAME.name | html %]</span>
60 [% ELSIF ( NAME.highlighted ) %]
61 <span class="term">[% NAME.name | html %]</span>
63 [% NAME.name | html %]
66 [% IF NAME.overridden %]
67 <span class="overridden" title="The system preference [% NAME.name | html %] may have been overridden from this value by one or more virtual hosts.">
72 [% UNLESS ( loop.last ) %]<br />[% END %]
77 [% FOREACH CHUNK IN LINE.CHUNKS %]
78 [% IF ( CHUNK.type_text ) %]
79 [% CHUNK.contents | $raw %]
80 [% ELSIF ( CHUNK.type_input ) %]
81 <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 %]
82 [% ELSIF ( CHUNK.type_select ) %]
83 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]">
84 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
85 [% IF ( CHOICE.selected ) %]
86 <option value="[% CHOICE.value | html %]" selected="selected">
88 <option value="[% CHOICE.value | html %]">
90 [% CHOICE.text | html %]
94 [% ELSIF ( CHUNK.type_multiple ) %]
95 <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple">
96 [% 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 %]
98 [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%]
99 [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
100 <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>
102 <a class="expand-textarea" style="display: none" href="#">Click to Edit</a>
103 <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>
104 <a class="collapse-textarea" style="display:none" href="#">Click to collapse</br></a>
106 [% ELSIF ( CHUNK.type_languages ) %]
107 <dl class="sortable">
108 [% FOREACH language IN CHUNK.languages %]
110 [% IF ( language.plural ) %]
112 [% IF ( language.native_description ) %][% language.native_description | html %][% ELSE %][% language.rfc4646_subtag | html %][% END %]
114 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
116 <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>
117 [% IF ( sublanguages_loo.enabled ) %]
118 <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"/>
120 <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"/>
126 <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %]([% language.rfc4646_subtag | html %])</label>
127 [% IF ( language.group_enabled ) %]
128 <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"/>
130 <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 [% IF ( loop.last ) %]</tbody></table>[% END %]
144 <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>
150 </div> <!-- /.col-sm-10.col-sm-push-2 -->
152 <div class="col-sm-2 col-sm-pull-10">
154 [% INCLUDE 'prefs-menu.inc' %]
156 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
157 </div> <!-- /.row -->
159 [% MACRO jsinclude BLOCK %]
160 [% INCLUDE 'datatables.inc' %]
161 [% Asset.js("lib/hc-sticky.js") | $raw %]
162 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]
165 $(document).ready(function(){
166 [% UNLESS ( searchfield ) %]
167 Sticky = $("#toolbar");
170 stickyClass: "floating"
173 $("select[multiple='multiple']").multipleSelect( {
174 placeholder: _("Please select ..."),
175 selectAllText: _("Select all"),
176 allSelected: _("All selected"),
177 countSelected: _("# of % selected"),
178 noMatchesFound: _("No matches found")
180 $(".force_reload").on("click",function(e){
182 window.location.reload(true);
185 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
186 var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
187 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
188 var MSG_NOTHING_TO_SAVE = _("Nothing to save");
189 var MSG_SAVING = _("Saving...");
190 var MSG_SAVED_PREFERENCE = _("Saved preference %s");
191 var MSG_MODIFIED = _("modified");
192 var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
193 var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
194 var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
195 var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
196 var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
197 var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
198 var MSG_LOADING = _( "Loading..." );
200 [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
201 [% Asset.js("js/ajax.js") | $raw %]
202 [% Asset.js("js/pages/preferences.js") | $raw %]
203 [%# Add WYSIWYG editor for htmlarea system preferences %]
204 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
207 [% INCLUDE 'intranet-bottom.inc' %]