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 (+37 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
            $dbh->do(
19
                "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'SelfCheckInMainUserBlock', 'SelfCheckInMainUserBlock', NULL, CAST(NOW() AS date) )"
20
            );
21
22
            my ($insert_id) = $dbh->selectrow_array(
23
                "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'SelfCheckInMainUserBlock' AND location = 'SelfCheckInMainUserBlock' LIMIT 1",
24
                {}
25
            );
26
27
            $dbh->do(
28
                "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'SelfCheckInMainUserBlock default', ?, 'default' )",
29
                undef, $insert_id, $scimainuserblock
30
            );
31
32
            # Remove old system preference
33
            $dbh->do("DELETE FROM systempreferences WHERE variable='SelfCheckInMainUserBlock'");
34
            say $out "Bug 35063 update done";
35
        }
36
    }
37
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 665-671 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
665
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
665
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
666
('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'),
666
('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'),
667
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
667
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
668
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
669
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
668
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
670
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
669
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
671
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
670
('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 1113-1124 Circulation: Link Here
1113
              type: textarea
1113
              type: textarea
1114
              class: code
1114
              class: code
1115
    Self check-in module:
1115
    Self check-in module:
1116
        -
1117
            - "Include the following HTML on the self check-in screen:"
1118
            - pref: SelfCheckInMainUserBlock
1119
              type: textarea
1120
              syntax: text/html
1121
              class: code
1122
        -
1116
        -
1123
            - pref: SelfCheckInModule
1117
            - pref: SelfCheckInModule
1124
              choices:
1118
              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