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 655-661 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
655
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
655
('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'),
656
('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'),
656
('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'),
657
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
657
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
658
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
659
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
658
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
660
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
659
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
661
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
660
('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 1084-1095 Circulation: Link Here
1084
              type: textarea
1084
              type: textarea
1085
              class: code
1085
              class: code
1086
    Self check-in module:
1086
    Self check-in module:
1087
        -
1088
            - "Include the following HTML on the self check-in screen:"
1089
            - pref: SelfCheckInMainUserBlock
1090
              type: textarea
1091
              syntax: text/html
1092
              class: code
1093
        -
1087
        -
1094
            - pref: SelfCheckInModule
1088
            - pref: SelfCheckInModule
1095
              choices:
1089
              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 available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'SCOMainUserBlock' ] %]
526
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate', 'CookieConsentBar', 'CookieConsentPopup', 'SCOMainUserBlock', 'SelfCheckInMainUserBlock' ] %]
527
        [% FOREACH l IN available_options.sort %]
527
        [% FOREACH l IN available_options.sort %]
528
            [% IF l == location %]
528
            [% IF l == location %]
529
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
529
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
(-)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 158-170 Link Here
158
                            </form> <!-- /#scan_form -->
159
                            </form> <!-- /#scan_form -->
159
                        </div> <!-- / #new_checkins -->
160
                        </div> <!-- / #new_checkins -->
160
                    [% END # /IF ( nopermission ) %]
161
                    [% END # /IF ( nopermission ) %]
162
163
                    [% IF ( SelfCheckInMainUserBlock ) %]
164
                        <div id="scimainuserblock">
165
                            [% PROCESS koha_news_block news => SelfCheckInMainUserBlock %]
166
                        </div>
167
                    [% END %]
161
                </div> <!-- / #masthead -->
168
                </div> <!-- / #masthead -->
162
            </div> <!-- / .row -->
169
            </div> <!-- / .row -->
163
        </div> <!-- / .container-fluid -->
170
        </div> <!-- / .container-fluid -->
164
171
165
    [% IF ( Koha.Preference('SelfCheckInMainUserBlock') ) %]
166
        <div id="SelfCheckInMainUserBlock">[% Koha.Preference('SelfCheckInMainUserBlock' ) | $raw %]</div>
167
    [% END %]
168
</div> <!-- / .main -->
172
</div> <!-- / .main -->
169
173
170
[% # Help modal %]
174
[% # Help modal %]
171
- 

Return to bug 35063