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 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 263-268 CREATE TABLE `branches` ( -- information about your libraries or branches are st Link Here
263
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
263
  `branchphone` LONGTEXT, -- the primary phone for your library or branch
264
  `branchfax` LONGTEXT, -- the fax number for your library or branch
264
  `branchfax` LONGTEXT, -- the fax number for your library or branch
265
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
265
  `branchemail` LONGTEXT, -- the primary email address for your library or branch
266
  `branchillemail` LONGTEXT, -- the ILL staff email address for your library or branch
266
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
267
  `branchreplyto` LONGTEXT, -- the email to be used as a Reply-To
267
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
268
  `branchreturnpath` LONGTEXT, -- the email to be used as Return-Path
268
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
269
  `branchurl` LONGTEXT, -- the URL for your library or branch's website
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 239-244 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
239
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
239
('ILLModuleCopyrightClearance','','70|10','Enter text to enable the copyright clearance stage of request creation. Text will be displayed','Textarea'),
240
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
240
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
241
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
241
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
242
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
243
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
242
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
244
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
243
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
245
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
244
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
246
('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 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 894-899 Circulation: Link Here
894
                  yes: Check
894
                  yes: Check
895
                  no: Don't check
895
                  no: Don't check
896
            - external sources for availability during the request process
896
            - external sources for availability during the request process
897
        -
898
            - "Send these ILL notices to staff when appropriate"
899
            - pref: ILLSendStaffNotices
900
              class: multi
901
            - (separated with |). e.g. ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED If left empty, no staff ILL notices will be sent
902
        -
903
            - Fallback email address for staff ILL notices to be sent to in the absence of a branch address
904
            - pref: ILLDefaultStaffEmail
897
    Fines policy:
905
    Fines policy:
898
        -
906
        -
899
            - pref: finesCalendar
907
            - pref: finesCalendar
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +2 lines)
Lines 52-57 Link Here
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
52
                                              [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
53
                                              [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
54
                                              [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout
55
                                              [% ELSIF ( messaging_preference.Ill_ready ) %]Interlibrary loan ready
56
                                              [% ELSIF ( messaging_preference.Ill_unavailable ) %]Interlibrary loan unavailable
55
                                              [% ELSE %]Unknown [% END %]</td>
57
                                              [% ELSE %]Unknown [% END %]</td>
56
                                        [% IF ( messaging_preference.takes_days ) %]
58
                                        [% IF ( messaging_preference.takes_days ) %]
57
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
59
                                            <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS">
58
- 

Return to bug 22818