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 646-652 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
646
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
646
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
647
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
647
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
648
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
648
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
649
('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'),
650
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
649
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
651
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
650
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
652
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
651
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1120-1131 Circulation: Link Here
1120
              type: textarea
1120
              type: textarea
1121
              syntax: javascript
1121
              syntax: javascript
1122
              class: code
1122
              class: code
1123
        -
1124
            - "Include the following HTML on the the web-based self checkout screen:"
1125
            - pref: SCOMainUserBlock
1126
              type: textarea
1127
              syntax: text/html
1128
              class: code
1129
        -
1123
        -
1130
            - "Include the following CSS on all pages in the web-based self checkout:"
1124
            - "Include the following CSS on all pages in the web-based self checkout:"
1131
            - pref: SCOUserCSS
1125
            - pref: SCOUserCSS
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 523-529 Link Here
523
            [% END %]
523
            [% END %]
524
        [% END %]
524
        [% END %]
525
    [% ELSE %]
525
    [% ELSE %]
526
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup' ] %]
526
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'SCOMainUserBlock' ] %]
527
        [% FOREACH l IN available_options.sort %]
527
        [% FOREACH l IN available_options.sort %]
528
            [% IF l == location %]
528
            [% IF l == location %]
529
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
529
                <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 438-444 Link Here
438
                            </div> <!-- / .sco_entry -->
440
                            </div> <!-- / .sco_entry -->
439
                        [% END # / IF validuser %]
441
                        [% END # / IF validuser %]
440
                    [% END # / UNLESS ( hide_main %]
442
                    [% END # / UNLESS ( hide_main %]
441
                    [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
443
                    [% IF ( SCOMainUserBlock ) %]
444
                        <div id="scomainuserblock">
445
                            [% PROCESS koha_news_block news => SCOMainUserBlock %]
446
                        </div>
447
                    [% END %]
442
                </div> <!-- / .span12 -->
448
                </div> <!-- / .span12 -->
443
            </div> <!-- / .row -->
449
            </div> <!-- / .row -->
444
        </div> <!-- / .container-fluid -->
450
        </div> <!-- / .container-fluid -->
445
- 

Return to bug 35048