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 656-662 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
656
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
656
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
657
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
657
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
658
('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'),
658
('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'),
659
('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'),
660
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
659
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
661
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
660
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
662
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
661
('SearchEngine','Zebra','Elasticsearch|Zebra','Search Engine','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1149-1160 Circulation: Link Here
1149
              type: textarea
1149
              type: textarea
1150
              syntax: javascript
1150
              syntax: javascript
1151
              class: code
1151
              class: code
1152
        -
1153
            - "Include the following HTML on the the web-based self checkout screen:"
1154
            - pref: SCOMainUserBlock
1155
              type: textarea
1156
              syntax: text/html
1157
              class: code
1158
        -
1152
        -
1159
            - "Include the following CSS on all pages in the web-based self checkout:"
1153
            - "Include the following CSS on all pages in the web-based self checkout:"
1160
            - pref: SCOUserCSS
1154
            - 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 476-482 Link Here
476
                            </div> <!-- / .sco_entry -->
478
                            </div> <!-- / .sco_entry -->
477
                        [% END # / IF validuser %]
479
                        [% END # / IF validuser %]
478
                    [% END # / UNLESS ( hide_main %]
480
                    [% END # / UNLESS ( hide_main %]
479
                    [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
481
                    [% IF ( SCOMainUserBlock ) %]
482
                        <div id="scomainuserblock">
483
                            [% PROCESS koha_news_block news => SCOMainUserBlock %]
484
                        </div>
485
                    [% END %]
480
                </div> <!-- / .span12 -->
486
                </div> <!-- / .span12 -->
481
            </div> <!-- / .row -->
487
            </div> <!-- / .row -->
482
        </div> <!-- / .container-fluid -->
488
        </div> <!-- / .container-fluid -->
483
- 

Return to bug 35048