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 { $branch->$_ }
1312
        my @address = map { $branch->$_ }
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 129-134 sub to_api_mapping { Link Here
129
        branchphone      => 'phone',
129
        branchphone      => 'phone',
130
        branchfax        => 'fax',
130
        branchfax        => 'fax',
131
        branchemail      => 'email',
131
        branchemail      => 'email',
132
        branchillemail   => 'illemail',
132
        branchreplyto    => 'reply_to_email',
133
        branchreplyto    => 'reply_to_email',
133
        branchreturnpath => 'return_path_email',
134
        branchreturnpath => 'return_path_email',
134
        branchurl        => 'url',
135
        branchurl        => 'url',
(-)a/admin/branches.pl (+1 lines)
Lines 65-70 if ( $op eq 'add_form' ) { Link Here
65
      branchphone
65
      branchphone
66
      branchfax
66
      branchfax
67
      branchemail
67
      branchemail
68
      branchillemail
68
      branchreplyto
69
      branchreplyto
69
      branchreturnpath
70
      branchreturnpath
70
      branchurl
71
      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/sysprefs.sql (+2 lines)
Lines 238-249 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
238
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
238
('HTML5MediaYouTube',0,'Embed|Don\'t embed','YouTube links as videos','YesNo'),
239
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
239
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
240
('IllCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
240
('IllCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
241
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
241
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
242
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
242
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
243
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
243
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
244
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
244
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
245
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
245
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
246
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
246
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
247
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
248
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
247
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
249
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
248
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
250
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
249
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
251
('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 20-25 Link Here
20
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
20
          [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
21
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
21
          [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
22
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
22
          [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
23
          [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
24
          [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
23
          [% ELSE %]Unknown [% END %]</td>
25
          [% ELSE %]Unknown [% END %]</td>
24
      [% IF ( messaging_preference.takes_days ) %]
26
      [% IF ( messaging_preference.takes_days ) %]
25
      <td>
27
      <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="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl | html %]" class="url" /></li>
148
                <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% library.branchurl | html %]" class="url" /></li>
(-)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 906-911 Circulation: Link Here
906
            - pref: ILLHiddenRequestStatuses
906
            - pref: ILLHiddenRequestStatuses
907
              class: multi
907
              class: multi
908
            - (separated with |). If left empty, all ILL requests will be displayed.
908
            - (separated with |). If left empty, all ILL requests will be displayed.
909
        -
910
            - "Send these ILL notices to staff when appropriate"
911
            - pref: ILLSendStaffNotices
912
              class: multi
913
            - (separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent
914
        -
915
            - Fallback email address for staff ILL notices to be sent to in the absence of a branch address
916
            - pref: ILLDefaultStaffEmail
909
    Fines Policy:
917
    Fines Policy:
910
        -
918
        -
911
            - pref: finesCalendar
919
            - pref: finesCalendar
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +2 lines)
Lines 61-66 Link Here
61
                                                [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
61
                                                [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
62
                                                [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
62
                                                [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
63
                                                [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
63
                                                [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
64
                                                [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
65
                                                [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
64
                                                [% ELSE %]Unknown [% END %]</td>
66
                                                [% ELSE %]Unknown [% END %]</td>
65
                                            [% IF ( messaging_preference.takes_days ) %]
67
                                            [% IF ( messaging_preference.takes_days ) %]
66
                                                <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
68
                                                <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
67
- 

Return to bug 22818