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

(-)a/catalogue/detail.pl (+6 lines)
Lines 395-400 foreach my $item (@items) { Link Here
395
        }
395
        }
396
    }
396
    }
397
397
398
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, old => undef });
399
    if ( defined $recall ) {
400
        $item->{recalled} = 1;
401
        $item->{recall} = $recall;
402
    }
403
398
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
404
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
399
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
405
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
400
            push @itemloop, $item;
406
            push @itemloop, $item;
(-)a/circ/circulation.pl (-1 / +9 lines)
Lines 178-183 if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) { Link Here
178
}
178
}
179
my $issueconfirmed = $query->param('issueconfirmed');
179
my $issueconfirmed = $query->param('issueconfirmed');
180
my $cancelreserve  = $query->param('cancelreserve');
180
my $cancelreserve  = $query->param('cancelreserve');
181
my $cancel_recall  = $query->param('cancel_recall');
182
my $recall_id     = $query->param('recall_id');
181
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
183
my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
182
my $charges        = $query->param('charges') || q{};
184
my $charges        = $query->param('charges') || q{};
183
185
Lines 410-416 if (@$barcodes) { Link Here
410
        }
412
        }
411
        unless($confirm_required) {
413
        unless($confirm_required) {
412
            my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
414
            my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
413
            my $issue = AddIssue( $patron->unblessed, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew'), switch_onsite_checkout => $switch_onsite_checkout, } );
415
            my $recall = Koha::Recalls->find({ borrowernumber => $patron->borrowernumber, itemnumber => $item->itemnumber, old => undef });
416
            if ( $recall and !$recall_id ){
417
                $recall_id = $recall->recall_id;
418
            }
419
            my $issue = AddIssue( $patron->unblessed, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew'), switch_onsite_checkout => $switch_onsite_checkout, cancel_recall => $cancel_recall, recall_id => $recall_id, } );
414
            $template_params->{issue} = $issue;
420
            $template_params->{issue} = $issue;
415
            $session->clear('auto_renew');
421
            $session->clear('auto_renew');
416
            $inprocess = 1;
422
            $inprocess = 1;
Lines 456-461 if ($patron) { Link Here
456
    $template->param(
462
    $template->param(
457
        holds_count  => $holds->count(),
463
        holds_count  => $holds->count(),
458
        WaitingHolds => $waiting_holds,
464
        WaitingHolds => $waiting_holds,
465
        recalls => $patron->recalls,
466
        specific_patron => 1,
459
    );
467
    );
460
}
468
}
461
469
(-)a/circ/returns.pl (+71 lines)
Lines 83-88 if ( $query->param('print_slip') ) { Link Here
83
    );
83
    );
84
}
84
}
85
85
86
# print a recall slip
87
if ( $query->param('recall_slip') ) {
88
    $template->param(
89
        recall_slip => 1,
90
        recall_id => scalar $query->param('recall_id'),
91
    );
92
}
93
94
86
#####################
95
#####################
87
#Global vars
96
#Global vars
88
my $userenv = C4::Context->userenv;
97
my $userenv = C4::Context->userenv;
Lines 178-183 if ( $query->param('reserve_id') ) { Link Here
178
    }
187
    }
179
}
188
}
180
189
190
if ( $query->param('recall_id') ) {
191
    my $recall = Koha::Recalls->find( scalar $query->param('recall_id') );
192
    my $barcode = $query->param('barcode');
193
    my $return_branch = $query->param('returnbranch');
194
195
    my $expirationdate = $recall->calc_expirationdate;
196
    my $item;
197
    if ( !$recall->item_level_recall ) {
198
        $item = Koha::Items->find({ barcode => $barcode });
199
    }
200
201
    if ( $recall->branchcode ne $return_branch ) {
202
        $recall->start_transfer({ item => $item });
203
    } else {
204
        $recall->set_waiting({ item => $item });
205
    }
206
}
207
181
my $borrower;
208
my $borrower;
182
my $returned = 0;
209
my $returned = 0;
183
my $messages;
210
my $messages;
Lines 236-241 if ($dotransfer){ Link Here
236
if ($canceltransfer){
263
if ($canceltransfer){
237
    $itemnumber=$query->param('itemnumber');
264
    $itemnumber=$query->param('itemnumber');
238
    DeleteTransfer($itemnumber);
265
    DeleteTransfer($itemnumber);
266
    my $recall_transfer_deleted = Koha::Recalls->find({ itemnumber => $itemnumber, status => 'T' });
267
    if ( defined $recall_transfer_deleted ) {
268
        $recall_transfer_deleted->revert_transfer;
269
    }
239
    if($dest eq "ttr"){
270
    if($dest eq "ttr"){
240
        print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl");
271
        print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl");
241
        exit;
272
        exit;
Lines 353-358 $template->param( inputloop => \@inputloop ); Link Here
353
my $found    = 0;
384
my $found    = 0;
354
my $waiting  = 0;
385
my $waiting  = 0;
355
my $reserved = 0;
386
my $reserved = 0;
387
my $recalled = 0;
356
388
357
# new op dev : we check if the document must be returned to his homebranch directly,
389
# new op dev : we check if the document must be returned to his homebranch directly,
358
#  if the document is transferred, we have warning message .
390
#  if the document is transferred, we have warning message .
Lines 469-474 if ( $messages->{'ResFound'}) { Link Here
469
    );
501
    );
470
}
502
}
471
503
504
if ( $messages->{RecallFound} ) {
505
    my $recall = $messages->{RecallFound};
506
    if ( dt_from_string( $recall->timestamp ) == dt_from_string ) {
507
        # we just updated this recall
508
        $template->param( recall => $recall );
509
    } else {
510
        my $transfertodo = $messages->{RecallNeedsTransfer};
511
        $template->param(
512
            found => 1,
513
            recall => $recall,
514
            recalled => $recall->waiting ? 0 : 1,
515
            transfertodo => $transfertodo,
516
            waitingrecall => $recall->waiting ? 1 : 0,
517
        );
518
    }
519
}
520
521
if ( $messages->{TransferredRecall} ) {
522
    my $recall = $messages->{TransferredRecall};
523
524
    # confirm transfer has arrived at the branch
525
    my $transfer = Koha::Item::Transfers->search({ datearrived => { '!=' => undef }, itemnumber => $recall->itemnumber }, { order_by => { -desc => 'datearrived' } })->next;
526
527
    # if transfer has completed, show popup to confirm as waiting
528
    if ( defined $transfer and $transfer->tobranch eq $recall->branchcode ) {
529
        $template->param(
530
            found => 1,
531
            recall => $recall,
532
            recalled => 1,
533
        );
534
    }
535
}
536
472
# Error Messages
537
# Error Messages
473
my @errmsgloop;
538
my @errmsgloop;
474
foreach my $code ( keys %$messages ) {
539
foreach my $code ( keys %$messages ) {
Lines 541-546 foreach my $code ( keys %$messages ) { Link Here
541
    }
606
    }
542
    elsif ( $code eq 'ReturnClaims' ) {
607
    elsif ( $code eq 'ReturnClaims' ) {
543
        $template->param( ReturnClaims => $messages->{ReturnClaims} );
608
        $template->param( ReturnClaims => $messages->{ReturnClaims} );
609
    } elsif ( $code eq 'RecallFound' ) {
610
        ;
611
    } elsif ( $code eq 'RecallNeedsTransfer' ) {
612
        ;
613
    } elsif ( $code eq 'TransferredRecall' ) {
614
        ;
544
    } else {
615
    } else {
545
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
616
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
546
        # This forces the issue of staying in sync w/ Circulation.pm
617
        # This forces the issue of staying in sync w/ Circulation.pm
(-)a/circ/transferstoreceive.pl (+7 lines)
Lines 117-122 while ( my $library = $libraries->next ) { Link Here
117
            if ( my $first_hold = $holds->next ) {
117
            if ( my $first_hold = $holds->next ) {
118
                $getransf{patron} = Koha::Patrons->find( $first_hold->borrowernumber );
118
                $getransf{patron} = Koha::Patrons->find( $first_hold->borrowernumber );
119
            }
119
            }
120
121
            # check for a recall for this transfer
122
            my $recall = $item->recall;
123
            if ( defined $recall ) {
124
                $getransf{recall} = $recall;
125
            }
126
120
            push( @transferloop, \%getransf );
127
            push( @transferloop, \%getransf );
121
        }
128
        }
122
129
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (+3 lines)
Lines 41-45 Link Here
41
<a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id | url  %]" >Checkout history</a></li>
41
<a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id | url  %]" >Checkout history</a></li>
42
[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CATALOGUING&amp;action=MODIFY&amp;object=[% biblio_object_id | url  %]&amp;object_type=biblio">Modification log</a> </li>[% END %]
42
[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CATALOGUING&amp;action=MODIFY&amp;object=[% biblio_object_id | url  %]&amp;object_type=biblio">Modification log</a> </li>[% END %]
43
[% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id | uri %]">Rota</a> </li>[% END %]
43
[% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id | uri %]">Rota</a> </li>[% END %]
44
    [% IF ( Koha.Preference('UseRecalls') && CAN_user_recalls ) %]
45
        [% IF ( recallsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% Biblio.RecallsCount( biblio_object_id ) | html %])</a></li>
46
    [% END %]
44
</ul>
47
</ul>
45
</div>
48
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+3 lines)
Lines 139-144 Link Here
139
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
139
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
140
        [% IF illview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a></li>
140
        [% IF illview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a></li>
141
    [% END %]
141
    [% END %]
142
    [% IF Koha.Preference('UseRecalls') && CAN_user_recalls %]
143
        [% IF recallsview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/recallshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Recalls history</a></li>
144
    [% END %]
142
</ul></div>
145
</ul></div>
143
146
144
<!-- Modal -->
147
<!-- Modal -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (+8 lines)
Lines 39-44 Link Here
39
            [% IF Koha.Preference('OnSiteCheckouts') %]
39
            [% IF Koha.Preference('OnSiteCheckouts') %]
40
                <li><a href="/cgi-bin/koha/circ/on-site_checkouts.pl">Pending on-site checkouts</a></li>
40
                <li><a href="/cgi-bin/koha/circ/on-site_checkouts.pl">Pending on-site checkouts</a></li>
41
            [% END %]
41
            [% END %]
42
43
            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
44
                <li><a href="/cgi-bin/koha/recalls/recalls_queue.pl" title="All active recalls">Recalls queue</a></li>
45
                <li><a href="/cgi-bin/koha/recalls/recalls_to_pull.pl" title="Recalls that could be filled but have not been set waiting">Recalls to pull</a></li>
46
                <li><a href="/cgi-bin/koha/recalls/recalls_overdue.pl" title="Recalled items that are overdue to be returned">Overdue recalls</a></li>
47
                <li><a href="/cgi-bin/koha/recalls/recalls_waiting.pl" title="Recalled items awaiting pickup">Recalls awaiting pickup</a></li>
48
                <li><a href="/cgi-bin/koha/recalls/recalls_old_queue.pl" title="Inactive recalls">Old recalls</a></li>
49
            [% END %]
42
        </ul>
50
        </ul>
43
51
44
    </div>
52
    </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc (+1 lines)
Lines 53-58 Link Here
53
[%- END -%]
53
[%- END -%]
54
[%- IF hide_patron_infos_if_needed AND ( display_patron_name OR display_cardnumber ) -%]
54
[%- IF hide_patron_infos_if_needed AND ( display_patron_name OR display_cardnumber ) -%]
55
    [%- IF link_to == 'circulation_reserves' %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | uri %]#reserves">
55
    [%- IF link_to == 'circulation_reserves' %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | uri %]#reserves">
56
    [%- ELSIF link_to == 'circulation_recalls' %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | uri %]#recalls">
56
    [%- ELSE %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | uri %]">
57
    [%- ELSE %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | uri %]">
57
    [%- END -%]
58
    [%- END -%]
58
[%- END -%]
59
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc (+131 lines)
Line 0 Link Here
1
<div id="recalls">
2
[% IF recalls.count %]
3
    <table id="recalls-table">
4
        <thead>
5
            <tr>
6
                [% IF checkboxes %]<th class="recall-checkbox nosort">&nbsp;</th>[% END %]
7
                <th class="recall-title anti-the">Title</th>
8
                [% UNLESS specific_patron %]<th class="recall-patron">Requested by</th>[% END %]
9
                <th class="recall-date">Placed on</th>
10
                <th class="recall-expiry">Expires on</th>
11
                <th class="recall-branch">Pickup location</th>
12
                <th class="recall-status">Status</th>
13
                [% UNLESS viewing_old %]<th class="recall-duedate">Due date</th>[% END %]
14
                [% UNLESS viewing_old %]<th class="recall-actions nosort">&nbsp;</th>[% END %]
15
            </tr>
16
        </thead>
17
18
        <tbody>
19
            [% FOREACH recall IN recalls %]
20
                [% IF recall.old %]<tr class="old">[% ELSE %]<tr>[% END %]
21
22
                    [% IF checkboxes %]
23
                        <td class="recall-checkbox">
24
                            [% IF recall.old %]
25
                                &nbsp;
26
                            [% ELSE %]
27
                                <input type="checkbox" value="[% recall.recall_id | html %]" name="recall_ids">
28
                            [% END %]
29
                        </td>
30
                    [% END %]
31
32
                    <td class="recall-title">
33
                        <b><a class="recall-title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | html %]">
34
                            [% recall.biblio.title | html %]
35
                            [% FOREACH s IN recall.biblio.subtitle %]
36
                                [% s | html %]
37
                            [% END %]
38
                        </a></b>
39
                        [% IF recall.item %][% recall.item.barcode | html %][% END %]
40
                        [% recall.biblio.author | html %]
41
                    </td>
42
43
                    [% UNLESS specific_patron %]
44
                        <td class="recall-patron">
45
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.borrowernumber | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>
46
                        </td>
47
                    [% END %]
48
49
                    <td class="recall-date">
50
                        [% recall.recalldate | $KohaDates %]
51
                    </td>
52
53
                    <td class="recall-expiry">
54
                        [% IF ( recall.expirationdate ) %]
55
                            [% recall.expirationdate | $KohaDates %]
56
                        [% ELSIF ( !recall.old ) %]
57
                            Never expires
58
                        [% ELSE %]
59
                            -
60
                        [% END %]
61
                    </td>
62
63
                    <td class="recall-branch">
64
                        [% recall.library.branchname | html %]
65
                    </td>
66
67
                    <td class="recall-status">
68
                        [% IF ( recall.in_transit ) %]
69
                            In transit to [% recall.library.branchname | html %]
70
                        [% ELSIF ( recall.waiting ) %]
71
                            Ready for pickup
72
                        [% ELSIF ( recall.expired ) %]
73
                            Expired on [% recall.expirationdate | $KohaDates %]
74
                        [% ELSIF ( recall.cancelled ) %]
75
                            Cancelled on [% recall.cancellationdate | $KohaDates %]
76
                        [% ELSIF ( recall.overdue ) %]
77
                            Overdue to be returned
78
                        [% ELSIF ( recall.finished ) %]
79
                            Fulfilled
80
                        [% ELSE %]
81
                            Requested
82
                        [% END %]
83
                    </td>
84
85
                    [% UNLESS viewing_old %]
86
                    <td class="recall-duedate">
87
                        [% IF recall.requested and recall.checkout %]
88
                            Due to be returned by [% recall.checkout.date_due | $KohaDates %]
89
                        [% ELSIF recall.waiting and RECALL.expirationdate %]
90
                            Pick up by [% RECALL.expirationdate | $KohaDates %]
91
                        [% ELSE %]
92
                            -
93
                        [% END %]
94
                    </td>
95
                    [% END %]
96
97
                    [% UNLESS viewing_old %]
98
                    <td class="recall-cancel actions">
99
                        [% IF recall.old %]
100
                            &nbsp;
101
                        [% ELSE %]
102
                            <div class="btn-group">
103
                                <a class="btn btn-sm dropdown-toggle" data-toggle="dropdown" href="#"> Actions <span class="caret"></span></a>
104
                                <ul class="dropdown-menu">
105
                                    [% IF ( recall.requested or recall.overdue ) %]
106
                                        <li><a class="cancel_recall" data-id="[% recall.recall_id | html %]" data-action="cancel"><i class="fa fa-times"></i> Cancel</a></li>
107
                                        [% IF ( recall.should_be_overdue ) %]
108
                                            <li><a class="overdue_recall" data-id="[% recall.recall_id | html %]" data-action="overdue"><i class="fa fa-hourglass-end"></i> Mark as overdue</a></li>
109
                                        [% END %]
110
                                    [% ELSIF ( recall.waiting ) %]
111
                                        <li><a class="revert_recall" data-id="[% recall.recall_id | html %]" data-action="revert"><i class="fa fa-undo"></i> Revert waiting</a></li>
112
                                        <li><a class="expire_recall" data-id="[% recall.recall_id | html %]" data-action="expire"><i class="fa fa-times"></i> Expire</a></li>
113
                                    [% END %]
114
                                </ul>
115
                            </div>
116
                        [% END %]
117
                    </td>
118
                    [% END %]
119
120
                </tr>
121
            [% END %]
122
        </tbody>
123
    </table>
124
    [% ELSE %]
125
        [% IF patron.borrowernumber %]
126
            <div class="dialog message">Patron has no recalls.</div>
127
        [% ELSE %]
128
            <div class="dialog message">There are no recalls to show.</div>
129
        [% END %]
130
    [% END %]
131
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc (+1 lines)
Lines 57-61 Link Here
57
    var BROWSER_RETURN_TO_SEARCH = _("Results");
57
    var BROWSER_RETURN_TO_SEARCH = _("Results");
58
    var BROWSER_PREVIOUS = _("Previous");
58
    var BROWSER_PREVIOUS = _("Previous");
59
    var BROWSER_NEXT = _("Next");
59
    var BROWSER_NEXT = _("Next");
60
    var RECALLED = _("Recalled");
60
</script>
61
</script>
61
<!-- / strings.inc -->
62
<!-- / strings.inc -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +11 lines)
Lines 391-404 Note that permanent location is a code, and location may be an authval. Link Here
391
                                There is an item level hold on this item (priority = [% hold.priority | html %]).
391
                                There is an item level hold on this item (priority = [% hold.priority | html %]).
392
                            [% END %]
392
                            [% END %]
393
                        [% END %]
393
                        [% END %]
394
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %]
394
395
                        [% IF item.recalled %]
396
                            [% IF item.recall.waitingdate %]
397
                                Waiting at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.waitingdate | $KohaDates %]
398
                            [% ELSE %]
399
                                Item recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.borrowernumber | uri %]">[% item.recall.patron.firstname | html %] [% item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber | html %])</a> on [% item.recall.recalldate | $KohaDates %]
400
                            [% END %]
401
                        [% END %]
402
403
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || item.recalled ) %]
395
                            Available
404
                            Available
396
                        [% END %]
405
                        [% END %]
397
406
398
                        [% IF ( item.restricted ) %]
407
                        [% IF ( item.restricted ) %]
399
                            <span class="restricted">([% item.restrictedvalue | html %])</span>
408
                            <span class="restricted">([% item.restrictedvalue | html %])</span>
400
                        [% END %]
409
                        [% END %]
401
402
                    </td>
410
                    </td>
403
                    <td class="datelastseen"><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
411
                    <td class="datelastseen"><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
404
                    <td class="dateaccessioned"><span title="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</span></td>
412
                    <td class="dateaccessioned"><span title="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</span></td>
Lines 895-900 Note that permanent location is a code, and location may be an authval. Link Here
895
[% MACRO jsinclude BLOCK %]
903
[% MACRO jsinclude BLOCK %]
896
    [% INCLUDE 'catalog-strings.inc' %]
904
    [% INCLUDE 'catalog-strings.inc' %]
897
    [% Asset.js("js/catalog.js") | $raw %]
905
    [% Asset.js("js/catalog.js") | $raw %]
906
    [% Asset.js("js/recalls.js") | $raw %]
898
    [% Asset.js("js/coce.js") | $raw %]
907
    [% Asset.js("js/coce.js") | $raw %]
899
    <script>
908
    <script>
900
        var interface = "[% interface | html %]";
909
        var interface = "[% interface | html %]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (+6 lines)
Lines 487-492 Link Here
487
                                                            Holds ([% Biblio.HoldsCount( SEARCH_RESULT.biblionumber ) | html %])
487
                                                            Holds ([% Biblio.HoldsCount( SEARCH_RESULT.biblionumber ) | html %])
488
                                                        [% END %]
488
                                                        [% END %]
489
                                                    [% END # /IF SEARCH_RESULT.norequests %]
489
                                                    [% END # /IF SEARCH_RESULT.norequests %]
490
                                                    [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
491
                                                        | <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]">Recalls ([% Biblio.RecallsCount( SEARCH_RESULT.biblionumber ) | html %])</a>
492
                                                    [% END %]
490
493
491
                                                    [% IF Koha.Preference('intranetbookbag') == 1 %]
494
                                                    [% IF Koha.Preference('intranetbookbag') == 1 %]
492
                                                        [% IF ( SEARCH_RESULT.incart ) %]
495
                                                        [% IF ( SEARCH_RESULT.incart ) %]
Lines 622-627 Link Here
622
                                                                    [% IF ( other_items_loo.intransit ) %]
625
                                                                    [% IF ( other_items_loo.intransit ) %]
623
                                                                        (In transit)
626
                                                                        (In transit)
624
                                                                    [% END %]
627
                                                                    [% END %]
628
                                                                    [% IF ( other_items_loo.recalled ) %]
629
                                                                        (Recalled)
630
                                                                    [% END %]
625
                                                                    [% IF ( other_items_loo.onhold ) %]
631
                                                                    [% IF ( other_items_loo.onhold ) %]
626
                                                                        (On hold)
632
                                                                        (On hold)
627
                                                                    [% END %]
633
                                                                    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (+1 lines)
Lines 120-125 Link Here
120
                                            [% IF ( resultsloo.itemlostcount ) %] Lost ([% resultsloo.itemlostcount | html %])<br />[% END %]
120
                                            [% IF ( resultsloo.itemlostcount ) %] Lost ([% resultsloo.itemlostcount | html %])<br />[% END %]
121
                                            [% IF ( resultsloo.orderedcount ) %] On order ([% resultsloo.orderedcount | html %])<br/>[% END %]
121
                                            [% IF ( resultsloo.orderedcount ) %] On order ([% resultsloo.orderedcount | html %])<br/>[% END %]
122
                                            [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount | html %])[% END %]
122
                                            [% IF ( resultsloo.notforloancount ) %] Not for loan ([% resultsloo.notforloancount | html %])[% END %]
123
                                            [% IF ( resultsloo.recalledcount ) %] Waiting to fill recall ([% resultsloo.recalled | html %])[% END %]
123
                                            [% IF ( resultsloo.onholdcount ) %] Waiting on hold ([% resultsloo.onholdcount | html %])[% END %]
124
                                            [% IF ( resultsloo.onholdcount ) %] Waiting on hold ([% resultsloo.onholdcount | html %])[% END %]
124
                                        </span>
125
                                        </span>
125
                                    </td>
126
                                    </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (+12 lines)
Lines 70-75 Link Here
70
                        <a class="circ-button" href="/cgi-bin/koha/circ/reserveratios.pl"><i class="fa fa-line-chart"></i> Hold ratios</a>
70
                        <a class="circ-button" href="/cgi-bin/koha/circ/reserveratios.pl"><i class="fa fa-line-chart"></i> Hold ratios</a>
71
                    </li>
71
                    </li>
72
                </ul>
72
                </ul>
73
74
                [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
75
                    <h3>Recalls</h3>
76
77
                    <ul class="buttons-list">
78
                        <li><a class="circ-button" href="/cgi-bin/koha/recalls/recalls_queue.pl" title="All active recalls"><i class="fa fa-tasks"></i> Recalls queue</a></li>
79
                        <li><a class="circ-button" href="/cgi-bin/koha/recalls/recalls_to_pull.pl" title="Recalls that could be filled but have not been set waiting"><i class="fa fa-hand-grab-o"></i> Recalls to pull</a></li>
80
                        <li><a class="circ-button" href="/cgi-bin/koha/recalls/recalls_overdue.pl" title="Recalled items that are overdue to be returned"><i class="fa fa-clock-o"></i> Overdue recalls</a></li>
81
                        <li><a class="circ-button" href="/cgi-bin/koha/recalls/recalls_waiting.pl" title="Recalled items awaiting pickup"><i class="fa fa-calendar"></i> Recalls awaiting pickup</a></li>
82
                        <li><a class="circ-button" href="/cgi-bin/koha/recalls/recalls_old_queue.pl" title="Inactive recalls"><i class="fa fa-tasks"></i> Old recalls</a></li>
83
                    </ul>
84
                [% END %]
73
            </div>
85
            </div>
74
86
75
            <!-- Add the extra clearfix for only the required viewport -->
87
            <!-- Add the extra clearfix for only the required viewport -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +46 lines)
Lines 196-201 Link Here
196
                                        [% END %]
196
                                        [% END %]
197
                                    </li>
197
                                    </li>
198
                                [% END %]
198
                                [% END %]
199
200
                                [% IF RECALLED %]
201
                                    [% IF RECALLED.waiting %]
202
                                        <li>Item <i>[% RECALLED.biblio.title | html %]</i> ([% RECALLED.item.barcode | html %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.borrowernumber | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.waitingdate | $KohaDates %]</li>
203
                                    [% ELSIF RECALLED.requested or RECALLED.overdue %]
204
                                        <li>Item <i>[% RECALLED.biblio.title | html %]</i> [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.borrowernumber | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.recalldate | $KohaDates %]</li>
205
                                    [% END %]
206
                                [% END %]
207
199
                            </ul>
208
                            </ul>
200
209
201
                            [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
210
                            [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
Lines 227-232 Link Here
227
                                        </p>
236
                                        </p>
228
                                    [% END %]
237
                                    [% END %]
229
238
239
                                    [% IF ( RECALLED ) %]
240
                                        <p>
241
                                            <label for="cancelrecall">Cancel recall</label>
242
                                            <input type="radio" value="cancel" name="cancel_recall" id="cancelrecall" />
243
                                            <input type="hidden" value="[% RECALLED.recall_id | html %]" name="recall_id" />
244
                                        </p>
245
                                        [% IF RECALLED.waiting %]
246
                                            <p>
247
                                                <label for="revertrecall">Revert waiting status</label>
248
                                                <input type="radio" value="revert" name="cancel_recall" id="revertrecall" checked="checked"/>
249
                                                <input type="hidden" value="[% RECALLED.recall_id | html %]" name="recall_id" />
250
                                            </p>
251
                                        [% END %]
252
                                    [% END %]
253
230
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
254
                                    <input type="hidden" name="barcode" value="[% barcode | html %]" />
231
                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
255
                                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
232
                                    <input type="hidden" name="issueconfirmed" value="1" />
256
                                    <input type="hidden" name="issueconfirmed" value="1" />
Lines 277-282 Link Here
277
                                </form>
301
                                </form>
278
                            [% END %]
302
                            [% END %]
279
303
304
                            [% IF ( RECALLED ) %]
305
                                <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
306
                                    <button class="print" type="submit" onclick="Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% RECALLED.recall_id | html %]');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
307
                                </form>
308
                            [% END %]
309
280
                            <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
310
                            <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
281
                                [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
311
                                [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
282
                                <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
312
                                <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
Lines 294-300 Link Here
294
                                [% END %]
324
                                [% END %]
295
                            </form>
325
                            </form>
296
326
297
                            [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
327
                            [% IF ( RESERVED || ISSUED_TO_ANOTHER || RECALLED ) && (CAN_user_reserveforothers_place_holds ) %]
298
                                [% UNLESS noissues %]
328
                                [% UNLESS noissues %]
299
                                    <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber | html %]&borrowernumber=[% patron.borrowernumber | html %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
329
                                    <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber | html %]&borrowernumber=[% patron.borrowernumber | html %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
300
                                [% END %]
330
                                [% END %]
Lines 900-905 Link Here
900
                                    </a>
930
                                    </a>
901
                                </li>
931
                                </li>
902
                            [% END %]
932
                            [% END %]
933
934
                            [% IF Koha.Preference('UseRecalls') %]
935
                                <li>
936
                                    <a href="#recalls" id="recalls-tab">
937
                                        [% recalls.count | html %] Recalls
938
                                    </a>
939
                                </li>
940
                            [% END %]
903
                        </ul>
941
                        </ul>
904
942
905
                        <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
943
                        <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
Lines 914-919 Link Here
914
                            </div> <!-- /#clubs-tab -->
952
                            </div> <!-- /#clubs-tab -->
915
                        [% END %]
953
                        [% END %]
916
954
955
                        [% IF Koha.Preference('UseRecalls') %]
956
                            <div id="recalls">
957
                                [% INCLUDE 'recalls.inc' %]
958
                            </div>
959
                        [% END %]
960
917
                        [% INCLUDE borrower_debarments.inc %]
961
                        [% INCLUDE borrower_debarments.inc %]
918
962
919
                        <div id="reserves">
963
                        <div id="reserves">
Lines 1154-1159 Link Here
1154
    </script>
1198
    </script>
1155
    [% INCLUDE 'str/members-menu.inc' %]
1199
    [% INCLUDE 'str/members-menu.inc' %]
1156
    [% Asset.js("js/members-menu.js") | $raw %]
1200
    [% Asset.js("js/members-menu.js") | $raw %]
1201
    [% Asset.js("js/recalls.js") | $raw %]
1157
[% END %]
1202
[% END %]
1158
1203
1159
[% INCLUDE 'intranet-bottom.inc' %]
1204
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt (+2 lines)
Lines 8-13 Link Here
8
<title>Koha &rsaquo; Circulation &rsaquo; Transfers print receipt</title>
8
<title>Koha &rsaquo; Circulation &rsaquo; Transfers print receipt</title>
9
[% ELSIF ( caller == 'members' ) %]
9
[% ELSIF ( caller == 'members' ) %]
10
<title>Koha &rsaquo; Patrons &rsaquo; Print receipt for [% borrowernumber | html %]</title>
10
<title>Koha &rsaquo; Patrons &rsaquo; Print receipt for [% borrowernumber | html %]</title>
11
[% ELSIF ( caller == 'recall' ) %]
12
<title>Koha &rsaquo; Circulation &rsaquo; Recall print receipt</title>
11
[% ELSIF ( title ) %][%# FIXME title is never defined %]
13
[% ELSIF ( title ) %][%# FIXME title is never defined %]
12
<title>Koha &rsaquo; Patrons &rsaquo; [% title | html %]</title>
14
<title>Koha &rsaquo; Patrons &rsaquo; [% title | html %]</title>
13
[% END %]
15
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt (+3 lines)
Lines 137-142 Link Here
137
                            [% ELSIF error == "onsite_checkout" %]
137
                            [% ELSIF error == "onsite_checkout" %]
138
                                <p>Item cannot be renewed because it's an onsite checkout</p>
138
                                <p>Item cannot be renewed because it's an onsite checkout</p>
139
139
140
                            [% ELSIF error == 'recalled' %]
141
                                <p>This item has been recalled.</p>
142
140
                            [% ELSE %]
143
                            [% ELSE %]
141
144
142
                                [% error | html %]
145
                                [% error | html %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (+202 lines)
Lines 655-660 Link Here
655
                                    </div> <!-- /.modal-dialog -->
655
                                    </div> <!-- /.modal-dialog -->
656
                                </div> <!-- /#hold-found2 -->
656
                                </div> <!-- /#hold-found2 -->
657
                            [% END #/IF reserved %]
657
                            [% END #/IF reserved %]
658
659
                            [% IF ( recalled ) %]
660
                                <!-- recalled -->
661
                                <div id="recalled" class="modal fade audio-alert-action block">
662
                                    <div class="modal-dialog">
663
                                        <div class="modal-content">
664
                                            <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
665
666
                                                <div class="modal-header">
667
                                                    <h3>
668
                                                        Recall found:
669
                                                        <br/>
670
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblionumber | uri %]">[% recall.biblio.title | html %]</a>
671
                                                        [% IF recall.item %]
672
                                                            <div class="recall-found-barcode">
673
                                                                (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblionumber | uri %]&amp;itemnumber=[% recall.itemnumber | uri %]">[% recall.item.barcode | html %]</a>)
674
                                                            </div>
675
                                                        [% END %]
676
                                                    </h3>
677
                                                </div>
678
679
                                                <div class="modal-body">
680
                                                    [% IF ( recall.recallnotes ) %]
681
                                                        <h4>Notes:</h4>
682
                                                        <p>[% recall.recallnotes | html %]</p>
683
                                                        <hr />
684
                                                    [% END %]
685
                                                    <h5>Recall placed by:</h5>
686
                                                    <ul>
687
                                                        <li>
688
                                                            [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
689
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
690
                                                        </li>
691
692
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
693
694
                                                        [% IF ( recall.patron.phone ) %]
695
                                                            <li>[% recall.patron.phone | html %]</li>
696
                                                        [% END %]
697
698
                                                        [% IF ( recall.patron.email ) %]
699
                                                            <li>
700
                                                                [% IF ( transfertodo ) %]
701
                                                                    [% recall.patron.email | html %]
702
                                                                [% ELSE %]
703
                                                                    <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
704
                                                                [% END %]
705
                                                            </li>
706
                                                        [% END %]
707
708
                                                        [% UNLESS ( transfertodo) %]
709
                                                            [% INCLUDE display_bormessagepref %]
710
                                                        [% END %]
711
712
                                                        [% IF ( recall.patron.is_debarred ) %]
713
                                                            <li class="error">Patron is RESTRICTED</li>
714
                                                        [% END %]
715
716
                                                        [% IF ( recall.patron.gonenoaddress ) %]
717
                                                            <li class="error">Patron's address is in doubt</li>
718
                                                        [% END %]
719
                                                    </ul>
720
                                                    [% IF ( transfertodo ) %]
721
                                                        <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.branchcode ) | html %]</h4>
722
                                                    [% ELSE %]
723
                                                        <h4><strong>Recall at</strong> [% Branches.GetName( recall.branchcode ) | html %]</h4>
724
                                                    [% END %]
725
726
                                                    <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
727
                                                    <input type="hidden" name="barcode" value="[% itembarcode | html %]">
728
                                                    <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
729
                                                    <input type="hidden" name="recall_slip" value="0">
730
731
                                                </div>
732
733
                                                <div class="modal-footer">
734
                                                    [% IF ( transfertodo ) %]
735
                                                        <button type="submit" class="btn btn-default approve">
736
                                                            <i class="fa fa-check"></i> Confirm recall and transfer
737
                                                        </button>
738
                                                        <button type="button" class="btn btn-default print-recall">
739
                                                            <i class="fa fa-print"></i> Print slip, transfer, and confirm
740
                                                        </button>
741
                                                    [% ELSE %]
742
                                                        <button type="submit" class="btn btn-default approve">
743
                                                            <i class="fa fa-check"></i> Confirm recall
744
                                                        </button>
745
                                                        <button type="button" class="btn btn-default print-recall">
746
                                                            <i class="fa fa-print"></i> Print slip and confirm
747
                                                        </button>
748
                                                    [% END %]
749
750
                                                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny">
751
                                                        <i class="fa fa-times"></i> Ignore
752
                                                    </button>
753
                                                </div> <!-- /.modal-footer -->
754
                                            </form> <!-- /.confirm -->
755
                                        </div> <!-- /.modal-content -->
756
                                    </div> <!-- /.modal-dialog -->
757
                                </div> <!-- /#recalled -->
758
                            [% END #/IF recalled %]
759
760
                            [% IF ( waitingrecall ) %]
761
                                <!-- recalled -->
762
                                <div id="recalledwaiting" class="modal fade audio-alert-action block">
763
                                    <div class="modal-dialog">
764
                                        <div class="modal-content">
765
                                            <form method="post" action="/cgi-bin/koha/circ/returns.pl" class="confirm">
766
767
                                                <div class="modal-header">
768
                                                    <h3>
769
                                                        Recall found (item is already waiting):
770
                                                        <br/>
771
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% recall.biblionumber | uri %]">[% recall.biblio.title | html %]</a>
772
                                                        [% IF recall.item %]
773
                                                            <div class="recall-found-barcode">
774
                                                                (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% recall.biblionumber | uri %]&amp;itemnumber=[% recall.itemnumber | uri %]">[% recall.item.barcode | html %]</a>)
775
                                                            </div>
776
                                                        [% END %]
777
                                                    </h3>
778
                                                </div>
779
780
                                                <div class="modal-body">
781
                                                    [% IF ( recall.recallnotes ) %]
782
                                                        <h4>Notes:</h4>
783
                                                        <p>[% recall.recallnotes | html %]</p>
784
                                                        <hr />
785
                                                    [% END %]
786
                                                    <h5>Recall placed by:</h5>
787
                                                    <ul>
788
                                                        <li>
789
                                                            [% INCLUDE 'patron-title.inc' patron=recall.patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_recalls" %]
790
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
791
                                                        </li>
792
793
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
794
795
                                                        [% IF ( recall.patron.phone ) %]
796
                                                            <li>[% recall.patron.phone | html %]</li>
797
                                                        [% END %]
798
799
                                                        [% IF ( recall.patron.email ) %]
800
                                                            <li>
801
                                                                [% IF ( transfertodo ) %]
802
                                                                    [% recall.patron.email | html %]
803
                                                                [% ELSE %]
804
                                                                    <a id="boremail" href="mailto:[% recall.patron.email | html %]">[% recall.patron.email | html %]</a>
805
                                                                [% END %]
806
                                                            </li>
807
                                                        [% END %]
808
809
                                                        [% UNLESS ( transfertodo) %]
810
                                                            [% INCLUDE display_bormessagepref %]
811
                                                        [% END %]
812
813
                                                        [% IF ( recall.patron.is_debarred ) %]
814
                                                            <li class="error">Patron is RESTRICTED</li>
815
                                                        [% END %]
816
817
                                                        [% IF ( recall.patron.gonenoaddress ) %]
818
                                                            <li class="error">Patron's address is in doubt</li>
819
                                                        [% END %]
820
                                                    </ul>
821
                                                    [% IF ( transfertodo ) %]
822
                                                        <h4><strong>Transfer to:</strong> [% Branches.GetName( recall.branchcode ) | html %]</h4>
823
                                                    [% ELSE %]
824
                                                        <h4><strong>Wait for pickup at</strong> [% Branches.GetName( recall.branchcode ) | html %]</h4>
825
                                                    [% END %]
826
827
                                                    <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
828
                                                    <input type="hidden" name="barcode" value="[% itembarcode | html %]">
829
                                                    <input type="hidden" name="returnbranch" value="[% Branches.GetLoggedInBranchcode | html %]">
830
                                                    <input type="hidden" name="recall_slip" value="0">
831
832
                                                </div>
833
834
                                                <div class="modal-footer">
835
                                                    <button type="submit" class="btn btn-default approve">
836
                                                        <i class="fa fa-check"></i> Confirm recall
837
                                                    </button>
838
                                                    <button type="button" class="btn btn-default print-recall">
839
                                                        <i class="fa fa-print"></i> Print slip and confirm
840
                                                    </button>
841
842
                                                    <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny">
843
                                                        <i class="fa fa-times"></i> Ignore
844
                                                    </button>
845
                                                </div> <!-- /.modal-footer -->
846
                                            </form> <!-- /.confirm -->
847
                                        </div> <!-- /.modal-content -->
848
                                    </div> <!-- /.modal-dialog -->
849
                                </div> <!-- /#recalledwaiting-->
850
                            [% END #/IF recalledwaiting %]
658
                        [% END # /IF found %]
851
                        [% END # /IF found %]
659
852
660
                        <div class="static_checkin_messages">
853
                        <div class="static_checkin_messages">
Lines 936-941 Link Here
936
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | uri %]&amp;biblionumber=[% biblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]');
1129
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | uri %]&amp;biblionumber=[% biblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]');
937
            [% END %]
1130
            [% END %]
938
1131
1132
            [% IF recall_slip %]
1133
                Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% recall.recall_id | uri %]');
1134
            [% END %]
1135
939
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
1136
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
940
            var returns_table = KohaTable("checkedintable", {
1137
            var returns_table = KohaTable("checkedintable", {
941
                    "bFilter":false,
1138
                    "bFilter":false,
Lines 1042-1047 Link Here
1042
                this.form.submit();
1239
                this.form.submit();
1043
            });
1240
            });
1044
1241
1242
            $('.print-recall').on("click",function(e){
1243
                this.form.recall_slip.value = 1;
1244
                this.form.submit();
1245
            });
1246
1045
            $('.cancel-hold').on("click",function(e){
1247
            $('.cancel-hold').on("click",function(e){
1046
                this.form.cancel_reserve.value = 1;
1248
                this.form.cancel_reserve.value = 1;
1047
                this.form.submit();
1249
                this.form.submit();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt (+2 lines)
Lines 68-73 Link Here
68
                                    [% reser.patron.first_valid_email_address | html %]
68
                                    [% reser.patron.first_valid_email_address | html %]
69
                                </a>
69
                                </a>
70
                            [% END %]
70
                            [% END %]
71
                        [% ELSIF ( reser.recall ) %]
72
                            Recall requested by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.recall.borrowernumber | uri %]">[% reser.recall.patron.surname | html %][% IF reser.recall.patron.firstname %], [% reser.recall.patron.firstname | html %][% END %] ([% reser.recall.patron.cardnumber | html %])</a>
71
                        [% ELSE %]
73
                        [% ELSE %]
72
                        <p>None</p>
74
                        <p>None</p>
73
                    [% END %]
75
                    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+15 lines)
Lines 771-776 Link Here
771
                                    </a>
771
                                    </a>
772
                                </li>
772
                                </li>
773
                            [% END %]
773
                            [% END %]
774
775
                            [% IF Koha.Preference('UseRecalls') %]
776
                                <li>
777
                                    <a href="#recalls" id="recalls-tab">
778
                                        [% recalls.count | html %] Recalls
779
                                    </a>
780
                                </li>
781
                            [% END %]
774
                        </ul>
782
                        </ul>
775
783
776
                        [% INCLUDE "checkouts-table.inc" %]
784
                        [% INCLUDE "checkouts-table.inc" %]
Lines 793-798 Link Here
793
                            </div>
801
                            </div>
794
                        [% END %]
802
                        [% END %]
795
803
804
                        [% IF Koha.Preference('UseRecalls') %]
805
                            <div id="recalls">
806
                                [% INCLUDE 'recalls.inc' %]
807
                            </div>
808
                        [% END %]
809
796
                        [% INCLUDE borrower_debarments.inc %]
810
                        [% INCLUDE borrower_debarments.inc %]
797
811
798
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
812
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
Lines 910-915 Link Here
910
    [% Asset.js("js/holds.js") | $raw %]
924
    [% Asset.js("js/holds.js") | $raw %]
911
    [% INCLUDE 'str/members-menu.inc' %]
925
    [% INCLUDE 'str/members-menu.inc' %]
912
    [% Asset.js("js/members-menu.js") | $raw %]
926
    [% Asset.js("js/members-menu.js") | $raw %]
927
    [% Asset.js("js/recalls.js") | $raw %]
913
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
928
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
914
    <script>
929
    <script>
915
930
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt (+48 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE KohaDates %]
3
[% USE Koha %]
4
[% USE Asset %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Recalls history for [% INCLUDE 'patron-title.inc' %]</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
11
<body id="recalls_history" class="pat">
12
    [% INCLUDE 'header.inc' %]
13
    [% INCLUDE 'patron-search.inc' %]
14
15
    <div id="breadcrumbs">
16
        <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
17
        <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo;
18
        Recalls history for [% INCLUDE 'patron-title.inc' %]
19
    </div>
20
    <div class="main container-fluid">
21
        <div class="row">
22
            <div class="col-sm-10 col-sm-push-2">
23
                <main>
24
                    [% INCLUDE 'members-toolbar.inc' %]
25
                    <h1>Recalls history</h1>
26
                    [% IF Koha.Preference('UseRecalls') %]
27
                        <input type="checkbox" id="hide_old" name="hide_old" checked="checked">
28
                        <label for="hide_old">Show old recalls</label>
29
                        [% INCLUDE 'recalls.inc' %]
30
                    [% ELSE %]
31
                         <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
32
                    [% END %]
33
                </main>
34
            </div>
35
        <div class="col-sm-2 col-sm-pull-10">
36
            <aside>
37
                [% INCLUDE 'circ-menu.inc' %]
38
            </aside>
39
        </div>
40
    </div>
41
42
[% MACRO jsinclude BLOCK %]
43
    [% INCLUDE 'datatables.inc' %]
44
    [% INCLUDE 'columns_settings.inc' %]
45
    [% Asset.js("js/recalls.js") | $raw %]
46
[% END %]
47
48
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_old_queue.tt (+56 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Asset %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Old recalls</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
<body id="circ_recalls_old_queue" class="circ">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
13
14
<div id="breadcrumbs">
15
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
17
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_old_queue.pl">Old recalls</a>
18
</div>
19
20
<div class="main container-fluid">
21
    <div class="row">
22
        [% IF Koha.Preference('CircSidebar') %]
23
            <div class="col-sm-10 col-sm-push-2">
24
        [% ELSE %]
25
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
26
        [% END %]
27
        <main>
28
29
        <h1>Old recalls</h1>
30
        [% IF Koha.Preference('UseRecalls') %]
31
            [% INCLUDE 'recalls.inc' %]
32
        [% ELSE %]
33
            <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
34
        [% END %]
35
36
        </main>
37
        </div> <!-- /.col-etc -->
38
39
        [% IF Koha.Preference('CircSidebar') %]
40
            <div class="col-sm-2 col-sm-pull-10">
41
                <aside>
42
                    [% INCLUDE 'circ-nav.inc' %]
43
                </aside>
44
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
45
        [% END %]
46
47
    </div> <!-- /.row -->
48
</div>
49
50
[% MACRO jsinclude BLOCK %]
51
    [% INCLUDE 'datatables.inc' %]
52
    [% INCLUDE 'columns_settings.inc' %]
53
    [% Asset.js("js/recalls.js") | $raw %]
54
[% END %]
55
56
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_overdue.tt (+67 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Asset %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Overdue recalls</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
<body id="circ_overdue_recalls" class="circ">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
13
14
<div id="breadcrumbs">
15
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
17
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_overdue.pl">Overdue recalls</a>
18
</div>
19
20
<div class="main container-fluid">
21
    <div class="row">
22
        [% IF Koha.Preference('CircSidebar') %]
23
            <div class="col-sm-10 col-sm-push-2">
24
        [% ELSE %]
25
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
26
        [% END %]
27
        <main>
28
29
        <h1>Overdue recalls</h1>
30
        [% IF Koha.Preference('UseRecalls') %]
31
            [% IF recalls.count %]
32
                <form method="post" action="/cgi-bin/koha/recalls/recalls_overdue.pl">
33
                    <input type="hidden" name="op" value="cancel_multiple_recalls">
34
                    <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
35
                    [% INCLUDE 'recalls.inc' %]
36
                    <fieldset class="action">
37
                        <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
38
                    </fieldset>
39
                </form>
40
            [% ELSE %]
41
                <div class="dialog message">There are no recalls to show.</div>
42
            [% END %]
43
        [% ELSE %]
44
            <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
45
        [% END %]
46
47
        </main>
48
        </div> <!-- /.col-etc -->
49
50
        [% IF Koha.Preference('CircSidebar') %]
51
            <div class="col-sm-2 col-sm-pull-10">
52
                <aside>
53
                    [% INCLUDE 'circ-nav.inc' %]
54
                </aside>
55
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
56
        [% END %]
57
58
    </div> <!-- /.row -->
59
</div>
60
61
[% MACRO jsinclude BLOCK %]
62
    [% INCLUDE 'columns_settings.inc' %]
63
    [% INCLUDE 'datatables.inc' %]
64
    [% Asset.js("js/recalls.js") | $raw %]
65
[% END %]
66
67
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_queue.tt (+67 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Asset %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Recalls queue</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
<body id="circ_recalls_queue" class="circ">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
13
14
<div id="breadcrumbs">
15
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
17
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_queue.pl">Recalls queue</a>
18
</div>
19
20
<div class="main container-fluid">
21
    <div class="row">
22
        [% IF Koha.Preference('CircSidebar') %]
23
            <div class="col-sm-10 col-sm-push-2">
24
        [% ELSE %]
25
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
26
        [% END %]
27
        <main>
28
29
        <h1>Recalls queue</h1>
30
        [% IF Koha.Preference('UseRecalls') %]
31
            [% IF recalls.count %]
32
                <form method="post" action="/cgi-bin/koha/recalls/recalls_queue.pl">
33
                    <input type="hidden" name="op" value="cancel_multiple_recalls">
34
                    <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
35
                    [% INCLUDE 'recalls.inc' %]
36
                    <fieldset class="action">
37
                        <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
38
                    </fieldset>
39
                </form>
40
            [% ELSE %]
41
                <div class="dialog message">There are no recalls to show.</div>
42
            [% END %]
43
        [% ELSE %]
44
            <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
45
        [% END %]
46
47
        </main>
48
        </div> <!-- /.col-etc -->
49
50
        [% IF Koha.Preference('CircSidebar') %]
51
            <div class="col-sm-2 col-sm-pull-10">
52
                <aside>
53
                    [% INCLUDE 'circ-nav.inc' %]
54
                </aside>
55
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
56
        [% END %]
57
58
    </div> <!-- /.row -->
59
</div>
60
61
[% MACRO jsinclude BLOCK %]
62
    [% INCLUDE 'datatables.inc' %]
63
    [% INCLUDE 'columns_settings.inc' %]
64
    [% Asset.js("js/recalls.js") | $raw %]
65
[% END %]
66
67
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt (+175 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE AuthorisedValues %]
5
[% USE Branches %]
6
[% USE ItemTypes %]
7
[% USE Asset %]
8
[% SET footerjs = 1 %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>Koha &rsaquo; Circulation &rsaquo; Recalls to pull</title>
11
[% INCLUDE 'doc-head-close.inc' %]
12
</head>
13
<body id="circ_recalls_to_pull" class="circ">
14
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'cat-search.inc' %]
16
17
<div id="breadcrumbs">
18
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
20
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_to_pull.pl">Recalls to pull</a>
21
</div>
22
23
<div class="main container-fluid">
24
    <div class="row">
25
        [% IF Koha.Preference('CircSidebar') %]
26
            <div class="col-sm-10 col-sm-push-2">
27
        [% ELSE %]
28
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
29
        [% END %]
30
        <main>
31
32
        <h1>Recalls to pull</h1>
33
        The following recalls could be fulfilled by available items.
34
35
        [% IF Koha.Preference('UseRecalls') %]
36
            <div id="recalls">
37
                [% IF recalls %]
38
                <table id="recalls-table">
39
                    <thead>
40
                        <tr>
41
                            <th class="recall-topull">Pull this many items</th>
42
                            <th class="recall-items">Items available</th>
43
                            <th class="recall-patrons">Patrons with recalls</th>
44
                            <th class="recall-firstpatron">First patron</th>
45
                            <th class="recall-title anti-the">Title</th>
46
                            <th class="recall-libraries">Libraries</th>
47
                            <th class="recall-callnumbers">Available call numbers</th>
48
                            <th class="recall-copynumbers">Available copy numbers</th>
49
                            <th class="recall-enumeration">Available enumeration</th>
50
                            <th class="recall-itemtypes">Available item types</th>
51
                            <th class="recall-locations">Available locations</th>
52
                            <th class="recall-date title-string">Earliest recall date</th>
53
                            <th class="recall-action nosort">&nbsp;</th>
54
                        </tr>
55
                    </thead>
56
                    <tbody>
57
                        [% FOREACH recall IN recalls %]
58
                        <tr>
59
                            <td class="recall-topull"><b>[% recall.pull_count | html %]</b></td>
60
                            <td class="recall-items">[% recall.items_count | html %]</td>
61
                            <td class="recall-patrons">[% recall.patrons_count | html %]</td>
62
                            <td class="recall-firstpatron"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.first_recall.borrowernumber | uri %]">[% recall.first_recall.patron.firstname | html %] [% recall.first_recall.patron.surname | html %]</a></td>
63
                            <td class="recall-title">
64
                                [% INCLUDE 'biblio-default-view.inc' biblionumber=recall.first_recall.biblio.biblionumber %]
65
                                [% INCLUDE 'biblio-title.inc' biblio=recall.first_recall.biblio %]
66
                                [% IF recall.first_recall.biblio.author %] by [% recall.first_recall.biblio.author | html %][% END %]
67
                            </td>
68
                            <td class="recall-libraries">
69
                                <ul>
70
                                    [% FOREACH library IN recall.libraries %]
71
                                        <li>[% Branches.GetName( library ) | html %]</li>
72
                                    [% END %]
73
                                </ul>
74
                            </td>
75
                            <td class="recall-callnumbers">
76
                                <ul>
77
                                    [% FOREACH callnumber IN recall.callnumbers %]
78
                                        <li>[% callnumber | html %]</li>
79
                                    [% END %]
80
                                </ul>
81
                            </td>
82
                            <td class="recall-copynumbers">
83
                                <ul>
84
                                    [% FOREACH copyno IN recall.copynumbers %]
85
                                        <li>[% copyno | html %]</li>
86
                                    [% END %]
87
                                </ul>
88
                            </td>
89
                            <td class="recall-enumeration">
90
                                <ul>
91
                                    [% FOREACH enumchron IN recall.enumchrons %]
92
                                        <li>[% enumchron | html %]</li>
93
                                    [% END %]
94
                                </ul>
95
                            </td>
96
                            <td class="recall-itemtypes">
97
                                <ul>
98
                                    [% FOREACH itemtype IN recall.itemtypes %]
99
                                        <li>[% ItemTypes.GetDescription( itemtype ) | html %]</li>
100
                                    [% END %]
101
                                </ul>
102
                            </td>
103
                            <td class="recall-locations">
104
                                <ul>
105
                                    [% FOREACH loc IN recall.locations %]
106
                                        <li>[% AuthorisedValues.GetByCode('LOC', loc) | html %]</li>
107
                                    [% END %]
108
                                </ul>
109
                            </td>
110
                            <td class="recall-date">
111
                                <span title="[% recall.first_recall.recalldate | html %]">[% recall.first_recall.recalldate | $KohaDates %] in [% recall.first_recall.library.branchname | html %]</span>
112
                            </td>
113
                            <td class="recall-action">
114
                                <form action="/cgi-bin/koha/recalls/recalls_to_pull.pl" method="post">
115
                                    <input type="hidden" name="recall_id" value="[% recall.first_recall.recall_id | html %]">
116
                                    <input type="hidden" name="op" value="cancel">
117
                                    [% IF recall.first_recall.in_transit %]
118
                                        <button type="submit" class="btn btn-default cancelreturn"><i class="fa fa-times"></i> Cancel recall and return to: [% recall.first_recall.item.homebranch | html %]</button>
119
                                    [% ELSE %]
120
                                        <button type="submit" class="btn btn-default cancel"><i class="fa fa-times"></i> Cancel recall</button>
121
                                    [% END %]
122
                                </form>
123
                            </td>
124
                        </tr>
125
                        [% END %]
126
                    </tbody>
127
                </table>
128
                [% ELSE %]
129
                    <div class="dialog message">There are no recalls to pull.</div>
130
                [% END %]
131
            </div>
132
        [% ELSE %]
133
            <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
134
        [% END %]
135
136
        </main>
137
        </div> <!-- /.col-etc -->
138
139
        [% IF Koha.Preference('CircSidebar') %]
140
            <div class="col-sm-2 col-sm-pull-10">
141
                <aside>
142
                    [% INCLUDE 'circ-nav.inc' %]
143
                </aside>
144
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
145
        [% END %]
146
147
    </div> <!-- /.row -->
148
</div>
149
150
[% MACRO jsinclude BLOCK %]
151
    [% INCLUDE 'datatables.inc' %]
152
    [% INCLUDE 'columns_settings.inc' %]
153
    <script>
154
        $(document).ready(function(){
155
            $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
156
                "aoColumnDefs": [
157
                    { 'bSortable': false, 'aTargets': [ 'nosort' ] },
158
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
159
                    { "sType": "anti-the", "aTargets": [ "anti-the" ] }
160
                ],
161
                "sPaginationType": "full_numbers"
162
            }));
163
164
            $(".cancelreturn").click(function(){
165
                return confirmDelete(_("Are you sure you want to remove this recall and return the item to it's home library?"));
166
            });
167
168
            $(".cancel").click(function(){
169
                return confirmDelete(_("Are you sure you want to remove this recall?"));
170
            });
171
        });
172
    </script>
173
[% END %]
174
175
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt (+181 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Koha %]
3
[% USE KohaDates %]
4
[% USE Asset %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Recalls awaiting pickup</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
<body id="circ_recalls_awaiting_pickup" class="circ">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'cat-search.inc' %]
13
14
<div id="breadcrumbs">
15
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
17
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_waiting.pl">Recalls awaiting pickup</a>
18
</div>
19
20
<div class="main container-fluid">
21
    <div class="row">
22
        [% IF Koha.Preference('CircSidebar') %]
23
            <div class="col-sm-10 col-sm-push-2">
24
        [% ELSE %]
25
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
26
        [% END %]
27
        <main>
28
                <h1>Recalls awaiting pickup</h1>
29
30
                [% IF Koha.Preference('UseRecalls') %]
31
32
                <div id="results" class="toptabs">
33
34
                    <ul>
35
                        <li><a href="#recallswaiting">Recalls waiting: [% recalls.count | html %]</a></li>
36
                        <li><a href="#recallsover">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a></li>
37
                    </ul>
38
39
                    <div id="recallswaiting">
40
                        [% IF ( recalls ) %]
41
                            <table id="recallswaiting-table">
42
                                <thead><tr>
43
                                    <th class="recall-waitingdate title-string">Available since</th>
44
                                    <th class="recall-title anti-the">Title</th>
45
                                    <th class="recall-patron">Requested by</th>
46
                                    <th class="recall-library">Pickup location</th>
47
                                    <th class="recall-action nosort">&nbsp;</th>
48
                                </tr></thead>
49
                                <tbody>
50
                                    [% FOREACH recall IN recalls %]<tr>
51
                                        <td class="recall-waitingdate">[% recall.waitingdate | $KohaDates %]</td>
52
                                        <td class="recall-title">
53
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | uri %]">
54
                                                [% recall.biblio.title | html %]
55
                                                [% FOREACH s IN recall.biblio.subtitle %]
56
                                                    [% s | html %]
57
                                                [% END %]
58
                                            </a>
59
                                            [% recall.biblio.author | html %]
60
                                            <br><i>Barcode: [% recall.item.barcode | html %]</i>
61
                                        </td>
62
                                        <td class="recall-patron">
63
                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.borrowernumber | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
64
                                             [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
65
                                             [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
66
                                        </td>
67
                                        <td class="recall-library">[% recall.library.branchname | html %]</td>
68
                                        <td class="recall-action actions">
69
                                            <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
70
                                                <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
71
                                                <input type="hidden" name="op" value="modify">
72
                                                <fieldset class="action">
73
                                                    <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
74
                                                    <input type="submit" name="expire" class="expire_recall" value="Expire recall">
75
                                                </fieldset>
76
                                            </form>
77
                                        </td>
78
                                    </tr>[% END %]
79
                                </tbody>
80
                            </table>
81
                        [% ELSE %]
82
                            <div class="dialog message">There are no recalls to show.</div>
83
                        [% END %]
84
                    </div> <!-- recallswaiting -->
85
86
                    <div id="recallsover">
87
                        [% IF ( over.size ) %]
88
                            [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
89
                            <table id="recallsover-table">
90
                                <thead><tr>
91
                                    <th class="recall-waitingdate title-string">Available since</th>
92
                                    <th class="recall-title anti-the">Title</th>
93
                                    <th class="recall-patron">Requested by</th>
94
                                    <th class="recall-library">Pickup location</th>
95
                                    <th class="recall-action nosort">&nbsp;</th>
96
                                </tr></thead>
97
                                <tbody>
98
                                    [% FOREACH recall IN over %]<tr>
99
                                        <td class="recall-waitingdate">[% recall.waitingdate | $KohaDates %]</td>
100
                                        <td class="recall-title">
101
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | uri %]">
102
                                                [% recall.biblio.title | html %]
103
                                                [% FOREACH s IN recall.biblio.subtitles %]
104
                                                    [% s | html %]
105
                                                [% END %]
106
                                                [% recall.item.enumchron | html %]
107
                                            </a>
108
                                            [% recall.biblio.author | html %]
109
                                            <br><i>Barcode: [% recall.item.barcode | html %]</i>
110
                                        </td>
111
                                        <td class="recall-patron">
112
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.borrowernumber | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
113
                                            [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
114
                                            [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
115
                                        </td>
116
                                        <td class="recall-library">[% recall.library.branchname | html %]</td>
117
                                        <td class="recall-action actions">
118
                                            <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
119
                                                <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
120
                                                <input type="hidden" name="op" value="modify">
121
                                                <fieldset class="action">
122
                                                    <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
123
                                                    <input type="submit" name="expire" class="expire_recall" value="Expire recall">
124
                                                </fieldset>
125
                                            </form>
126
                                        </td>
127
                                    </tr>[% END %]
128
                                </tbody>
129
                            </table>
130
                        [% ELSE %]
131
                            <div class="dialog message">There are no recalls to show.</div>
132
                        [% END %]
133
                    </div> <!-- recallsover -->
134
135
                </div> <!-- results-->
136
137
                [% ELSE %]
138
                    <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
139
                [% END %] <!-- Koha.Preference('UseRecalls') -->
140
141
        </main>
142
        </div> <!-- /.col-etc -->
143
144
        [% IF Koha.Preference('CircSidebar') %]
145
            <div class="col-sm-2 col-sm-pull-10">
146
                <aside>
147
                    [% INCLUDE 'circ-nav.inc' %]
148
                </aside>
149
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
150
        [% END %]
151
152
    </div> <!-- /.row -->
153
</div>
154
155
[% MACRO jsinclude BLOCK %]
156
    [% INCLUDE 'datatables.inc' %]
157
    [% INCLUDE 'columns_settings.inc' %]
158
    <script type="text/javascript">
159
        $(document).ready(function() {
160
            $('#results').tabs();
161
162
            $("#recallswaiting-table, #recallsover-table").dataTable($.extend(true, {}, dataTablesDefaults, {
163
                "autoWidth": false,
164
                "aoColumnDefs": [
165
                    { 'bSortable': false, 'aTargets': [ 'nosort' ] },
166
                ],
167
                "sPaginationType": "full_numbers"
168
            }));
169
170
            $(".revert_recall").click(function(e) {
171
                return confirmDelete(_("Are you sure you want to revert this recall's status from Waiting?"));
172
            });
173
174
            $(".expire_recall").click(function(e) {
175
                return confirmDelete(_("Are you sure you want to remove this recall?"));
176
            });
177
        });
178
    </script>
179
[% END %]
180
181
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt (+63 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE Koha %]
4
[% USE KohaDates %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Circulation &rsaquo; Recalls &rsaquo; Confirm recalls</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
</head>
10
<body id="recalls-request" class="catalog">
11
[% INCLUDE 'header.inc' %]
12
[% INCLUDE 'circ-search.inc' %]
13
14
<div id="breadcrumbs">
15
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
16
    <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo;
17
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.title | html %]</a> &rsaquo;
18
    Confirm recalls on [% biblio.title | html %]
19
</div>
20
21
<div class="main container-fluid">
22
<div class="row">
23
<div class="col-sm-10 col-sm-push-2">
24
<main>
25
26
    <h1>Existing recalls</h1>
27
28
    [% IF Koha.Preference('UseRecalls') %]
29
        [% IF recalls.count %]
30
            <form method="post" action="/cgi-bin/koha/recalls/request.pl">
31
                <input type="hidden" name="op" value="cancel_multiple_recalls">
32
                <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
33
                [% INCLUDE 'recalls.inc' %]
34
                <fieldset class="action">
35
                    <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
36
                </fieldset>
37
            </form>
38
        [% ELSE %]
39
            <div class="dialog message">No recalls have been made.</div>
40
        [% END %]
41
    [% ELSE %]
42
        <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
43
    [% END %]
44
45
</main>
46
</div> <!-- /.col-sm-10.col-sm-push-2 -->
47
48
<div class="col-sm-2 col-sm-pull-10">
49
    <aside>
50
        [% INCLUDE 'biblio-view-menu.inc' %]
51
    </aside>
52
</div> <!-- .col-sm-2.col-sm-pull-10 -->
53
54
</div> <!-- /.row -->
55
</div> <!-- /.main.container-fluid -->
56
57
[% MACRO jsinclude BLOCK %]
58
    [% Asset.js("js/recalls.js") | $raw %]
59
    [% INCLUDE 'datatables.inc' %]
60
    [% INCLUDE 'columns_settings.inc' %]
61
[% END %]
62
63
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +3 lines)
Lines 296-302 Link Here
296
                    </div>
296
                    </div>
297
                [% END %]
297
                [% END %]
298
298
299
                [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
299
                [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted || recall ) %]
300
                    <div class="dialog alert">
300
                    <div class="dialog alert">
301
301
302
                        [% UNLESS ( multi_hold ) %]
302
                        [% UNLESS ( multi_hold ) %]
Lines 316-321 Link Here
316
                                    <li> <strong>No items are available</strong> to be placed on hold.</li>
316
                                    <li> <strong>No items are available</strong> to be placed on hold.</li>
317
                                [% ELSIF ( maxreserves ) %]
317
                                [% ELSIF ( maxreserves ) %]
318
                                    <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> has too many holds.</li>
318
                                    <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> has too many holds.</li>
319
                                [% ELSIF ( recall ) %]
320
                                    <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> has <strong>already placed a recall</strong> on this item.</li>
319
                                [% END # /IF exceeded_maxreserves %]
321
                                [% END # /IF exceeded_maxreserves %]
320
                            </ul>
322
                            </ul>
321
                        [% ELSE # UNLESS multi_hold %]
323
                        [% ELSE # UNLESS multi_hold %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-2 / +12 lines)
Lines 53-58 fieldset.rows label.viewlog { Link Here
53
[%        CASE 'SYSTEMPREFERENCE' %]System prefs
53
[%        CASE 'SYSTEMPREFERENCE' %]System prefs
54
[%        CASE 'CRONJOBS' %]Cron jobs
54
[%        CASE 'CRONJOBS' %]Cron jobs
55
[%        CASE 'REPORTS'      %]Reports
55
[%        CASE 'REPORTS'      %]Reports
56
[%        CASE 'RECALLS'      %]Recalls
56
[%        CASE %][% module | html %]
57
[%        CASE %][% module | html %]
57
[%    END %]
58
[%    END %]
58
[% END %]
59
[% END %]
Lines 75-80 fieldset.rows label.viewlog { Link Here
75
[%        CASE 'DELCIRCMESSAGE' %]Delete circulation message
76
[%        CASE 'DELCIRCMESSAGE' %]Delete circulation message
76
[%        CASE 'STATUS_CHANGE'  %]Change ILL request status
77
[%        CASE 'STATUS_CHANGE'  %]Change ILL request status
77
[%        CASE 'Run'    %]Run
78
[%        CASE 'Run'    %]Run
79
[%        CASE 'FULFILL' %]Fulfill
80
[%        CASE 'OVERDUE' %]Overdue
81
[%        CASE 'EXPIRE'  %]Expire
78
[%        CASE %][% action | html %]
82
[%        CASE %][% action | html %]
79
[%    END %]
83
[%    END %]
80
[% END %]
84
[% END %]
Lines 124-130 fieldset.rows label.viewlog { Link Here
124
                                        [% ELSE %]
128
                                        [% ELSE %]
125
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
129
                                            <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
126
                                        [% END %]
130
                                        [% END %]
127
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS' ] %]
131
                                        [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS' 'REPORTS' 'RECALLS' ] %]
128
                                            [% IF modules.grep(modx).size %]
132
                                            [% IF modules.grep(modx).size %]
129
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
133
                                                <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label>
130
                                            [% ELSE %]
134
                                            [% ELSE %]
Lines 146-152 fieldset.rows label.viewlog { Link Here
146
                                        <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label>
150
                                        <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label>
147
                                    [% END %]
151
                                    [% END %]
148
152
149
                                    [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' ] %]
153
                                    [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'CHANGE PASS' 'Run' 'OVERDUE' 'EXPIRE' 'FULFILL' ] %]
150
                                        [% IF actions.grep(actx).size %]
154
                                        [% IF actions.grep(actx).size %]
151
                                            <label for="action[% actx | html %]" class="viewlog"><input type="checkbox" id="action[% actx | html %]" name="actions" value="[% actx | html %]" checked="checked"> [% PROCESS translate_log_action action=actx %]</label>
155
                                            <label for="action[% actx | html %]" class="viewlog"><input type="checkbox" id="action[% actx | html %]" name="actions" value="[% actx | html %]" checked="checked"> [% PROCESS translate_log_action action=actx %]</label>
152
                                        [% ELSE %]
156
                                        [% ELSE %]
Lines 264-269 fieldset.rows label.viewlog { Link Here
264
                                                    [% ELSE %]
268
                                                    [% ELSE %]
265
                                                        [% loopro.object | html %]
269
                                                        [% loopro.object | html %]
266
                                                    [% END %]
270
                                                    [% END %]
271
                                                [% ELSIF ( loopro.module == 'RECALLS' ) %]
272
                                                    [% IF loopro.recall.item_level_recall %]
273
                                                        Item-level recall on <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.recall.itemnumber | uri %]&amp;biblionumber=[% loopro.recall.biblionumber | uri %]&amp;bi=[% loopro.recall.item.biblioitemnumber | uri %]">item</a>
274
                                                    [% ELSE %]
275
                                                        Biblio-level recall on <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.recall.biblionumber | uri %]">biblio</a>
276
                                                    [% END %]
267
                                                [% ELSE %]
277
                                                [% ELSE %]
268
                                                    [% IF ( loopro.module == 'SERIAL' ) %]
278
                                                    [% IF ( loopro.module == 'SERIAL' ) %]
269
                                                        <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | uri %]">Subscription [% loopro.object | html %] </a>
279
                                                        <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | uri %]">Subscription [% loopro.object | html %] </a>
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-1 / +14 lines)
Lines 331-336 $(document).ready(function() { Link Here
331
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
331
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
332
                        }
332
                        }
333
333
334
                        if ( oObj.recalled == 1 ) {
335
                             title += " - <span class='circ-hlt item-recalled'>This item has been recalled and the due date updated.</span>";
336
                        }
337
334
                        title += " "
338
                        title += " "
335
                              + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
339
                              + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
336
                              + oObj.biblionumber
340
                              + oObj.biblionumber
Lines 419-424 $(document).ready(function() { Link Here
419
423
420
                        if ( oObj.can_renew ) {
424
                        if ( oObj.can_renew ) {
421
                            // Do nothing
425
                            // Do nothing
426
                        } else if ( oObj.can_renew_error == "recalled" ) {
427
                            msg += "<span>"
428
                                    + "<a href='/cgi-bin/koha/recalls/request.pl?biblionumber=" + oObj.biblionumber + "'>" + RECALLED + "</a>"
429
                                    + "</span>";
430
431
                            span_style = "display: none";
432
                            span_class = "renewals-allowed-recalled";
422
                        } else if ( oObj.can_renew_error == "on_reserve" ) {
433
                        } else if ( oObj.can_renew_error == "on_reserve" ) {
423
                            msg += "<span>"
434
                            msg += "<span>"
424
                                    + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
435
                                    + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
Lines 541-547 $(document).ready(function() { Link Here
541
                    "bSortable": false,
552
                    "bSortable": false,
542
                    "bVisible": AllowCirculate ? true : false,
553
                    "bVisible": AllowCirculate ? true : false,
543
                    "mDataProp": function ( oObj ) {
554
                    "mDataProp": function ( oObj ) {
544
                        if ( oObj.can_renew_error == "on_reserve" ) {
555
                        if ( oObj.can_renew_error == "recalled" ) {
556
                            return "<a href='/cgi-bin/koha/recalls/request.pl?biblionumber=" + oObj.biblionumber + "'>" + RECALLED + "</a>";
557
                        } else if ( oObj.can_renew_error == "on_reserve" ) {
545
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>";
558
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>";
546
                        } else {
559
                        } else {
547
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
560
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
(-)a/koha-tmpl/intranet-tmpl/prog/js/recalls.js (+147 lines)
Line 0 Link Here
1
$(document).ready(function() {
2
3
        $(".cancel_recall").click(function(e){
4
            if (confirmDelete(_("Are you sure you want to remove this recall?"))){
5
                var $self = $(this);
6
                var $recall_id = $(this).data('id');
7
                var $action = $(this).data('action');
8
                var ajaxData = {
9
                    'recall_id': $recall_id,
10
                    'action'   : $action,
11
                };
12
13
                $.ajax({
14
                    url: '/cgi-bin/koha/svc/recall',
15
                    type: 'POST',
16
                    dataType: 'json',
17
                    data: ajaxData,
18
                })
19
                .done(function(data) {
20
                    var message = "";
21
                    if(data.success == 0) {
22
                        message = _("The recall may have already been cancelled. Please refresh the page.");
23
                    } else {
24
                        message = _("Cancelled");
25
                    }
26
                    $self.parent().parent().parent().parent().html(message);
27
                });
28
            }
29
        });
30
31
        $(".expire_recall").click(function(e){
32
            if (confirmDelete(_("Are you sure you want to expire this recall?"))){
33
                var $self = $(this);
34
                var $recall_id = $(this).data('id');
35
                var $action = $(this).data('action');
36
                var ajaxData = {
37
                    'recall_id': $recall_id,
38
                    'action'   : $action,
39
                };
40
41
                $.ajax({
42
                    url: '/cgi-bin/koha/svc/recall',
43
                    type: 'POST',
44
                    dataType: 'json',
45
                    data: ajaxData,
46
                })
47
                .done(function(data) {
48
                    var message = "";
49
                    if(data.success == 0) {
50
                        message = _("The recall may have already been expired. Please refresh the page.");
51
                    } else {
52
                        message = _("Expired");
53
                    }
54
                    $self.parent().parent().parent().parent().html(message);
55
                });
56
            }
57
        });
58
59
        $(".revert_recall").click(function(e){
60
            if (confirmDelete(_("Are you sure you want to revert the waiting status of this recall?"))){
61
                var $self = $(this);
62
                var $recall_id = $(this).data('id');
63
                var $action = $(this).data('action');
64
                var ajaxData = {
65
                    'recall_id': $recall_id,
66
                    'action'   : $action,
67
                };
68
69
                $.ajax({
70
                    url: '/cgi-bin/koha/svc/recall',
71
                    type: 'POST',
72
                    dataType: 'json',
73
                    data: ajaxData,
74
                })
75
                .done(function(data) {
76
                    var message = "";
77
                    if(data.success == 0) {
78
                        message = _("The recall waiting status may have already been reverted. Please refresh the page.");
79
                    } else {
80
                        message = _("Status updated");
81
                    }
82
                    $self.parent().parent().parent().parent().html(message);
83
                });
84
            }
85
        });
86
87
        $(".overdue_recall").click(function(e){
88
            if (confirmDelete(_("Are you sure you want to mark this recall as overdue?"))){
89
                var $self = $(this);
90
                var $recall_id = $(this).data('id');
91
                var $action = $(this).data('action');
92
                var ajaxData = {
93
                    'recall_id': $recall_id,
94
                    'action'   : $action,
95
                };
96
97
                $.ajax({
98
                    url: '/cgi-bin/koha/svc/recall',
99
                    type: 'POST',
100
                    dataType: 'json',
101
                    data: ajaxData,
102
                })
103
                .done(function(data) {
104
                    var message = "";
105
                    if(data.success == 0) {
106
                        message = _("The recall may have already been marked as overdue. Please refresh the page.");
107
                    } else {
108
                        message = _("Marked overdue");
109
                    }
110
                    $self.parent().parent().parent().parent().html(message);
111
                });
112
            }
113
        });
114
115
        $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
116
            "aoColumnDefs": [
117
                { 'bSortable': false, 'aTargets': [ 'nosort' ] },
118
                { "sType": "title-string", "aTargets" : [ "title-string" ] },
119
                { "sType": "anti-the", "aTargets": [ "anti-the" ] }
120
            ],
121
            "sPaginationType": "full_numbers"
122
        }));
123
124
        $("#cancel_selected").click(function(e){
125
            if ($("input[name='recall_ids']:checked").length > 0){
126
                return confirmDelete(_("Are you sure you want to remove the selected recall(s)?"));
127
            } else {
128
                alert(_("Please make a selection."));
129
            }
130
        });
131
132
        $("#select_all").click(function(){
133
            if ($("#select_all").prop("checked")){
134
                $("input[name='recall_ids']").prop("checked", true);
135
            } else {
136
                $("input[name='recall_ids']").prop("checked", false);
137
            }
138
        });
139
140
        $("#hide_old").click(function(){
141
            if ($("#hide_old").prop("checked")){
142
                $(".old").show();
143
            } else {
144
                $(".old").hide();
145
            }
146
        });
147
});
(-)a/members/moremember.pl (+2 lines)
Lines 210-215 $template->param( Link Here
210
    relatives_issues_count => $relatives_issues_count,
210
    relatives_issues_count => $relatives_issues_count,
211
    relatives_borrowernumbers => \@relatives,
211
    relatives_borrowernumbers => \@relatives,
212
    logged_in_user => $logged_in_user,
212
    logged_in_user => $logged_in_user,
213
    recalls         => $patron->recalls,
214
    specific_patron => 1,
213
);
215
);
214
216
215
output_html_with_http_headers $input, $cookie, $template->output;
217
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/recallshistory.pl (+47 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
24
my $input = CGI->new;
25
my ($template, $loggedinuser, $cookie)= get_template_and_user(
26
    {
27
       template_name => "members/recallshistory.tt",
28
       query => $input,
29
       type => "intranet",
30
       authnotrequired => 0,
31
       flagsrequired => { recalls => 1 },
32
       debug => 1,
33
    }
34
);
35
36
my $borrowernumber = $input->param('borrowernumber');
37
my $recalls = Koha::Recalls->search({ borrowernumber => $borrowernumber });
38
my $patron = Koha::Patrons->find( $borrowernumber );
39
40
$template->param(
41
        patron          => $patron,
42
        recalls         => $recalls,
43
        recallsview     => 1,
44
        specific_patron => 1,
45
);
46
47
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/recalls/recall_pickup_slip.pl (+74 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
22
use C4::Context;
23
use C4::Output;
24
use C4::Auth;
25
26
my $input = new CGI;
27
28
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
29
    {
30
        template_name   => "circ/printslip.tt",
31
        query           => $input,
32
        type            => "intranet",
33
        authnotrequired => 0,
34
        flagsrequired   => { circulate => "circulate_remaining_permissions" },
35
    }
36
);
37
38
my $recallid = $input->param('recall_id');
39
my $recall = Koha::Recalls->find($recallid);
40
41
my $itemnumber;
42
if ( $recall->itemnumber ){
43
    $itemnumber = $recall->itemnumber;
44
} else {
45
    $itemnumber = $recall->checkout->itemnumber;
46
}
47
48
# Print slip to inform library staff of details of recall requester, so the item can be put aside for requester
49
my $letter = C4::Letters::GetPreparedLetter(
50
    module => 'circulation',
51
    letter_code => 'RECALL_REQUESTER_DET',
52
    message_transport_type => 'print',
53
    tables => {
54
         'branches' => $recall->branchcode,
55
         'borrowers' => $recall->borrowernumber,
56
         'biblio'   => $recall->biblionumber,
57
         'items'   => $itemnumber,
58
         'recalls'  => $recall->recall_id,
59
    }
60
);
61
62
my ($slip, $is_html);
63
if ($letter) {
64
    $slip = $letter->{content};
65
    $is_html = $letter->{is_html};
66
}
67
68
$template->param(
69
    slip => $slip,
70
    plain => !$is_html,
71
    caller => 'recall',
72
);
73
74
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/recalls/recalls_old_queue.pl (+47 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use Koha::BiblioFrameworks;
24
25
my $query = new CGI;
26
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
27
    {
28
      template_name   => "recalls/recalls_old_queue.tt",
29
      query           => $query,
30
      type            => "intranet",
31
      authnotrequired => 0,
32
      flagsrequired   => { recalls => "manage_recalls" },
33
      debug           => 1,
34
    }
35
);
36
37
my $recalls = Koha::Recalls->search({ old => 1 });
38
$template->param(
39
    recalls => $recalls,
40
    viewing_old => 1
41
);
42
43
# Checking if there is a Fast Cataloging Framework
44
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
45
46
# writing the template
47
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/recalls/recalls_overdue.pl (+61 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use Koha::BiblioFrameworks;
24
use Koha::DateUtils;
25
26
my $query = new CGI;
27
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
28
    {
29
       template_name   => "recalls/recalls_overdue.tt",
30
       query           => $query,
31
       type            => "intranet",
32
       authnotrequired => 0,
33
       flagsrequired   => { recalls => "manage_recalls" },
34
       debug           => 1,
35
    }
36
);
37
38
my $op = $query->param('op') || 'list';
39
my @recall_ids = $query->multi_param('recall_ids');
40
41
if ( $op eq 'cancel_multiple_recalls' ) {
42
    foreach my $id ( @recall_ids ) {
43
        Koha::Recalls->find( $id )->set_cancelled;
44
    }
45
    $op = 'list'
46
}
47
48
if ( $op eq 'list' ) {
49
    my $recalls = Koha::Recalls->search({ status => 'O' });
50
    # will be set as Overdue by the misc/cronjobs/recall/overdue_recalls.pl cronjob
51
    $template->param(
52
        recalls => $recalls,
53
        checkboxes => 1,
54
    );
55
}
56
57
# Checking if there is a Fast Cataloging Framework
58
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
59
60
# writing the template
61
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/recalls/recalls_queue.pl (+57 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use Koha::BiblioFrameworks;
24
25
my $query = new CGI;
26
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
27
    {
28
      template_name   => "recalls/recalls_queue.tt",
29
      query           => $query,
30
      type            => "intranet",
31
      authnotrequired => 0,
32
      flagsrequired   => { recalls => 'manage_recalls' },
33
      debug           => 1,
34
    }
35
);
36
37
my $op = $query->param('op') || 'list';
38
my @recall_ids = $query->multi_param('recall_ids');
39
if ( $op eq 'cancel_multiple_recalls' ) {
40
    foreach my $id ( @recall_ids ) {
41
        Koha::Recalls->find( $id )->set_cancelled;
42
    }
43
    $op = 'list'
44
}
45
elsif ( $op eq 'list' ) {
46
    my $recalls = Koha::Recalls->search({ old => undef });
47
    $template->param(
48
        recalls => $recalls,
49
        checkboxes => 1,
50
    );
51
}
52
53
# Checking if there is a Fast Cataloging Framework
54
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
55
56
# writing the template
57
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/recalls/recalls_to_pull.pl (+126 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use Koha::BiblioFrameworks;
24
25
my $query = new CGI;
26
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
27
    {
28
      template_name   => "recalls/recalls_to_pull.tt",
29
      query           => $query,
30
      type            => "intranet",
31
      authnotrequired => 0,
32
      flagsrequired   => { recalls => 'manage_recalls' },
33
      debug           => 1,
34
    }
35
);
36
37
my $op = $query->param('op') || 'list';
38
my $recall_id = $query->param('recall_id');
39
if ( $op eq 'cancel' ) {
40
    my $recall = Koha::Recalls->find( $recall_id );
41
    if ( $recall->in_transit ) {
42
        C4::Items::ModItemTransfer( $recall->item->itemnumber, $recall->item->holdingbranch, $recall->item->homebranch, 'CancelRecall' );
43
    }
44
    $recall->set_cancelled;
45
    $op = 'list';
46
}
47
48
if ( $op eq 'list' ) {
49
    my @recalls = Koha::Recalls->search({ status => [ 'R','O','T' ] });
50
    my @pull_list;
51
    my %seen_bib;
52
    foreach my $recall ( @recalls ) {
53
        if ( $seen_bib{$recall->biblionumber} ){
54
            # we've already looked at the recalls on this biblio
55
            next;
56
        } else {
57
            # this is an unseen biblio
58
            $seen_bib{$recall->biblionumber}++;
59
60
            # get recall data about this biblio
61
            my @this_bib_recalls = Koha::Recalls->search({ biblionumber => $recall->biblionumber, status => [ 'R','O','T' ] }, { order_by => { -asc => 'recalldate' } });
62
            my $recalls_count = scalar @this_bib_recalls;
63
            my @unique_patrons = do { my %seen; grep { !$seen{$_->borrowernumber}++ } @this_bib_recalls };
64
            my $patrons_count = scalar @unique_patrons;
65
            my $first_recall = $this_bib_recalls[0];
66
67
            my $items_count = 0;
68
            my @callnumbers;
69
            my @copynumbers;
70
            my @enumchrons;
71
            my @itemtypes;
72
            my @locations;
73
            my @libraries;
74
75
            my @items = Koha::Items->search({ biblionumber => $recall->biblionumber });
76
            foreach my $item ( @items ) {
77
                if ( $item->can_be_waiting_recall and !$item->checkout ) {
78
                    # if item can be pulled to fulfill recall, collect item data
79
                    $items_count++;
80
                    push( @callnumbers, $item->itemcallnumber ) if ( $item->itemcallnumber );
81
                    push( @copynumbers, $item->copynumber ) if ( $item->copynumber );
82
                    push( @enumchrons, $item->enumchron ) if ( $item->enumchron );
83
                    push( @itemtypes, $item->effective_itemtype ) if ( $item->effective_itemtype );
84
                    push( @locations, $item->location ) if ( $item->location );
85
                    push( @libraries, $item->holdingbranch ) if ( $item->holdingbranch );
86
                }
87
            }
88
89
            if ( $items_count > 0 ) {
90
            # don't push data if there are no items available for this recall
91
92
                # get unique values
93
                my @unique_callnumbers = do { my %seen; grep { !$seen{$_}++ } @callnumbers };
94
                my @unique_copynumbers = do { my %seen; grep { !$seen{$_}++ } @copynumbers };
95
                my @unique_enumchrons = do { my %seen; grep { !$seen{$_}++ } @enumchrons };
96
                my @unique_itemtypes = do { my %seen; grep { !$seen{$_}++ } @itemtypes };
97
                my @unique_locations = do { my %seen; grep { !$seen{$_}++ } @locations };
98
                my @unique_libraries = do { my %seen; grep { !$seen{$_}++ } @libraries };
99
100
                push( @pull_list, {
101
                    biblio => $recall->biblio,
102
                    items_count => $items_count,
103
                    recalls_count => $recalls_count,
104
                    patrons_count => $patrons_count,
105
                    pull_count => $items_count <= $recalls_count ? $items_count : $recalls_count,
106
                    first_recall => $first_recall,
107
                    callnumbers => \@unique_callnumbers,
108
                    copynumbers => \@unique_copynumbers,
109
                    enumchrons => \@unique_enumchrons,
110
                    itemtypes => \@unique_itemtypes,
111
                    locations => \@unique_locations,
112
                    libraries => \@unique_libraries,
113
                });
114
            }
115
        }
116
    }
117
    $template->param(
118
        recalls => \@pull_list,
119
    );
120
}
121
122
# Checking if there is a Fast Cataloging Framework
123
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
124
125
# writing the template
126
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/recalls/recalls_waiting.pl (+76 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use Koha::Recalls;
24
use Koha::BiblioFrameworks;
25
use Koha::DateUtils;
26
use Koha::Patrons;
27
28
my $query = new CGI;
29
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
30
    {
31
        template_name   => "recalls/recalls_waiting.tt",
32
        query           => $query,
33
        type            => "intranet",
34
        authnotrequired => 0,
35
        flagsrequired   => { recalls => "manage_recalls" },
36
        debug           => 1,
37
    }
38
);
39
40
my $op = $query->param('op') || 'list';
41
42
if ( $op eq 'modify' ) {
43
    my $expire = $query->param('expire') || '';
44
    my $revert = $query->param('revert') || '';
45
    my $recall_id = $query->param('recall_id');
46
    if ( $expire ) {
47
        Koha::Recalls->find( $recall_id )->set_expired({ interface => 'INTRANET' });
48
    } elsif ( $revert ) {
49
        Koha::Recalls->find( $recall_id )->revert_waiting;
50
    }
51
    $op = 'list';
52
}
53
54
if ( $op eq 'list' ) {
55
    my @recalls = Koha::Recalls->search({ status => 'W' });
56
    my $borrower = Koha::Patrons->find( $loggedinuser );
57
    my @over;
58
    my $maxdelay = C4::Context->preference('RecallsMaxPickUpDelay') || 7;
59
    my $today = dt_from_string();
60
    foreach my $r ( @recalls ){
61
        my $lastwaitingday = dt_from_string( $r->waitingdate )->add( days => $maxdelay );
62
        if ( $today > $lastwaitingday ){
63
            push @over, $r;
64
        }
65
    }
66
    $template->param(
67
        recalls => \@recalls,
68
        over => \@over,
69
    );
70
}
71
72
# Checking if there is a Fast Cataloging Framework
73
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
74
75
# writing the template
76
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/recalls/request.pl (+65 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
# Koha is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# Koha is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Auth;
22
use C4::Output;
23
use C4::Search;
24
use Koha::Recalls;
25
use Koha::Biblios;
26
27
my $input = CGI->new;
28
my ($template, $loggedinuser, $cookie)= get_template_and_user(
29
    {
30
       template_name => "recalls/request.tt",
31
       query => $input,
32
       type => "intranet",
33
       authnotrequired => 0,
34
       flagsrequired => { recalls => "manage_recalls" },
35
       debug => 1,
36
    }
37
);
38
39
my $op = $input->param('op') || 'list';
40
my @recall_ids = $input->multi_param('recall_ids');
41
my $biblionumber = $input->param('biblionumber');
42
my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber, old => undef });
43
my $biblio = Koha::Biblios->find( $biblionumber );
44
45
if ( $op eq 'cancel_multiple_recalls' ) {
46
    foreach my $id ( @recall_ids ) {
47
        Koha::Recalls->find( $id )->set_cancelled;
48
    }
49
    $op = 'list'
50
}
51
52
if ( $op eq 'list' ) {
53
    $recalls = Koha::Recalls->search({ biblionumber => $biblionumber, old => undef });
54
    $biblio = Koha::Biblios->find( $biblionumber );
55
}
56
57
$template->param(
58
    recalls     => $recalls,
59
    recallsview => 1,
60
    biblio      => $biblio,
61
    checkboxes  => 1,
62
    C4::Search::enabled_staff_search_views,
63
);
64
65
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/reserve/request.pl (+4 lines)
Lines 314-319 foreach my $biblionumber (@biblionumbers) { Link Here
314
                $template->param( $canReserve->{status} => 1 );
314
                $template->param( $canReserve->{status} => 1 );
315
                $biblioloopiter{ $canReserve->{status} } = 1;
315
                $biblioloopiter{ $canReserve->{status} } = 1;
316
            }
316
            }
317
            elsif ( $canReserve->{status} eq 'recall' ) {
318
                $template->param( $canReserve->{status} => 1 );
319
                $biblioloopiter{ $canReserve->{status} } = 1;
320
            }
317
            else {
321
            else {
318
                $biblioloopiter{ $canReserve->{status} } = 1;
322
                $biblioloopiter{ $canReserve->{status} } = 1;
319
            }
323
            }
(-)a/svc/checkouts (+21 lines)
Lines 187-192 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
187
        $damaged = $av->count ? $av->next->lib : '';
187
        $damaged = $av->count ? $av->next->lib : '';
188
    }
188
    }
189
    my @subtitles = split(/ \| /, $c->{'subtitle'} // '' );
189
    my @subtitles = split(/ \| /, $c->{'subtitle'} // '' );
190
191
    my $item = Koha::Items->find( $c->{itemnumber} );
192
    my $recalled = 0;
193
    my $recall = $item->check_recalls if $item->can_be_waiting_recall;
194
    if ( defined $recall ) {
195
        if ( $recall->item_level_recall ) {
196
            if ( $recall->itemnumber == $c->{itemnumber} ) {
197
                # item-level recall on this item
198
                $recalled = 1;
199
            } else {
200
                $recalled = 0;
201
            }
202
        } else {
203
            # biblio-level recall, but don't want to mark recalled if the recall has been allocated a different item
204
            if ( !$recall->waiting ) {
205
                $recalled = 1;
206
            }
207
        }
208
    }
209
190
    my $checkout = {
210
    my $checkout = {
191
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
211
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
192
        title                => $c->{title},
212
        title                => $c->{title},
Lines 254-259 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
254
            cardnumber => $c->{cardnumber},
274
            cardnumber => $c->{cardnumber},
255
        },
275
        },
256
        issued_today => !$c->{not_issued_today},
276
        issued_today => !$c->{not_issued_today},
277
        recalled => $recalled,
257
    };
278
    };
258
279
259
    if ( $c->{not_issued_today} ) {
280
    if ( $c->{not_issued_today} ) {
(-)a/svc/recall (+79 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
19
use Modern::Perl;
20
21
use CGI;
22
use JSON qw(encode_json);
23
24
use C4::Context;
25
use C4::Auth qw(check_cookie_auth);
26
use C4::Output qw(output_with_http_headers);
27
use C4::Circulation qw(AddReturn);
28
use Koha::Recalls;
29
30
my $input = new CGI;
31
my $json = encode_json({ success => 0 });
32
33
my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { recall => 'manage_recalls' } );
34
35
if ( $auth_status ne "ok" ) {
36
    print $input->header(-type => 'text/plain', -status => '403 Forbidden');
37
    exit 0;
38
}
39
40
my $recall_id = $input->param('recall_id');
41
my $recall = Koha::Recalls->find( $recall_id );
42
unless ( $recall ) {
43
    my $json = encode_json({ success => 0 });
44
    output_with_http_headers( $input, undef, $json, "json" );
45
    exit;
46
}
47
48
my $op = $input->param('action');
49
50
if ( $op eq 'cancel' ) {
51
    # cancel recall
52
    $recall->set_cancelled;
53
    if ( $recall->cancelled ){
54
        $json = encode_json({ success => 1 });
55
    }
56
57
} elsif ( $op eq 'expire' ) {
58
    # expire recall
59
    $recall->set_expired({ interface => 'INTRANET' });
60
    if ( $recall->expired ){
61
        $json = encode_json({ success => 1 });
62
    }
63
64
} elsif ( $op eq 'revert' ) {
65
    # revert recall waiting status
66
    $recall->revert_waiting;
67
    if ( $recall->requested ){
68
        $json = encode_json({ success => 1 });
69
    }
70
71
} elsif ( $op eq 'overdue' ) {
72
    # mark recall as overdue
73
    $recall->set_overdue({ interface => 'INTRANET' });
74
    if ( $recall->overdue ){
75
        $json = encode_json({ success => 1 });
76
    }
77
}
78
79
output_with_http_headers( $input, undef, $json, "json" );
(-)a/tools/letter.pl (-1 / +1 lines)
Lines 248-254 sub add_form { Link Here
248
            {value => 'items.fine',    text => 'items.fine'},
248
            {value => 'items.fine',    text => 'items.fine'},
249
            add_fields('borrowers');
249
            add_fields('borrowers');
250
        if ($module eq 'circulation') {
250
        if ($module eq 'circulation') {
251
            push @{$field_selection}, add_fields('opac_news');
251
            push @{$field_selection}, add_fields('opac_news', 'recalls');
252
252
253
        }
253
        }
254
254
(-)a/tools/viewlog.pl (-1 / +10 lines)
Lines 188-193 if ($do_it) { Link Here
188
                }
188
                }
189
            }
189
            }
190
        }
190
        }
191
192
        # get recall information
193
        if ( $log->module eq "RECALLS" ) {
194
            if ( $log->object ) {
195
                my $recall = Koha::Recalls->find( $log->object );
196
                if ( $recall && $output eq 'screen' ) {
197
                    $result->{recall} = $recall;
198
                }
199
            }
200
        }
191
        push @data, $result;
201
        push @data, $result;
192
    }
202
    }
193
    if ( $output eq "screen" ) {
203
    if ( $output eq "screen" ) {
194
- 

Return to bug 19532