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

(-)a/installer/data/mysql/atomicupdate/bug-35063-move-SelfCheckInMainUserBlock-to-additional-contents.pl (+32 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35063",
5
    description => "Move SelfCheckInMainUserBlock 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 SelfCheckInMainUserBlock system preference
11
        my ($scimainuserblock) = $dbh->selectrow_array(
12
            q|
13
            SELECT value FROM systempreferences WHERE variable='SelfCheckInMainUserBlock';
14
        |
15
        );
16
        if ($scimainuserblock) {
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', 'SelfCheckInMainUserBlock', 'SelfCheckInMainUserBlock', NULL, ?, ?, ?, CAST(NOW() AS date) )",
22
                    undef,             "SelfCheckInMainUserBlock $lang",
23
                    $scimainuserblock, $lang
24
                );
25
            }
26
27
            # Remove old system preference
28
            $dbh->do("DELETE FROM systempreferences WHERE variable='SelfCheckInMainUserBlock'");
29
            say $out "Bug 35063 update done";
30
        }
31
    }
32
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 657-663 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
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'),
659
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
660
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
661
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
660
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
662
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
661
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
663
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
662
('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 1091-1102 Circulation: Link Here
1091
              type: textarea
1091
              type: textarea
1092
              class: code
1092
              class: code
1093
    Self check-in module:
1093
    Self check-in module:
1094
        -
1095
            - "Include the following HTML on the self check-in screen:"
1096
            - pref: SelfCheckInMainUserBlock
1097
              type: textarea
1098
              syntax: text/html
1099
              class: code
1100
        -
1094
        -
1101
            - pref: SelfCheckInModule
1095
            - pref: SelfCheckInModule
1102
              choices:
1096
              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', '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', '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/sci/sci-main.tt (-4 / +7 lines)
Lines 22-27 Link Here
22
[% END %]
22
[% END %]
23
[% PROCESS 'html_helpers.inc' %]
23
[% PROCESS 'html_helpers.inc' %]
24
[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
24
[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
25
[% SET SelfCheckInMainUserBlock = AdditionalContents.get( location => "SelfCheckInMainUserBlock", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
25
[% INCLUDE 'doc-head-open.inc' %]
26
[% INCLUDE 'doc-head-open.inc' %]
26
[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
27
[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
27
<title>Self check-in &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
28
<title>Self check-in &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]</title>
Lines 163-175 Link Here
163
                            </form> <!-- /#scan_form -->
164
                            </form> <!-- /#scan_form -->
164
                        </div> <!-- / #new_checkins -->
165
                        </div> <!-- / #new_checkins -->
165
                    [% END # /IF ( nopermission ) %]
166
                    [% END # /IF ( nopermission ) %]
167
168
                    [% IF ( SelfCheckInMainUserBlock ) %]
169
                        <div id="scimainuserblock">
170
                            [% PROCESS koha_news_block news => SelfCheckInMainUserBlock %]
171
                        </div>
172
                    [% END %]
166
                </div> <!-- / #masthead -->
173
                </div> <!-- / #masthead -->
167
            </div> <!-- / .row -->
174
            </div> <!-- / .row -->
168
        </div> <!-- / .container-fluid -->
175
        </div> <!-- / .container-fluid -->
169
176
170
    [% IF ( Koha.Preference('SelfCheckInMainUserBlock') ) %]
171
        <div id="SelfCheckInMainUserBlock">[% Koha.Preference('SelfCheckInMainUserBlock' ) | $raw %]</div>
172
    [% END %]
173
</div> <!-- / .main -->
177
</div> <!-- / .main -->
174
178
175
[% # Help modal %]
179
[% # Help modal %]
176
- 

Return to bug 35063