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

(-)a/Koha/Illrequest.pm (-72 / +278 lines)
Lines 25-30 use Encode qw( encode ); Link Here
25
use Try::Tiny;
25
use Try::Tiny;
26
use DateTime;
26
use DateTime;
27
27
28
use C4::Letters;
29
use C4::Members;
28
use Koha::Database;
30
use Koha::Database;
29
use Koha::DateUtils qw/ dt_from_string /;
31
use Koha::DateUtils qw/ dt_from_string /;
30
use Koha::Email;
32
use Koha::Email;
Lines 248-253 sub status_alias { Link Here
248
250
249
Overloaded getter/setter for request status,
251
Overloaded getter/setter for request status,
250
also nullifies status_alias and records the fact that the status has changed
252
also nullifies status_alias and records the fact that the status has changed
253
and sends a notice if appropriate
251
254
252
=cut
255
=cut
253
256
Lines 281-286 sub status { Link Here
281
            });
284
            });
282
        }
285
        }
283
        delete $self->{previous_status};
286
        delete $self->{previous_status};
287
        # If status has changed to cancellation requested, send a notice
288
        if ($new_status eq 'CANCREQ') {
289
            $self->send_staff_notice('ILL_REQUEST_CANCEL');
290
        }
284
        return $ret;
291
        return $ret;
285
    } else {
292
    } else {
286
        return $current_status;
293
        return $current_status;
Lines 1287-1324 sub generic_confirm { Link Here
1287
    my $library = Koha::Libraries->find($params->{current_branchcode})
1294
    my $library = Koha::Libraries->find($params->{current_branchcode})
1288
        || die "Invalid current branchcode. Are you logged in as the database user?";
1295
        || die "Invalid current branchcode. Are you logged in as the database user?";
1289
    if ( !$params->{stage}|| $params->{stage} eq 'init' ) {
1296
    if ( !$params->{stage}|| $params->{stage} eq 'init' ) {
1290
        my $draft->{subject} = "ILL Request";
1297
        # Get the message body from the notice definition
1291
        $draft->{body} = <<EOF;
1298
        my $letter = $self->get_notice({
1292
Dear Sir/Madam,
1299
            notice_code => 'ILL_PARTNER_REQ',
1293
1300
            transport   => 'email'
1294
    We would like to request an interlibrary loan for a title matching the
1301
        });
1295
following description:
1296
1297
EOF
1298
1299
        my $details = $self->metadata;
1300
        while (my ($title, $value) = each %{$details}) {
1301
            $draft->{body} .= "  - " . $title . ": " . $value . "\n"
1302
                if $value;
1303
        }
1304
        $draft->{body} .= <<EOF;
1305
1306
Please let us know if you are able to supply this to us.
1307
1308
Kind Regards
1309
1310
EOF
1311
1312
        my @address = map { $library->$_ }
1313
            qw/ branchname branchaddress1 branchaddress2 branchaddress3
1314
                branchzip branchcity branchstate branchcountry branchphone
1315
                branchillemail branchemail /;
1316
        my $address = "";
1317
        foreach my $line ( @address ) {
1318
            $address .= $line . "\n" if $line;
1319
        }
1320
1321
        $draft->{body} .= $address;
1322
1302
1323
        my $partners = Koha::Patrons->search({
1303
        my $partners = Koha::Patrons->search({
1324
            categorycode => $self->_config->partner_code
1304
            categorycode => $self->_config->partner_code
Lines 1330-1336 EOF Link Here
1330
            method  => 'generic_confirm',
1310
            method  => 'generic_confirm',
1331
            stage   => 'draft',
1311
            stage   => 'draft',
1332
            value   => {
1312
            value   => {
1333
                draft    => $draft,
1313
                draft => {
1314
                    subject => $letter->{title},
1315
                    body    => $letter->{content}
1316
                },
1334
                partners => $partners,
1317
                partners => $partners,
1335
            }
1318
            }
1336
        };
1319
        };
Lines 1346-1402 EOF Link Here
1346
            "No target email addresses found. Either select at least one partner or check your ILL partner library records.")
1329
            "No target email addresses found. Either select at least one partner or check your ILL partner library records.")
1347
          if ( !$to );
1330
          if ( !$to );
1348
        # Create the from, replyto and sender headers
1331
        # Create the from, replyto and sender headers
1349
        my $from = $library->branchemail;
1332
        my $from = $branch->branchillemail || $branch->branchemail;
1350
        my $reply_to = $library->branchreplyto || $from;
1333
        my $replyto = $branch->branchreplyto || $from;
1351
        Koha::Exceptions::Ill::NoLibraryEmail->throw(
1334
        Koha::Exceptions::Ill::NoLibraryEmail->throw(
1352
            "Your library has no usable email address. Please set it.")
1335
            "Your library has no usable email address. Please set it.")
1353
          if ( !$from );
1336
          if ( !$from );
1354
1337
1355
        # Create the email
1338
        # So we get a notice hashref, then substitute the possibly
1356
        my $email = Koha::Email->create(
1339
        # modified title and body from the draft stage
1357
            {
1340
        my $letter = $self->get_notice({
1358
                to        => $to,
1341
            notice_code => 'ILL_PARTNER_REQ',
1359
                from      => $from,
1342
            transport   => 'email'
1360
                reply_to  => $reply_to,
1343
        });
1361
                subject   => $params->{subject},
1344
        $letter->{title} = $params->{subject};
1362
                text_body => $params->{body},
1345
        $letter->{content} = $params->{body};
1346
1347
        # Send the email
1348
        my $params = {
1349
            letter                 => $letter,
1350
            borrowernumber         => $self->borrowernumber,
1351
            message_transport_type => 'email',
1352
            to_address             => $to,
1353
            from_address           => $from
1354
        };
1355
1356
        if ($letter) {
1357
            my $result = C4::Letters::EnqueueLetter($params);
1358
            if ( $result ) {
1359
                $self->status("GENREQ")->store;
1360
                $self->_backend_capability(
1361
                    'set_requested_partners',
1362
                    {
1363
                        request => $self,
1364
                        to => $to
1365
                    }
1366
                );
1367
                return {
1368
                    error   => 0,
1369
                    status  => '',
1370
                    message => '',
1371
                    method  => 'generic_confirm',
1372
                    stage   => 'commit',
1373
                    next    => 'illview',
1374
                };
1363
            }
1375
            }
1364
        );
1376
        }
1377
        return {
1378
            error   => 1,
1379
            status  => 'email_failed',
1380
            message => 'Email queueing failed',
1381
            method  => 'generic_confirm',
1382
            stage   => 'draft',
1383
        };
1384
    } else {
1385
        die "Unknown stage, should not have happened."
1386
    }
1387
}
1365
1388
1366
        # Send it
1389
=head3 get_staff_to_address
1367
        try {
1368
1390
1369
            $email->send_or_die({ transport => $library->smtp_server->transport });
1391
    my $email = $request->get_staff_to_address();
1370
1392
1371
            $self->status("GENREQ")->store;
1393
Get the email address to which staff notices should be sent
1372
            $self->_backend_capability(
1394
1373
                'set_requested_partners',
1395
=cut
1374
                {
1396
1375
                    request => $self,
1397
sub get_staff_to_address {
1376
                    to => $to
1398
    my ( $self ) = @_;
1377
                }
1399
1378
            );
1400
    # The various places we can get an ILL staff email address from
1379
            return {
1401
    # (In order of preference)
1380
                error   => 0,
1402
    #
1381
                status  => '',
1403
    # Dedicated branch address
1382
                message => '',
1404
    my $library = Koha::Libraries->find( $self->branchcode );
1383
                method  => 'generic_confirm',
1405
    my $branch_ill_to = $library->branchillemail;
1384
                stage   => 'commit',
1406
    # General purpose ILL address from syspref
1385
                next    => 'illview',
1407
    my $syspref = C4::Context->preference("ILLDefaultStaffEmail");
1386
            };
1408
    # Branch general email address
1409
    my $branch_to = $library->branchemail;
1410
    # Last resort
1411
    my $koha_admin = C4::Context->preference('KohaAdminEmailAddress');
1412
1413
    my $to;
1414
    if ($branch_ill_to) {
1415
        $to = $branch_ill_to;
1416
    } elsif ($syspref) {
1417
        $to = $syspref;
1418
    } elsif ($branch_to) {
1419
        $to = $branch_to;
1420
    } elsif ($koha_admin) {
1421
        $to = $koha_admin;
1422
    }
1423
1424
    # $to will not be defined if we didn't find a usable address
1425
    return $to;
1426
}
1427
1428
=head3 send_patron_notice
1429
1430
    my $result = $request->send_patron_notice($notice_code);
1431
1432
Send a specified notice regarding this request to a patron
1433
1434
=cut
1435
1436
sub send_patron_notice {
1437
    my ( $self, $notice_code ) = @_;
1438
1439
    # We need a notice code
1440
    if (!$notice_code) {
1441
        return {
1442
            error => 'notice_no_type'
1443
        };
1444
    }
1445
1446
    # Map from the notice code to the messaging preference
1447
    my %message_name = (
1448
        ILL_PICKUP_READY   => 'Ill_ready',
1449
        ILL_REQUEST_UNAVAIL => 'Ill_unavailable'
1450
    );
1451
1452
    # Get the patron's messaging preferences
1453
    my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences({
1454
        borrowernumber => $self->borrowernumber,
1455
        message_name   => $message_name{$notice_code}
1456
    });
1457
    my @transports = keys %{ $borrower_preferences->{transports} };
1458
1459
    # Send the notice to the patron via the chosen transport methods
1460
    # and record the results
1461
    my @success = ();
1462
    my @fail = ();
1463
    for my $transport (@transports) {
1464
        my $letter = $self->get_notice({
1465
            notice_code => $notice_code,
1466
            transport   => $transport
1467
        });
1468
        if ($letter) {
1469
            my $result = C4::Letters::EnqueueLetter({
1470
                letter                 => $letter,
1471
                borrowernumber         => $self->borrowernumber,
1472
                message_transport_type => $transport,
1473
            });
1474
            if ($result) {
1475
                push @success, $transport;
1476
            } else {
1477
                push @fail, $transport;
1478
            }
1479
        } else {
1480
            push @fail, $transport;
1387
        }
1481
        }
1388
        catch {
1482
    }
1389
            return {
1483
    if (scalar @success > 0) {
1390
                error   => 1,
1484
        my $logger = Koha::Illrequest::Logger->new;
1391
                status  => 'email_failed',
1485
        $logger->log_patron_notice({
1392
                message => "$_",
1486
            request => $self,
1393
                method  => 'generic_confirm',
1487
            notice_code => $notice_code
1394
                stage   => 'draft',
1488
        });
1395
            };
1489
    }
1490
    return {
1491
        result => {
1492
            success => \@success,
1493
            fail    => \@fail
1494
        }
1495
    };
1496
}
1497
1498
=head3 send_staff_notice
1499
1500
    my $result = $request->send_staff_notice($notice_code);
1501
1502
Send a specified notice regarding this request to staff
1503
1504
=cut
1505
1506
sub send_staff_notice {
1507
    my ( $self, $notice_code ) = @_;
1508
1509
    # We need a notice code
1510
    if (!$notice_code) {
1511
        return {
1512
            error => 'notice_no_type'
1513
        };
1514
    }
1515
1516
    # Get the staff notices that have been assigned for sending in
1517
    # the syspref
1518
    my $staff_to_send = C4::Context->preference('ILLSendStaffNotices');
1519
1520
    # If it hasn't been enabled in the syspref, we don't want to send it
1521
    if ($staff_to_send !~ /\b$notice_code\b/) {
1522
        return {
1523
            error => 'notice_not_enabled'
1396
        };
1524
        };
1525
    }
1526
1527
    my $letter = $self->get_notice({
1528
        notice_code => $notice_code,
1529
        transport   => 'email'
1530
    });
1531
1532
    # Try and get an address to which to send staff notices
1533
    my $to_address = scalar $self->get_staff_to_address;
1534
1535
    my $params = {
1536
        letter                 => $letter,
1537
        borrowernumber         => $self->borrowernumber,
1538
        message_transport_type => 'email',
1539
    };
1540
1541
    if ($to_address) {
1542
        $params->{to_address} = $to_address;
1543
        $params->{from_address} = $to_address;
1397
    } else {
1544
    } else {
1398
        die "Unknown stage, should not have happened."
1545
        return {
1546
            error => 'notice_no_create'
1547
        };
1548
    }
1549
1550
    if ($letter) {
1551
        C4::Letters::EnqueueLetter($params)
1552
            or warn "can't enqueue letter $letter";
1553
        return {
1554
            success => 'notice_queued'
1555
        };
1556
    } else {
1557
        return {
1558
            error => 'notice_no_create'
1559
        };
1560
    }
1561
}
1562
1563
=head3 get_notice
1564
1565
    my $notice = $request->get_notice($params);
1566
1567
Return a compiled notice hashref for the passed notice code
1568
and transport type
1569
1570
=cut
1571
1572
sub get_notice {
1573
    my ( $self, $params ) = @_;
1574
1575
    my $title = $self->illrequestattributes->find(
1576
        { type => 'title' }
1577
    );
1578
    my $author = $self->illrequestattributes->find(
1579
        { type => 'author' }
1580
    );
1581
    my $metahash = $self->metadata;
1582
    my @metaarray = ();
1583
    while (my($key, $value) = each %{$metahash}) {
1584
        push @metaarray, "- $key: $value" if $value;
1399
    }
1585
    }
1586
    my $metastring = join("\n", @metaarray);
1587
    my $letter = C4::Letters::GetPreparedLetter(
1588
        module                 => 'ill',
1589
        letter_code            => $params->{notice_code},
1590
        message_transport_type => $params->{transport},
1591
        lang                   => $self->patron->lang,
1592
        tables                 => {
1593
            illrequests => $self->illrequest_id,
1594
            borrowers   => $self->borrowernumber,
1595
            biblio      => $self->biblio_id,
1596
            branches    => $self->branchcode,
1597
        },
1598
        substitute  => {
1599
            ill_bib_title      => $title ? $title->value : 'N/A',
1600
            ill_bib_author     => $author ? $author->value : 'N/A',
1601
            ill_full_metadata  => $metastring
1602
        }
1603
    );
1604
1605
    return $letter;
1400
}
1606
}
1401
1607
1402
=head3 id_prefix
1608
=head3 id_prefix
(-)a/Koha/Illrequest/Logger.pm (-1 / +40 lines)
Lines 26-31 use C4::Context; Link Here
26
use C4::Templates;
26
use C4::Templates;
27
use C4::Log qw( logaction );
27
use C4::Log qw( logaction );
28
use Koha::ActionLogs;
28
use Koha::ActionLogs;
29
use Koha::Notice::Template;
29
30
30
=head1 NAME
31
=head1 NAME
31
32
Lines 62-67 sub new { Link Here
62
    $self->{loggers} = {
63
    $self->{loggers} = {
63
        status => sub {
64
        status => sub {
64
            $self->log_status_change(@_);
65
            $self->log_status_change(@_);
66
        },
67
        patron_notice => sub {
68
            $self->log_patron_notice(@_);
65
        }
69
        }
66
    };
70
    };
67
71
Lines 70-76 sub new { Link Here
70
        C4::Templates::_get_template_file('ill/log/', 'intranet', $query);
74
        C4::Templates::_get_template_file('ill/log/', 'intranet', $query);
71
75
72
    $self->{templates} = {
76
    $self->{templates} = {
73
        STATUS_CHANGE => $base . 'status_change.tt'
77
        STATUS_CHANGE => $base . 'status_change.tt',
78
        PATRON_NOTICE => $base . 'patron_notice.tt'
74
    };
79
    };
75
80
76
    bless $self, $class;
81
    bless $self, $class;
Lines 103-108 sub log_maybe { Link Here
103
    }
108
    }
104
}
109
}
105
110
111
=head3 log_patron_notice
112
113
    Koha::IllRequest::Logger->log_patron_notice($params);
114
115
Receive a hashref containing a request object and params to log,
116
and log it
117
118
=cut
119
120
sub log_patron_notice {
121
    my ( $self, $params ) = @_;
122
123
    if (defined $params->{request} && defined $params->{notice_code}) {
124
        $self->log_something({
125
            modulename   => 'ILL',
126
            actionname   => 'PATRON_NOTICE',
127
            objectnumber => $params->{request}->id,
128
            infos        => to_json({
129
                log_origin    => 'core',
130
                notice_code => $params->{notice_code}
131
            })
132
        });
133
    }
134
}
135
106
=head3 log_status_change
136
=head3 log_status_change
107
137
108
    Koha::IllRequest::Logger->log_status_change($params);
138
    Koha::IllRequest::Logger->log_status_change($params);
Lines 210-215 sub get_request_logs { Link Here
210
        { order_by => { -desc => "timestamp" } }
240
        { order_by => { -desc => "timestamp" } }
211
    )->unblessed;
241
    )->unblessed;
212
242
243
    # Populate a lookup table for all ILL notice types
244
    my $notice_types = Koha::Notice::Templates->search({
245
        module => 'ill'
246
    })->unblessed;
247
    my $notice_hash;
248
    foreach my $notice(@{$notice_types}) {
249
        $notice_hash->{$notice->{code}} = $notice;
250
    }
213
    # Populate a lookup table for status aliases
251
    # Populate a lookup table for status aliases
214
    my $aliases = C4::Koha::GetAuthorisedValues('ILLSTATUS');
252
    my $aliases = C4::Koha::GetAuthorisedValues('ILLSTATUS');
215
    my $alias_hash;
253
    my $alias_hash;
Lines 217-222 sub get_request_logs { Link Here
217
        $alias_hash->{$alias->{authorised_value}} = $alias;
255
        $alias_hash->{$alias->{authorised_value}} = $alias;
218
    }
256
    }
219
    foreach my $log(@{$logs}) {
257
    foreach my $log(@{$logs}) {
258
        $log->{notice_types} = $notice_hash;
220
        $log->{aliases} = $alias_hash;
259
        $log->{aliases} = $alias_hash;
221
        $log->{info} = from_json($log->{info});
260
        $log->{info} = from_json($log->{info});
222
        $log->{template} = $self->get_log_template({
261
        $log->{template} = $self->get_log_template({
(-)a/ill/ill-requests.pl (-1 / +35 lines)
Lines 23-28 use CGI; Link Here
23
23
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Output;
25
use C4::Output;
26
use Koha::Notice::Templates;
26
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
27
use Koha::Illcomment;
28
use Koha::Illcomment;
28
use Koha::Illrequests;
29
use Koha::Illrequests;
Lines 72-83 if ( $backends_available ) { Link Here
72
        # View the details of an ILL
73
        # View the details of an ILL
73
        my $request = Koha::Illrequests->find($params->{illrequest_id});
74
        my $request = Koha::Illrequests->find($params->{illrequest_id});
74
75
76
        # Get the details for notices that can be sent from here
77
        my $notices = Koha::Notice::Templates->search(
78
            {
79
                module => 'ill',
80
                code => { -in => [ 'ILL_PICKUP_READY' ,'ILL_REQUEST_UNAVAIL' ] },
81
            },
82
            {
83
                columns => [ qw/code name/ ],
84
                distinct => 1
85
            }
86
        )->unblessed;
87
75
        $template->param(
88
        $template->param(
89
            notices    => $notices,
76
            request    => $request,
90
            request    => $request,
77
            csrf_token => Koha::Token->new->generate_csrf({
91
            csrf_token => Koha::Token->new->generate_csrf({
78
                session_id => scalar $cgi->cookie('CGISESSID'),
92
                session_id => scalar $cgi->cookie('CGISESSID'),
79
            }),
93
            }),
80
            ( $params->{error} ? ( error => $params->{error} ) : () ),
94
            ( $params->{tran_error} ?
95
                ( tran_error => $params->{tran_error} ) : () ),
96
            ( $params->{tran_success} ?
97
                ( tran_success => $params->{tran_success} ) : () ),
81
        );
98
        );
82
99
83
    } elsif ( $op eq 'create' ) {
100
    } elsif ( $op eq 'create' ) {
Lines 380-385 if ( $backends_available ) { Link Here
380
        );
397
        );
381
        exit;
398
        exit;
382
399
400
    } elsif ( $op eq "send_notice" ) {
401
        my $illrequest_id = $params->{illrequest_id};
402
        my $request = Koha::Illrequests->find($illrequest_id);
403
        my $ret = $request->send_patron_notice($params->{notice_code});
404
        my $append = '';
405
        if ($ret->{result} && scalar @{$ret->{result}->{success}} > 0) {
406
            $append .= '&tran_success=' . join(',', @{$ret->{result}->{success}});
407
        }
408
        if ($ret->{result} && scalar @{$ret->{result}->{fail}} > 0) {
409
            $append .= '&tran_fail=' . join(',', @{$ret->{result}->{fail}}.join(','));
410
        }
411
        # Redirect to view the whole request
412
        print $cgi->redirect(
413
            "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=".
414
            scalar $params->{illrequest_id} . $append
415
        );
416
        exit;
383
    } else {
417
    } else {
384
        my $request = Koha::Illrequests->find($params->{illrequest_id});
418
        my $request = Koha::Illrequests->find($params->{illrequest_id});
385
        my $backend_result = $request->custom_capability($op, $params);
419
        my $backend_result = $request->custom_capability($op, $params);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (+39 lines)
Lines 99-104 Link Here
99
                    </p>
99
                    </p>
100
                [% END %]
100
                [% END %]
101
101
102
                [% IF whole.success %]
103
                    <p>[% whole.success | html %]</p>
104
                [% END %]
105
102
                [% IF query_type == 'create' %]
106
                [% IF query_type == 'create' %]
103
                    <h1>New ILL request</h1>
107
                    <h1>New ILL request</h1>
104
                    [% PROCESS $whole.template %]
108
                    [% PROCESS $whole.template %]
Lines 462-467 Link Here
462
                      [% END %]
466
                      [% END %]
463
                    [% END %]
467
                    [% END %]
464
468
469
                    [% IF tran_success %]
470
                        [% succ_methods = [] %]
471
                        [% IF tran_success.match('email') %]
472
                            [% succ_methods.push('email') %]
473
                        [% END %]
474
                        [% IF tran_success.match('sms') %]
475
                            [% succ_methods.push('SMS') %]
476
                        [% END %]
477
                        <div class="alert">
478
                            The requested notice was queued for delivery by [% succ_methods.join(', ') | html %]
479
                        </div>
480
                    [% END %]
481
                    [% IF tran_fail %]
482
                        [% fail_methods = [] %]
483
                        [% IF tran_fail.match('email') %]
484
                            [% fail_methods.push('email') %]
485
                        [% END %]
486
                        [% IF tran_fail.match('sms') %]
487
                            [% fail_methods.push('SMS') %]
488
                        [% END %]
489
                        <div class="alert">
490
                            The requested notice was NOT queued for delivery by [% fail_methods.join(', ') | html %]
491
                        </div>
492
                    [% END %]
493
465
                    <h1>Manage ILL request</h1>
494
                    <h1>Manage ILL request</h1>
466
                    <div id="request-toolbar" class="btn-toolbar">
495
                    <div id="request-toolbar" class="btn-toolbar">
467
                        <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&amp;illrequest_id=[% request.illrequest_id | html %]">
496
                        <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&amp;illrequest_id=[% request.illrequest_id | html %]">
Lines 523-528 Link Here
523
                                </a>
552
                                </a>
524
                            [% END %]
553
                            [% END %]
525
                        [% END %]
554
                        [% END %]
555
                        <div class="dropdown btn-group">
556
                            <button class="btn btn-default dropdown-toggle" type="button" id="ill-notice-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
557
                                <i class="fa fa-envelope"></i> Send notice to patron <span class="caret"></span>
558
                            </button>
559
                            <ul class="dropdown-menu" aria-labelledby="ill-notice-dropdown">
560
                                [% FOREACH notice IN notices %]
561
                                    <li><a href="/cgi-bin/koha/ill/ill-requests.pl?method=send_notice&amp;illrequest_id=[% request.illrequest_id | uri %]&amp;notice_code=[% notice.code | uri %]">[% notice.name | html %]</a></li>
562
                                [% END %]
563
                            </ul>
564
                        </div>
526
                        <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default pull-right" href="#">
565
                        <a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default pull-right" href="#">
527
                            <span class="fa fa-eye"></span>
566
                            <span class="fa fa-eye"></span>
528
                            Display supplier metadata
567
                            Display supplier metadata
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/log/patron_notice.tt (+6 lines)
Line 0 Link Here
1
[% USE KohaDates %]
2
<p>
3
[% log.timestamp | $KohaDates with_hours => 1 %] : <b>Patron notice sent: </b>
4
[% notice_code = log.info.notice_code %]
5
&quot;[% log.notice_types.$notice_code.name | html %]&quot;
6
</p>
(-)a/opac/opac-illrequests.pl (-1 / +2 lines)
Lines 85-90 if ( $op eq 'list' ) { Link Here
85
        illrequest_id  => $params->{illrequest_id}
85
        illrequest_id  => $params->{illrequest_id}
86
    });
86
    });
87
    $request->notesopac($params->{notesopac})->store;
87
    $request->notesopac($params->{notesopac})->store;
88
    # Send a notice to staff alerting them of the update
89
    $request->send_staff_notice('ILL_REQUEST_MODIFIED');
88
    print $query->redirect(
90
    print $query->redirect(
89
        '/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=' .
91
        '/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=' .
90
        $params->{illrequest_id} .
92
        $params->{illrequest_id} .
91
- 

Return to bug 22818