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 (+38 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
            $dbh->do(
20
                "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'SCOMainUserBlock', 'SCOMainUserBlock', NULL, CAST(NOW() AS date) )"
21
            );
22
23
            my ($insert_id) = $dbh->selectrow_array(
24
                "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'SCOMainUserBlock' AND location = 'SCOMainUserBlock' LIMIT 1",
25
                {}
26
            );
27
28
            $dbh->do(
29
                "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'SCOMainUserBlock default', ?, 'default' )",
30
                undef, $insert_id, $scomainuserblock
31
            );
32
33
            # Remove old system preference
34
            $dbh->do("DELETE FROM systempreferences WHERE variable='SCOMainUserBlock'");
35
            say $out "Bug 35048 update done";
36
        }
37
    }
38
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 649-655 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
649
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
649
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
650
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
650
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
651
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
651
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
652
('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'),
653
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
652
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
654
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
653
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
655
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
654
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1127-1138 Circulation: Link Here
1127
              type: textarea
1127
              type: textarea
1128
              syntax: javascript
1128
              syntax: javascript
1129
              class: code
1129
              class: code
1130
        -
1131
            - "Include the following HTML on the the web-based self checkout screen:"
1132
            - pref: SCOMainUserBlock
1133
              type: textarea
1134
              syntax: text/html
1135
              class: code
1136
        -
1130
        -
1137
            - "Include the following CSS on all pages in the web-based self checkout:"
1131
            - "Include the following CSS on all pages in the web-based self checkout:"
1138
            - pref: SCOUserCSS
1132
            - pref: SCOUserCSS
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 524-530 Link Here
524
            [% END %]
524
            [% END %]
525
        [% END %]
525
        [% END %]
526
    [% ELSE %]
526
    [% ELSE %]
527
        [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions' ] %]
527
        [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'OpacMaintenanceNotice', 'OPACResultsSidebar', 'OpacSuppressionMessage', 'SCOMainUserBlock', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'PatronSelfRegistrationAdditionalInstructions' ] %]
528
        <optgroup label="OPAC">
528
        <optgroup label="OPAC">
529
            [% FOREACH l IN opac_available_options.sort %]
529
            [% FOREACH l IN opac_available_options.sort %]
530
                [% IF l == location %]
530
                [% IF l == location %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss (+10 lines)
Lines 848-853 button { Link Here
848
    }
848
    }
849
}
849
}
850
850
851
#backtotop {
852
    bottom: 40px;
853
    display: inline-block;
854
    font-size: 120%;
855
    position: fixed;
856
    right: 40px;
857
    text-align: center;
858
    z-index: 1000;
859
}
860
851
#logo {
861
#logo {
852
    background: transparent url( "../images/koha-green-logo.svg" ) no-repeat scroll 0%;
862
    background: transparent url( "../images/koha-green-logo.svg" ) no-repeat scroll 0%;
853
    border: 0;
863
    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 449-455 Link Here
449
                            </div> <!-- / .sco_entry -->
451
                            </div> <!-- / .sco_entry -->
450
                        [% END # / IF validuser %]
452
                        [% END # / IF validuser %]
451
                    [% END # / UNLESS ( hide_main %]
453
                    [% END # / UNLESS ( hide_main %]
452
                    [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
454
                    [% IF ( SCOMainUserBlock ) %]
455
                        <div id="scomainuserblock">
456
                            [% PROCESS koha_news_block news => SCOMainUserBlock %]
457
                        </div>
458
                    [% END %]
453
                </div> <!-- / .span12 -->
459
                </div> <!-- / .span12 -->
454
            </div> <!-- / .row -->
460
            </div> <!-- / .row -->
455
        </div> <!-- / .container-fluid -->
461
        </div> <!-- / .container-fluid -->
456
- 

Return to bug 35048