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

(-)a/Koha/Illrequest.pm (-1 / +1 lines)
Lines 1063-1069 EOF Link Here
1063
        my @address = map { $branch->$_ }
1063
        my @address = map { $branch->$_ }
1064
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1064
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1065
                branchzip branchcity branchstate branchcountry branchphone
1065
                branchzip branchcity branchstate branchcountry branchphone
1066
                branchemail /;
1066
                branchillemail branchemail /;
1067
        my $address = "";
1067
        my $address = "";
1068
        foreach my $line ( @address ) {
1068
        foreach my $line ( @address ) {
1069
            $address .= $line . "\n" if $line;
1069
            $address .= $line . "\n" if $line;
(-)a/Koha/Library.pm (+1 lines)
Lines 110-115 sub to_api_mapping { Link Here
110
        branchphone      => 'phone',
110
        branchphone      => 'phone',
111
        branchfax        => 'fax',
111
        branchfax        => 'fax',
112
        branchemail      => 'email',
112
        branchemail      => 'email',
113
        branchillemail   => 'illemail',
113
        branchreplyto    => 'reply_to_email',
114
        branchreplyto    => 'reply_to_email',
114
        branchreturnpath => 'return_path_email',
115
        branchreturnpath => 'return_path_email',
115
        branchurl        => 'url',
116
        branchurl        => 'url',
(-)a/admin/branches.pl (+1 lines)
Lines 66-71 if ( $op eq 'add_form' ) { Link Here
66
      branchphone
66
      branchphone
67
      branchfax
67
      branchfax
68
      branchemail
68
      branchemail
69
      branchillemail
69
      branchreplyto
70
      branchreplyto
70
      branchreturnpath
71
      branchreturnpath
71
      branchurl
72
      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 261-266 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
261
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
261
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
262
  `branchfax` LONGTEXT, -- the fax number for your library or branch
262
  `branchfax` LONGTEXT, -- the fax number for your library or branch
263
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
263
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
264
  `branchillemail` LONGTEXT, -- the ILL staff email address for your library or branch
264
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
265
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
265
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
266
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
266
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
267
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 235-240 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
235
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
235
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
236
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
236
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
237
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
237
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
238
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
239
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
238
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
240
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
239
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
241
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
240
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
242
('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 (+6 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>
Lines 221-226 Link Here
221
                                <br />Fax: [% library.branchfax | html %][% END %]
225
                                <br />Fax: [% library.branchfax | html %][% END %]
222
                            [% IF library.branchemail %]
226
                            [% IF library.branchemail %]
223
                                <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
227
                                <br /><a href="mailto:[% library.branchemail | uri %]">[% library.branchemail | html %]</a>[% END %]
228
                            [% IF library.branchillemail && Koha.Preference('ILLModule') %]
229
                                <br /><a href="mailto:[% library.branchillemail | uri %]">[% library.branchillemail | html %]</a>[% END %]
224
                            [% IF library.branchurl %]
230
                            [% IF library.branchurl %]
225
                                <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
231
                                <br /><a href="[% library.branchurl | url %]">[% library.branchurl | html %]</a>[% END %]
226
                            [% IF library.opac_info %]
232
                            [% IF library.opac_info %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (+2 lines)
Lines 485-490 Link Here
485
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
485
                                                [% ELSIF ( prefs.Hold_Filled ) %]Hold filled
486
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
486
                                                [% ELSIF ( prefs.Item_Check_in ) %]Item check-in
487
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
487
                                                [% ELSIF ( prefs.Item_Checkout ) %]Item checkout
488
                                                [% ELSIF ( prefs.Ill_ready ) %]Interlibrary loan ready
489
                                                [% ELSIF ( prefs.Ill_unavailable ) %]Interlibrary loan unavailable
488
                                                [% ELSE %]Unknown
490
                                                [% ELSE %]Unknown
489
                                                [% END %]:
491
                                                [% END %]:
490
                                                <strong>[% transport.transport | html %]</strong><br />
492
                                                <strong>[% transport.transport | html %]</strong><br />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 841-846 Circulation: Link Here
841
                  yes: Enable
841
                  yes: Enable
842
                  no: Disable
842
                  no: Disable
843
            - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend.
843
            - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend.
844
        -
845
            - "Send these ILL notices to staff when appropriate"
846
            - pref: ILLSendStaffNotices
847
              class: multi
848
            - (separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent
849
        -
850
            - Fallback email address for staff ILL notices to be sent to in the absence of a branch address
851
            - pref: ILLDefaultStaffEmail
844
    Fines Policy:
852
    Fines Policy:
845
        -
853
        -
846
            - pref: finesCalendar
854
            - pref: finesCalendar
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +2 lines)
Lines 51-56 Link Here
51
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
51
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
52
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
52
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
53
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
53
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
54
                                              [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
55
                                              [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
54
                                              [% ELSE %]Unknown [% END %]</td>
56
                                              [% ELSE %]Unknown [% END %]</td>
55
                                        [% IF ( messaging_preference.takes_days ) %]
57
                                        [% IF ( messaging_preference.takes_days ) %]
56
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
58
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
57
- 

Return to bug 22818