2 <div class="pluginlist">
3 [% FOREACH plugin IN plugins %]
5 <div class="pluginname">
6 [% IF plugin.enabled %]<input type="checkbox" checked="checked" id="checkbox_[% type %][% plugin.name %]">[% ELSE %]<input type="checkbox" id="checkbox_[% type %][% plugin.name %]">[% END %]
7 <label class='pluginlabel' for="checkbox_[% type %][% plugin.name %]">[% plugin.name %]</label></div>
8 <div class="plugindesc">
9 [% SWITCH plugin.name %]
10 [% CASE 'AuthorityFile' %]
11 Suggest authorities which are relevant to the term the user searched for.
12 [% CASE 'ExplodedTerms' %]
13 Suggest that patrons expand their searches to include
14 broader/narrower/related terms.
21 [% INCLUDE 'doc-head-open.inc' %]
22 <title>Koha › Administration › Did you mean?</title>
23 [% INCLUDE 'doc-head-close.inc' %]
25 $(document).ready(function() {
26 $( ".pluginlist" ).sortable();
27 $( ".plugin" ).addClass( "ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" )
28 .find( ".pluginname" )
29 .addClass( "ui-widget-header ui-corner-all" )
31 .find( ".plugindesc" );
34 function yesimeant() {
35 var OPACdidyoumean = serialize_plugins('opac');
36 var INTRAdidyoumean = serialize_plugins('intranet');
38 var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean) + "&pref_INTRAdidyoumean=" + encodeURIComponent(INTRAdidyoumean);
43 url: '/cgi-bin/koha/svc/config/systempreferences/',
44 success: function () { alert("Successfully saved configuration"); },
49 function serialize_plugins(interface) {
50 var serializedconfig = '[';
51 $('#didyoumean' + interface + ' .pluginlist .plugin').each(function(index) {
52 var name = $(this).find('.pluginlabel').text();
53 var enabled = $(this).find('input:checkbox:checked').length ?
54 ', "enabled": 1' : '';
55 serializedconfig += '{ "name": "' + name + '"' + enabled + '}, ';
57 serializedconfig = serializedconfig.substring(0, serializedconfig.length - 2);
58 serializedconfig += ']';
59 return serializedconfig;
63 <body id="admin_didyoumean" class="admin">
64 [% INCLUDE 'header.inc' %]
65 [% INCLUDE 'cat-search.inc' %]
66 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Did you mean?</div>
68 <div id="doc3" class="yui-t2">
73 <h3>Did you mean?</h3>
74 <noscript><div class="dialog alert"><strong>Please enable Javascript:</strong>
75 Configuring <em>Did you mean?</em> plugins requires Javascript. If
76 you are unable to use Javascript, you may be able to enter the
77 configuration (which is stored in JSON in the OPACdidyoumean and
78 INTRAdidyoumean system preferences) in the Local Preferences tab in
79 the system preference editor, but this is unsupported, not
80 recommended, and likely will not work.</div></noscript>
81 <div id="didyoumeanlegend">
82 Please put the <em>Did you mean?</em> plugins in order by significance, from
83 most significant to least significant, and check the box to enable those
84 plugins that you want to use. (NOTE: <em>Did you mean?</em> functionality
85 is not yet enabled on the staff client)
87 <form action="/cgi-bin/koha/admin/didyoumean.pl" method="post">
88 <fieldset id="didyoumeanopac">
90 [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
92 <fieldset id="didyoumeanintranet">
93 <legend>Intranet</legend>
94 [% PROCESS pluginlist plugins=INTRApluginlist type='intranet' %]
96 <fieldset class="action"><button class="save-all submit" onclick="yesimeant();return false;" type="submit">Save configuration</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset>
102 [% INCLUDE 'admin-menu.inc' %]
105 [% INCLUDE 'intranet-bottom.inc' %]