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

(-)a/installer/data/mysql/atomicupdate/bug-35048-move-SCOMainUserBlock-to-additional-contents.pl (+32 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35048",
5
    description => "Move SCOMainUserBlock to additional contents",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Get any existing value from the SCOMainUserBlock system preference
11
        my ($scomainuserblock) = $dbh->selectrow_array(
12
            q|
13
            SELECT value FROM systempreferences WHERE variable='SCOMainUserBlock';
14
        |
15
        );
16
        if ($scomainuserblock) {
17
18
            # Insert any values found from system preference into additional_contents
19
            foreach my $lang ('default') {
20
                $dbh->do(
21
                    "INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'SCOMainUserBlock', 'SCOMainUserBlock', NULL, ?, ?, ?, CAST(NOW() AS date) )",
22
                    undef,             "SCOMainUserBlock $lang",
23
                    $scomainuserblock, $lang
24
                );
25
            }
26
27
            # Remove old system preference
28
            $dbh->do("DELETE FROM systempreferences WHERE variable='SCOMainUserBlock'");
29
            say $out "Bug 35048 update done";
30
        }
31
    }
32
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 644-650 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
644
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
644
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
645
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
645
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
646
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
646
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
647
('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'),
648
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
647
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
649
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
648
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
650
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
649
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1113-1124 Circulation: Link Here
1113
              type: textarea
1113
              type: textarea
1114
              syntax: javascript
1114
              syntax: javascript
1115
              class: code
1115
              class: code
1116
        -
1117
            - "Include the following HTML on the the web-based self checkout screen:"
1118
            - pref: SCOMainUserBlock
1119
              type: textarea
1120
              syntax: text/html
1121
              class: code
1122
        -
1116
        -
1123
            - "Include the following CSS on all pages in the web-based self checkout:"
1117
            - "Include the following CSS on all pages in the web-based self checkout:"
1124
            - pref: SCOUserCSS
1118
            - pref: SCOUserCSS
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 496-502 Link Here
496
            [% END %]
496
            [% END %]
497
        [% END %]
497
        [% END %]
498
    [% ELSE %]
498
    [% ELSE %]
499
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup' ] %]
499
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'SCOMainUserBlock' ] %]
500
        [% FOREACH l IN available_options.sort %]
500
        [% FOREACH l IN available_options.sort %]
501
            [% IF l == location %]
501
            [% IF l == location %]
502
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
502
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss (+10 lines)
Lines 847-852 button { Link Here
847
    }
847
    }
848
}
848
}
849
849
850
#backtotop {
851
    bottom: 40px;
852
    display: inline-block;
853
    font-size: 120%;
854
    position: fixed;
855
    right: 40px;
856
    text-align: center;
857
    z-index: 1000;
858
}
859
850
#logo {
860
#logo {
851
    background: transparent url( "../images/koha-green-logo.svg" ) no-repeat scroll 0%;
861
    background: transparent url( "../images/koha-green-logo.svg" ) no-repeat scroll 0%;
852
    border: 0;
862
    border: 0;
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-10 lines)
Lines 245-260 th { Link Here
245
    }
245
    }
246
}
246
}
247
247
248
#backtotop {
249
    bottom: 40px;
250
    display: inline-block;
251
    font-size: 120%;
252
    position: fixed;
253
    right: 40px;
254
    text-align: center;
255
    z-index: 1000;
256
}
257
258
#booleansearch {
248
#booleansearch {
259
    width: 80%;
249
    width: 80%;
260
}
250
}
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-2 / +7 lines)
Lines 5-10 Link Here
5
[% USE AudioAlerts %]
5
[% USE AudioAlerts %]
6
[% USE To %]
6
[% USE To %]
7
[% USE Price %]
7
[% USE Price %]
8
[% USE AdditionalContents %]
9
[% SET SCOMainUserBlock = AdditionalContents.get( location => "SCOMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Self checkout &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
11
<title>Self checkout &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
10
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Lines 436-442 Link Here
436
                            </div> <!-- / .sco_entry -->
438
                            </div> <!-- / .sco_entry -->
437
                        [% END # / IF validuser %]
439
                        [% END # / IF validuser %]
438
                    [% END # / UNLESS ( hide_main %]
440
                    [% END # / UNLESS ( hide_main %]
439
                    [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
441
                    [% IF ( SCOMainUserBlock ) %]
442
                        <div id="scomainuserblock">
443
                            [% PROCESS koha_news_block news => SCOMainUserBlock %]
444
                        </div>
445
                    [% END %]
440
                </div> <!-- / .span12 -->
446
                </div> <!-- / .span12 -->
441
            </div> <!-- / .row -->
447
            </div> <!-- / .row -->
442
        </div> <!-- / .container-fluid -->
448
        </div> <!-- / .container-fluid -->
443
- 

Return to bug 35048