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

(-)a/Koha/Illrequest.pm (-1 / +1 lines)
Lines 1312-1318 EOF Link Here
1312
        my @address = map { $library->$_ }
1312
        my @address = map { $library->$_ }
1313
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1313
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1314
                branchzip branchcity branchstate branchcountry branchphone
1314
                branchzip branchcity branchstate branchcountry branchphone
1315
                branchemail /;
1315
                branchillemail branchemail /;
1316
        my $address = "";
1316
        my $address = "";
1317
        foreach my $line ( @address ) {
1317
        foreach my $line ( @address ) {
1318
            $address .= $line . "\n" if $line;
1318
            $address .= $line . "\n" if $line;
(-)a/Koha/Library.pm (+1 lines)
Lines 179-184 sub to_api_mapping { Link Here
179
        branchphone      => 'phone',
179
        branchphone      => 'phone',
180
        branchfax        => 'fax',
180
        branchfax        => 'fax',
181
        branchemail      => 'email',
181
        branchemail      => 'email',
182
        branchillemail   => 'illemail',
182
        branchreplyto    => 'reply_to_email',
183
        branchreplyto    => 'reply_to_email',
183
        branchreturnpath => 'return_path_email',
184
        branchreturnpath => 'return_path_email',
184
        branchurl        => 'url',
185
        branchurl        => 'url',
(-)a/admin/branches.pl (+1 lines)
Lines 75-80 if ( $op eq 'add_form' ) { Link Here
75
      branchphone
75
      branchphone
76
      branchfax
76
      branchfax
77
      branchemail
77
      branchemail
78
      branchillemail
78
      branchreplyto
79
      branchreplyto
79
      branchreturnpath
80
      branchreturnpath
80
      branchurl
81
      branchurl
(-)a/installer/data/mysql/atomicupdate/bug_22818_add_ill_notices.perl (+38 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'branches', 'branchillemail' ) ) {
4
        $dbh->do( q| ALTER TABLE branches ADD branchillemail LONGTEXT AFTER branchemail | );
5
    }
6
    # Add new sysprefs
7
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLDefaultStaffEmail', '', 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', NULL, 'Free'); | );
8
    $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ILLSendStaffNotices', NULL, 'Send these ILL notices to staff', NULL, 'multiple'); | );
9
    # Add new notices
10
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for:\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis ready for pick up from <<branches.branchname>>.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
11
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
12
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has requested cancellation of this ILL request:\n\n<<ill_full_metadata>>", 'email', 'default'); | );
13
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has modified this ILL request:\n\n<<ill_full_metadata>>", 'email', 'default'); | );
14
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<<ill_full_metadata>>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'email', 'default'); | );
15
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PICKUP_READY', '', 'ILL request ready for pickup', 0, "Interlibrary loan request ready for pickup", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for:\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis ready for pick up from <<branches.branchname>>.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
16
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UNAVAIL', '', 'ILL request unavailable', 0, "Interlibrary loan request unavailable", "Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nThe Interlibrary loans request number <<illrequests.illrequest_id>> you placed for\n\n- <<ill_bib_title>> - <<ill_bib_author>>\n\nis unfortunately unavailable.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
17
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has requested cancellation of this ILL request:\n\n<<ill_full_metadata>>", 'sms', 'default'); | );
18
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request <<illrequests.illrequest_id>>, with the following details, has modified this ILL request:\n\n<<ill_full_metadata>>", 'sms', 'default'); | );
19
    $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n<<ill_full_metadata>>\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n<<branches.branchaddress3>>\n<<branches.branchcity>>\n<<branches.branchstate>>\n<<branches.branchzip>>\n<<branches.branchphone>>\n<<branches.branchillemail>>\n<<branches.branchemail>>", 'sms', 'default'); | );
20
    # Add patron messaging preferences
21
    $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_ready', 0); | );
22
    my $ready_id = $dbh->{mysql_insertid};
23
    if (defined $ready_id) {
24
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_PICKUP_READY');) );
25
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_PICKUP_READY');) );
26
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_PICKUP_READY');) );
27
    }
28
    $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_unavailable', 0); | );
29
    my $unavail_id = $dbh->{mysql_insertid};
30
    if (defined $unavail_id) {
31
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'email', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
32
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'sms', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
33
        $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'phone', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) );
34
    }
35
36
    SetVersion( $DBversion );
37
    print "Upgrade to $DBversion done (Bug 22818 - Add ILL notices)\n";
38
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 265-270 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
265
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
265
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
266
  `branchfax` LONGTEXT, -- the fax number for your library or branch
266
  `branchfax` LONGTEXT, -- the fax number for your library or branch
267
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
267
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
268
  `branchillemail` LONGTEXT, -- the ILL staff email address for your library or branch
268
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
269
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
269
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
270
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
270
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
271
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+2 lines)
Lines 239-250 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
239
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
239
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
240
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
240
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
241
('IllCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
241
('IllCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
242
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
242
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
243
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
243
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
244
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
244
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
245
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
245
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
246
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
246
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
247
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
247
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
248
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
249
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
248
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
250
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
249
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
251
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
250
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
252
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (+2 lines)
Lines 25-30 Link Here
25
            [% ELSE %]
25
            [% ELSE %]
26
                Item checkout
26
                Item checkout
27
            [% END %]
27
            [% END %]
28
          [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
29
          [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
28
          [% ELSE %]Unknown [% END %]</td>
30
          [% ELSE %]Unknown [% END %]</td>
29
      [% IF ( messaging_preference.takes_days ) %]
31
      [% IF ( messaging_preference.takes_days ) %]
30
      <td>
32
      <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (+4 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% USE raw %]
2
[% USE raw %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
Lines 139-144 Link Here
139
                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
140
                <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
140
                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
141
                <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
141
                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail | html %]" /></li>
142
                <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% library.branchemail | html %]" /></li>
143
                [% IF (Koha.Preference('ILLModule')) %]
144
                <li><label for="branchillemail">ILL staff email: </label><input type="text" name="branchillemail" id="branchillemail" class="email"  size="80" value="[% library.branchillemail | html %]" /></li>
145
                [% END %]
142
                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto | html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
146
                <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% library.branchreplyto | html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
143
                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath | html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
147
                <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% library.branchreturnpath | html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
144
                <li><label for="smtp_server">SMTP server: </label>
148
                <li><label for="smtp_server">SMTP server: </label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+2 lines)
Lines 536-541 Link Here
536
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
536
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
537
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
537
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
538
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
538
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
539
                                                [% ELSIF ( prefs.Ill_ready ) %]Interlibrary loan ready
540
                                                [% ELSIF ( prefs.Ill_unavailable ) %]Interlibrary loan unavailable
539
                                                [% ELSE %]Unknown
541
                                                [% ELSE %]Unknown
540
                                                [% END %]:
542
                                                [% END %]:
541
                                                <strong>[% transport.transport | html %]</strong><br />
543
                                                <strong>[% transport.transport | html %]</strong><br />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 924-929 Circulation: Link Here
924
            - pref: ILLHiddenRequestStatuses
924
            - pref: ILLHiddenRequestStatuses
925
              class: multi
925
              class: multi
926
            - (separated with |). If left empty, all ILL requests will be displayed.
926
            - (separated with |). If left empty, all ILL requests will be displayed.
927
        -
928
            - "Send these ILL notices to staff when appropriate"
929
            - pref: ILLSendStaffNotices
930
              class: multi
931
            - (separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent
932
        -
933
            - Fallback email address for staff ILL notices to be sent to in the absence of a branch address
934
            - pref: ILLDefaultStaffEmail
927
    Fines Policy:
935
    Fines Policy:
928
        -
936
        -
929
            - pref: finesCalendar
937
            - pref: finesCalendar
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +2 lines)
Lines 67-72 Link Here
67
                                                    [% ELSE %]
67
                                                    [% ELSE %]
68
                                                        Item checkout
68
                                                        Item checkout
69
                                                    [% END %]
69
                                                    [% END %]
70
                                                [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
71
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
70
                                                [% ELSE %]Unknown [% END %]</td>
72
                                                [% ELSE %]Unknown [% END %]</td>
71
                                            [% IF ( messaging_preference.takes_days ) %]
73
                                            [% IF ( messaging_preference.takes_days ) %]
72
                                                <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
74
                                                <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
73
- 

Return to bug 22818