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

(-)a/installer/data/mysql/atomicupdate/bug-35152-move-RoutingListNote-to-additional-contents.pl (+41 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35152",
5
    description => "Move RoutingListNote 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 RoutingListNote system preference
11
        my ($routinglistnote) = $dbh->selectrow_array(
12
            q|
13
            SELECT value FROM systempreferences WHERE variable='RoutingListNote';
14
        |
15
        );
16
        if ($routinglistnote) {
17
18
            # Insert any values found from system preference into additional_contents
19
            $dbh->do(
20
                "INSERT INTO additional_contents ( category, code, location, branchcode, published_on ) VALUES ('html_customizations', 'RoutingListNote', 'RoutingListNote', NULL, CAST(NOW() AS date) )"
21
            );
22
23
            my ($insert_id) = $dbh->selectrow_array(
24
                "SELECT id FROM additional_contents WHERE category = 'html_customizations' AND code = 'RoutingListNote' AND location = 'RoutingListNote' LIMIT 1",
25
                {}
26
            );
27
28
            $dbh->do(
29
                "INSERT INTO additional_contents_localizations ( additional_content_id, title, content, lang ) VALUES ( ?, 'RoutingListNote default', ?, 'default' )",
30
                undef, $insert_id, $routinglistnote
31
            );
32
33
            say $out "Added 'RoutingListNote' additional content";
34
        }
35
36
        # Remove old system preference
37
        $dbh->do("DELETE FROM systempreferences WHERE variable='RoutingListNote'");
38
        say $out "Removed system preference 'RoutingListNote'";
39
40
    },
41
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 677-683 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
677
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
677
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
678
('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll    ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'),
678
('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll    ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'),
679
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
679
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
680
('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'),
681
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
680
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
682
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
681
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
683
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
682
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html-customization-help.inc (+4 lines)
Lines 86-91 Link Here
86
    Show the following content on the patron self-registration confirmation page.
86
    Show the following content on the patron self-registration confirmation page.
87
</div>
87
</div>
88
88
89
<div id="RoutingListNote" class="hint customization_note">
90
    Include the following note on all routing list slips.
91
</div>
92
89
<div id="SCOMainUserBlock_notes" class="hint customization_note">
93
<div id="SCOMainUserBlock_notes" class="hint customization_note">
90
     Show this content on the web-based self checkout screen.
94
     Show this content on the web-based self checkout screen.
91
</div>
95
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (-6 / +1 lines)
Lines 20-37 Serials: Link Here
20
          choices:
20
          choices:
21
              1: Use
21
              1: Use
22
              0: "Don't use"
22
              0: "Don't use"
23
        - the routing list feature in the serials module.
23
        - the routing list feature in the serials module. A custom message can be shown on routing slips by creating an <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customization</a> in the RoutingListNote region.
24
    -
24
    -
25
        - pref: RoutingListAddReserves
25
        - pref: RoutingListAddReserves
26
          choices:
26
          choices:
27
              1: Place
27
              1: Place
28
              0: "Don't place"
28
              0: "Don't place"
29
        - received serials on hold if they are on a routing list.
29
        - received serials on hold if they are on a routing list.
30
    -
31
        - "Include the following note on all routing lists:"
32
        - pref: RoutingListNote
33
          type: textarea
34
          class: code
35
    -
30
    -
36
        - Show the
31
        - Show the
37
        - pref: StaffSerialIssueDisplayCount
32
        - pref: StaffSerialIssueDisplayCount
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt (-1 / +13 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE raw %]
2
[% USE raw %]
3
[% USE AdditionalContents %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Routing slip preview &rsaquo; Serials &rsaquo; Koha</title>
6
<title>Routing slip preview &rsaquo; Serials &rsaquo; Koha</title>
Lines 33-39 Link Here
33
        </div> <!-- /.page-section -->
34
        </div> <!-- /.page-section -->
34
35
35
<div id="routingnotes">
36
<div id="routingnotes">
36
    <p id="generalroutingnote">[% Koha.Preference('RoutingListNote') | $raw %]</p>
37
    [%- SET RoutingListNote = AdditionalContents.get( location => "RoutingListNote", lang => lang, library => logged_in_user.branchcode ) -%]
38
39
    [% IF ( RoutingListNote.content && RoutingListNote.content.count > 0 ) %]
40
        <div id="[% RoutingListNote.location | html %]">
41
            [% FOREACH n IN RoutingListNote.content %]
42
                <div class="[% n.lang | html %]_item">
43
                    <div class="[% n.lang | html %]_body">[% n.content | $raw %]</div>
44
                </div>
45
            [% END %]
46
        </div>
47
    [% END %]
48
37
    <p id="routingnote">[% routingnotes | html %]</p>
49
    <p id="routingnote">[% routingnotes | html %]</p>
38
</div>
50
</div>
39
51
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-2 / +1 lines)
Lines 536-542 Link Here
536
                [% END %]
536
                [% END %]
537
            [% END %]
537
            [% END %]
538
        </optgroup>
538
        </optgroup>
539
        [% SET staff_available_options = [ 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
539
        [% SET staff_available_options = [ 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
540
        <optgroup label="Staff">
540
        <optgroup label="Staff">
541
            [% FOREACH l IN staff_available_options.sort %]
541
            [% FOREACH l IN staff_available_options.sort %]
542
                [% IF l == location %]
542
                [% IF l == location %]
543
- 

Return to bug 35152