Bug 20399: Remove "did you mean" for the staff interface

The amdin page for the "did you mean" feature has two block for setting it up in the staff interface, and a note saying this isn't implemented on the staff interface yet.
We remove the part about the staff interface until it actually is implemented.

Test plan :
1) Apply patch
2) Go to Administration > Did you mean?
3) See there is only the OPAC block
4) Change some checkboxes
5) Save configuration
6) Check that configuration is saved

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2020-03-19 17:59:39 +03:00 committed by Martin Renvoize
parent f2579bd8d2
commit c7a7420f25
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
4 changed files with 5 additions and 7 deletions

View File

@ -22,15 +22,12 @@ my ($template, $loggedinuser, $cookie)
my $opacplugins = from_json(C4::Context->preference('OPACdidyoumean') || '[]');
my $intraplugins = from_json(C4::Context->preference('INTRAdidyoumean') || '[]');
my @pluginlist = Koha::SuggestionEngine::AvailablePlugins();
foreach my $plugin (@pluginlist) {
next if $plugin eq 'Koha::SuggestionEngine::Plugin::Null';
next unless (can_load( modules => { "$plugin" => undef } ));
push @$opacplugins, { name => $plugin->NAME } unless grep { $_->{name} eq $plugin->NAME } @$opacplugins;
push @$intraplugins, { name => $plugin->NAME } unless grep { $_->{name} eq $plugin->NAME } @$intraplugins;
}
$template->{VARS}->{OPACpluginlist} = $opacplugins;
$template->{VARS}->{INTRApluginlist} = $intraplugins;
output_html_with_http_headers $input, $cookie, $template->output;

View File

@ -0,0 +1 @@
DELETE FROM systempreferences WHERE variable='INTRAdidyoumean';

View File

@ -250,7 +250,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
('OnSiteCheckoutAutoCheck','0','','Enable/Do not enable onsite checkout by default if last checkout was an onsite checkout','YesNo'),
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
('IntranetCirculationHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the reports home page', 'Free'),

View File

@ -57,10 +57,12 @@
<legend>OPAC</legend>
[% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
</fieldset>
<!-- TODO not yet implemented
<fieldset id="didyoumeanintranet">
<legend>Intranet</legend>
[% PROCESS pluginlist plugins=INTRApluginlist type='intranet' %]
</fieldset>
-->
<fieldset class="action"><button class="save-all submit" type="submit">Save configuration</button> <a href="/cgi-bin/koha/admin/didyoumean.pl" class="force_reload cancel">Cancel</a></fieldset>
</form>
@ -96,9 +98,8 @@
function yesimeant() {
var OPACdidyoumean = serialize_plugins('opac');
var INTRAdidyoumean = serialize_plugins('intranet');
var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean) + "&pref_INTRAdidyoumean=" + encodeURIComponent(INTRAdidyoumean);
var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean);
$.ajax({
data: data,