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

(-)a/installer/data/mysql/atomicupdate/bug-35065-move-SelfCheckHelpMessage-to-additional-contents.pl (+32 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35065",
5
    description => "Move SelfCheckHelpMessage 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 SelfCheckHelpMessage system preference
11
        my ($selfcheckhelpmessage) = $dbh->selectrow_array(
12
            q|
13
            SELECT value FROM systempreferences WHERE variable='SelfCheckHelpMessage';
14
        |
15
        );
16
        if ($selfcheckhelpmessage) {
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', 'SelfCheckHelpMessage', 'SelfCheckHelpMessage', NULL, ?, ?, ?, CAST(NOW() AS date) )",
22
                    undef,                 "SelfCheckHelpMessage $lang",
23
                    $selfcheckhelpmessage, $lang
24
                );
25
            }
26
27
            # Remove old system preference
28
            $dbh->do("DELETE FROM systempreferences WHERE variable='SelfCheckHelpMessage'");
29
            say $out "Bug 35065 update done";
30
        }
31
    }
32
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 656-662 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
656
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
656
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
657
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
657
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
658
('SelfCheckAllowByIPRanges','',NULL,'(Leave blank if not used. Use ranges or simple ip addresses separated by spaces, like <code>192.168.1.1 192.168.0.0/24</code>.)','Short'),
658
('SelfCheckAllowByIPRanges','',NULL,'(Leave blank if not used. Use ranges or simple ip addresses separated by spaces, like <code>192.168.1.1 192.168.0.0/24</code>.)','Short'),
659
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
660
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
659
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
661
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
660
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
662
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
661
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1157-1168 Circulation: Link Here
1157
                  1: Allow
1157
                  1: Allow
1158
                  0: "Don't allow"
1158
                  0: "Don't allow"
1159
            - patrons to return items through web-based self checkout system. 
1159
            - patrons to return items through web-based self checkout system. 
1160
        -
1161
            - "Include the following HTML in the Help page of the web-based self checkout system:"
1162
            - pref: SelfCheckHelpMessage
1163
              type: textarea
1164
              syntax: text/html
1165
              class: code
1166
        -
1160
        -
1167
            - pref: AutoSelfCheckAllowed
1161
            - pref: AutoSelfCheckAllowed
1168
              choices:
1162
              choices:
(-)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', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock', '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', 'SelfCheckInMainUserBlock', 'SelfCheckHelpMessage', '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/en/modules/sco/help.tt (-2 / +3 lines)
Lines 2-9 Link Here
2
[% USE Koha %]
2
[% USE Koha %]
3
[% USE Asset %]
3
[% USE Asset %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE AdditionalContents %]
5
[% PROCESS 'i18n.inc' %]
6
[% PROCESS 'i18n.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
[% SET SelfCheckHelpMessage = AdditionalContents.get( location => "SelfCheckHelpMessage", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7
<title>Self checkout help &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
9
<title>Self checkout help &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
<meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
11
<meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
Lines 40-46 Link Here
40
42
41
                    [% IF ( SelfCheckHelpMessage ) %]
43
                    [% IF ( SelfCheckHelpMessage ) %]
42
                        <div id="selfcheckhelpmessage">
44
                        <div id="selfcheckhelpmessage">
43
                            [% SelfCheckHelpMessage | $raw %]
45
                            [% PROCESS koha_news_block news => SelfCheckHelpMessage %]
44
                        </div>
46
                        </div>
45
                    [% END %]
47
                    [% END %]
46
48
47
- 

Return to bug 35065