View | Details | Raw Unified | Return to bug 20399
Collapse All | Expand All

(-)a/admin/didyoumean.pl (-4 / +1 lines)
Lines 22-36 my ($template, $loggedinuser, $cookie) Link Here
22
22
23
my $opacplugins = from_json(C4::Context->preference('OPACdidyoumean') || '[]');
23
my $opacplugins = from_json(C4::Context->preference('OPACdidyoumean') || '[]');
24
24
25
my $intraplugins = from_json(C4::Context->preference('INTRAdidyoumean') || '[]');
26
27
my @pluginlist = Koha::SuggestionEngine::AvailablePlugins();
25
my @pluginlist = Koha::SuggestionEngine::AvailablePlugins();
28
foreach my $plugin (@pluginlist) {
26
foreach my $plugin (@pluginlist) {
29
    next if $plugin eq 'Koha::SuggestionEngine::Plugin::Null';
27
    next if $plugin eq 'Koha::SuggestionEngine::Plugin::Null';
30
    next unless (can_load( modules => { "$plugin" => undef } ));
28
    next unless (can_load( modules => { "$plugin" => undef } ));
31
    push @$opacplugins, { name => $plugin->NAME } unless grep { $_->{name} eq $plugin->NAME } @$opacplugins;
29
    push @$opacplugins, { name => $plugin->NAME } unless grep { $_->{name} eq $plugin->NAME } @$opacplugins;
32
    push @$intraplugins, { name => $plugin->NAME } unless grep { $_->{name} eq $plugin->NAME } @$intraplugins;
33
}
30
}
34
$template->{VARS}->{OPACpluginlist} = $opacplugins;
31
$template->{VARS}->{OPACpluginlist} = $opacplugins;
35
$template->{VARS}->{INTRApluginlist} = $intraplugins;
32
36
output_html_with_http_headers $input, $cookie, $template->output;
33
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/installer/data/mysql/atomicupdate/bug_20399.sql (+1 lines)
Line 0 Link Here
1
DELETE FROM systempreferences WHERE variable='INTRAdidyoumean';
(-)a/installer/data/mysql/sysprefs.sql (-1 lines)
Lines 250-256 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
250
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
250
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
251
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
251
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
252
('OnSiteCheckoutAutoCheck','0','','Enable/Do not enable onsite checkout by default if last checkout was an onsite checkout','YesNo'),
252
('OnSiteCheckoutAutoCheck','0','','Enable/Do not enable onsite checkout by default if last checkout was an onsite checkout','YesNo'),
253
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
254
('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'),
253
('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'),
255
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
254
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
256
('IntranetCirculationHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the reports home page', 'Free'),
255
('IntranetCirculationHomeHTML', '', NULL, 'Show the following HTML in a div on the bottom of the reports home page', 'Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt (-3 / +3 lines)
Lines 57-66 Link Here
57
                <legend>OPAC</legend>
57
                <legend>OPAC</legend>
58
                [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
58
                [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
59
            </fieldset>
59
            </fieldset>
60
            <!-- TODO not yet implemented
60
            <fieldset id="didyoumeanintranet">
61
            <fieldset id="didyoumeanintranet">
61
                <legend>Intranet</legend>
62
                <legend>Intranet</legend>
62
                [% PROCESS pluginlist plugins=INTRApluginlist type='intranet' %]
63
                [% PROCESS pluginlist plugins=INTRApluginlist type='intranet' %]
63
            </fieldset>
64
            </fieldset>
65
            -->
64
            <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>
66
            <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>
65
        </form>
67
        </form>
66
68
Lines 96-104 Link Here
96
98
97
        function yesimeant() {
99
        function yesimeant() {
98
            var OPACdidyoumean = serialize_plugins('opac');
100
            var OPACdidyoumean = serialize_plugins('opac');
99
            var INTRAdidyoumean = serialize_plugins('intranet');
100
101
101
            var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean) + "&pref_INTRAdidyoumean=" + encodeURIComponent(INTRAdidyoumean);
102
            var data = "pref_OPACdidyoumean=" + encodeURIComponent(OPACdidyoumean);
102
103
103
            $.ajax({
104
            $.ajax({
104
                data: data,
105
                data: data,
105
- 

Return to bug 20399