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 658-664 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
658
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
658
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
659
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
659
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
660
('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'),
660
('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'),
661
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
662
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
661
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
663
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
662
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
664
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
663
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-6 lines)
Lines 1156-1167 Circulation: Link Here
1156
                  1: Allow
1156
                  1: Allow
1157
                  0: "Don't allow"
1157
                  0: "Don't allow"
1158
            - patrons to return items through web-based self checkout system. 
1158
            - patrons to return items through web-based self checkout system. 
1159
        -
1160
            - "Include the following HTML in the Help page of the web-based self checkout system:"
1161
            - pref: SelfCheckHelpMessage
1162
              type: textarea
1163
              syntax: text/html
1164
              class: code
1165
        -
1159
        -
1166
            - pref: AutoSelfCheckAllowed
1160
            - pref: AutoSelfCheckAllowed
1167
              choices:
1161
              choices:
(-)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 opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'SCOMainUserBlock' ] %]
526
        [% SET opac_available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'SCOMainUserBlock', 'SelfCheckHelpMessage' ] %]
527
        <optgroup label="OPAC">
527
        <optgroup label="OPAC">
528
            [% FOREACH l IN opac_available_options.sort %]
528
            [% FOREACH l IN opac_available_options.sort %]
529
                [% IF l == location %]
529
                [% 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