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 651-657 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
651
('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'),
651
('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'),
652
('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'),
652
('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'),
653
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
653
('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
654
('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'),
655
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
654
('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'),
656
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
655
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'),
657
('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'),
656
('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 19-36 Serials: Link Here
19
          choices:
19
          choices:
20
              1: Use
20
              1: Use
21
              0: "Don't use"
21
              0: "Don't use"
22
        - the routing list feature in the serials module.
22
        - 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.
23
    -
23
    -
24
        - pref: RoutingListAddReserves
24
        - pref: RoutingListAddReserves
25
          choices:
25
          choices:
26
              1: Place
26
              1: Place
27
              0: "Don't place"
27
              0: "Don't place"
28
        - received serials on hold if they are on a routing list.
28
        - received serials on hold if they are on a routing list.
29
    -
30
        - "Include the following note on all routing lists:"
31
        - pref: RoutingListNote
32
          type: textarea
33
          class: code
34
    -
29
    -
35
        - Show the
30
        - Show the
36
        - pref: StaffSerialIssueDisplayCount
31
        - 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 32-38 Link Here
32
</table>
33
</table>
33
34
34
<div id="routingnotes">
35
<div id="routingnotes">
35
    <p id="generalroutingnote">[% Koha.Preference('RoutingListNote') | $raw %]</p>
36
    [%- SET RoutingListNote = AdditionalContents.get( location => "RoutingListNote", lang => lang, library => logged_in_user.branchcode ) -%]
37
38
    [% IF ( RoutingListNote.content && RoutingListNote.content.count > 0 ) %]
39
        <div id="[% RoutingListNote.location | html %]">
40
            [% FOREACH n IN RoutingListNote.content %]
41
                <div class="[% n.lang | html %]_item">
42
                    <div class="[% n.lang | html %]_body">[% n.content | $raw %]</div>
43
                </div>
44
            [% END %]
45
        </div>
46
    [% END %]
47
36
    <p id="routingnote">[% routingnotes | html %]</p>
48
    <p id="routingnote">[% routingnotes | html %]</p>
37
</div>
49
</div>
38
50
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-2 / +1 lines)
Lines 534-540 Link Here
534
                [% END %]
534
                [% END %]
535
            [% END %]
535
            [% END %]
536
        </optgroup>
536
        </optgroup>
537
        [% SET staff_available_options = [ 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
537
        [% SET staff_available_options = [ 'RoutingListNote', 'StaffAcquisitionsHome', 'StaffAuthoritiesHome', 'StaffCataloguingHome', 'StaffListsHome', 'StaffPatronsHome', 'StaffPOSHome', 'StaffSerialsHome' ] %]
538
        <optgroup label="Staff">
538
        <optgroup label="Staff">
539
            [% FOREACH l IN staff_available_options.sort %]
539
            [% FOREACH l IN staff_available_options.sort %]
540
                [% IF l == location %]
540
                [% IF l == location %]
541
- 

Return to bug 35152