4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › System preferences</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% Asset.css("css/datatables.css") %]
8 [% Asset.css("css/preferences.css") %]
9 [% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.css") %]
10 [% Asset.css("css/humanmsg.css") %]
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 id="doc3" class="yui-t2">
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 %]</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 %] 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 %] preferences</button></div>[% END %]
42 <input type="hidden" name="op" value="save" />
43 <input type="hidden" name="tab" value="[% TAB.tab_id %]" />
45 [% FOREACH LINE IN TAB.LINES %]
46 [% IF ( LINE.is_group_title ) %]
47 [% UNLESS ( loop.first ) %]</tbody></table>[% END %]
48 <h3>[% LINE.title %]</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 %]">
59 [% IF ( NAME.jumped ) %]
60 <span class="term" id="jumped">[% NAME.name %]</span>
61 [% ELSIF ( NAME.highlighted ) %]
62 <span class="term">[% NAME.name %]</span>
67 [% IF NAME.overridden %]
68 <span class="overridden" title="The system preference [% NAME.name %] 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 ) %]
81 [% ELSIF ( CHUNK.type_input ) %]
82 <input type="[%IF CHUNK.input_type %][% CHUNK.input_type %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %]" 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 %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "choice" %]">
85 [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %]
86 [% IF ( CHOICE.selected ) %]
87 <option value="[% CHOICE.value %]" selected="selected">
89 <option value="[% CHOICE.value %]">
95 [% ELSIF ( CHUNK.type_multiple ) %]
96 <select name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "choice" %]" multiple="multiple">
97 [% FOREACH CHOICE IN CHUNK.CHOICES %][% IF ( CHOICE.selected ) %]<option value="[% CHOICE.value %]" selected="selected">[% ELSE %]<option value="[% CHOICE.value %]">[% END %][% CHOICE.text %]</option>[% END %]
99 [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%]
100 [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
101 <textarea name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %] mce" rows="20" cols="60">[% CHUNK.value %]</textarea>
103 <a class="expand-textarea" style="display: none" href="#">Click to Edit</a>
104 <textarea name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]" class="preference preference-[% CHUNK.class or "short" %]" rows="10" cols="40">[% CHUNK.value %]</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 %][% ELSE %][% language.rfc4646_subtag %][% END %]
115 [% FOREACH sublanguages_loo IN language.sublanguages_loop %]
117 <label for="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]">[% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %]([% sublanguages_loo.rfc4646_subtag %])</label>
118 [% IF ( sublanguages_loo.enabled ) %]
119 <input value="[% sublanguages_loo.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
121 <input value="[% sublanguages_loo.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% sublanguages_loo.rfc4646_subtag %]" type="checkbox" class="preference preference-checkbox"/>
127 <label for="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]">[% language.native_description %]([% language.rfc4646_subtag %])</label>
128 [% IF ( language.group_enabled ) %]
129 <input value="[% language.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]" type="checkbox" checked="checked" class="preference preference-checkbox"/>
131 <input value="[% language.rfc4646_subtag %]" name="pref_[% CHUNK.name %]" id="pref_[% CHUNK.name %]_[% language.rfc4646_subtag %]" 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 %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl" class="force_reload cancel">Cancel</a></fieldset>
152 [% INCLUDE 'prefs-menu.inc' %]
156 [% MACRO jsinclude BLOCK %]
157 [% INCLUDE 'datatables.inc' %]
158 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
159 [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") %]
160 <script type="text/javascript">
161 [% UNLESS ( searchfield ) %]$(document).ready(function(){
162 $('#toolbar').fixFloat();
165 $(document).ready(function(){
166 $("select[multiple='multiple']").multipleSelect( {
167 placeholder: _("Please select ..."),
168 selectAllText: _("Select all"),
169 allSelected: _("All selected"),
170 countSelected: _("# of % selected"),
171 noMatchesFound: _("No matches found")
173 $(".force_reload").on("click",function(e){
175 window.location.reload(true);
178 // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
179 var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') |html %]";
180 var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
181 var MSG_NOTHING_TO_SAVE = _("Nothing to save");
182 var MSG_SAVING = _("Saving...");
183 var MSG_SAVED_PREFERENCE = _("Saved preference %s");
184 var MSG_MODIFIED = _("modified");
185 var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
186 var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
187 var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
188 var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
189 var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
190 var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
191 var MSG_LOADING = _( "Loading..." );
193 <script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
194 <script src="[% interface %]/[% theme %]/js/ajax.js" type="text/javascript"></script>
195 <script src="[% interface %]/[% theme %]/js/pages/preferences.js" type="text/javascript"></script>
196 [%# Add WYSIWYG editor for htmlarea system preferences %]
197 [% INCLUDE 'wysiwyg-systempreferences.inc' %]
200 [% INCLUDE 'intranet-bottom.inc' %]