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 / +3 lines)
Lines 410-416 if (@$barcodes) { Link Here
410
        }
410
        }
411
        unless($confirm_required) {
411
        unless($confirm_required) {
412
            my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
412
            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, } );
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, cancel_recall => $session->param('cancel_recall'), recall_id => $session->param('recall_id'), } );
414
            $template_params->{issue} = $issue;
414
            $template_params->{issue} = $issue;
415
            $session->clear('auto_renew');
415
            $session->clear('auto_renew');
416
            $inprocess = 1;
416
            $inprocess = 1;
Lines 456-461 if ($patron) { Link Here
456
    $template->param(
456
    $template->param(
457
        holds_count  => $holds->count(),
457
        holds_count  => $holds->count(),
458
        WaitingHolds => $waiting_holds,
458
        WaitingHolds => $waiting_holds,
459
        recalls => $patron->recalls,
460
        specific_patron => 1,
459
    );
461
    );
460
}
462
}
461
463
(-)a/circ/returns.pl (+64 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 = Koha::Items->find({ barcode => $barcode }) if ( $recall->item_level_recall );
197
198
    if ( $recall->branchcode ne $return_branch ) {
199
        $recall->start_transfer({ item => $item });
200
    } else {
201
        $recall->set_waiting({ item => $item });
202
    }
203
}
204
181
my $borrower;
205
my $borrower;
182
my $returned = 0;
206
my $returned = 0;
183
my $messages;
207
my $messages;
Lines 236-241 if ($dotransfer){ Link Here
236
if ($canceltransfer){
260
if ($canceltransfer){
237
    $itemnumber=$query->param('itemnumber');
261
    $itemnumber=$query->param('itemnumber');
238
    DeleteTransfer($itemnumber);
262
    DeleteTransfer($itemnumber);
263
    my $recall_transfer_deleted = Koha::Recalls->find({ itemnumber => $itemnumber, status => 'T' });
264
    if ( defined $recall_transfer_deleted ) {
265
        $recall_transfer_deleted->revert_transfer;
266
    }
239
    if($dest eq "ttr"){
267
    if($dest eq "ttr"){
240
        print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl");
268
        print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl");
241
        exit;
269
        exit;
Lines 353-358 $template->param( inputloop => \@inputloop ); Link Here
353
my $found    = 0;
381
my $found    = 0;
354
my $waiting  = 0;
382
my $waiting  = 0;
355
my $reserved = 0;
383
my $reserved = 0;
384
my $recalled = 0;
356
385
357
# new op dev : we check if the document must be returned to his homebranch directly,
386
# 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 .
387
#  if the document is transferred, we have warning message .
Lines 469-474 if ( $messages->{'ResFound'}) { Link Here
469
    );
498
    );
470
}
499
}
471
500
501
if ( $messages->{RecallFound} ) {
502
    my $recall = $messages->{RecallFound};
503
    my $transfertodo = $messages->{RecallNeedsTransfer};
504
    $template->param(
505
        found => 1,
506
        recall => $recall,
507
        barcode => $barcode,
508
        recalled => $recall->waiting,
509
        transfertodo => $transfertodo,
510
        recallwaiting => $recall->waiting,
511
    );
512
}
513
514
if ( $messages->{TransferredRecall} ) {
515
    my $recall = $messages->{TransferredRecall};
516
517
    # confirm transfer has arrived at the branch
518
    my $transfer = Koha::Item::Transfers->search({ datearrived => { '!=' => undef }, itemnumber => $recall->itemnumber }, { order_by => { -desc => 'datearrived' } })->next;
519
520
    # if transfer has completed, show popup to confirm as waiting
521
    if ( defined $transfer and $transfer->tobranch eq $recall->branchcode ) {
522
        $template->param(
523
            found => 1,
524
            recall => $recall,
525
            recalled => 1,
526
        );
527
    }
528
}
529
472
# Error Messages
530
# Error Messages
473
my @errmsgloop;
531
my @errmsgloop;
474
foreach my $code ( keys %$messages ) {
532
foreach my $code ( keys %$messages ) {
Lines 541-546 foreach my $code ( keys %$messages ) { Link Here
541
    }
599
    }
542
    elsif ( $code eq 'ReturnClaims' ) {
600
    elsif ( $code eq 'ReturnClaims' ) {
543
        $template->param( ReturnClaims => $messages->{ReturnClaims} );
601
        $template->param( ReturnClaims => $messages->{ReturnClaims} );
602
    } elsif ( $code eq 'RecallFound' ) {
603
        ;
604
    } elsif ( $code eq 'RecallNeedsTransfer' ) {
605
        ;
606
    } elsif ( $code eq 'TransferredRecall' ) {
607
        ;
544
    } else {
608
    } else {
545
        die "Unknown error code $code";    # note we need all the (empty) elsif's above, or we die.
609
        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
610
        # 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/recalls.inc (+129 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
                                        <li><a class="checkin_recall" data-id="[% recall.recall_id | html %]" data-action="checkin"><i class="fa fa-download"></i> Check in and set waiting</a></li>
108
                                    [% ELSIF ( recall.waiting ) %]
109
                                        <li><a class="revert_recall" data-id="[% recall.recall_id | html %]" data-action="revert"><i class="fa fa-undo"></i> Revert waiting</a></li>
110
                                        <li><a class="expire_recall" data-id="[% recall.recall_id | html %]" data-action="expire"><i class="fa fa-times"></i> Expire</a></li>
111
                                    [% END %]
112
                                </ul>
113
                            </div>
114
                        [% END %]
115
                    </td>
116
                    [% END %]
117
118
                </tr>
119
            [% END %]
120
        </tbody>
121
    </table>
122
    [% ELSE %]
123
        [% IF patron.borrowernumber %]
124
            <div class="dialog message">Patron has no current recalls.</div>
125
        [% ELSE %]
126
            <div class="dialog message">There are no recalls to show.</div>
127
        [% END %]
128
    [% END %]
129
</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 (+3 lines)
Lines 622-627 Link Here
622
                                                                    [% IF ( other_items_loo.intransit ) %]
622
                                                                    [% IF ( other_items_loo.intransit ) %]
623
                                                                        (In transit)
623
                                                                        (In transit)
624
                                                                    [% END %]
624
                                                                    [% END %]
625
                                                                    [% IF ( other_items_loo.recalled ) %]
626
                                                                        (Recalled)
627
                                                                    [% END %]
625
                                                                    [% IF ( other_items_loo.onhold ) %]
628
                                                                    [% IF ( other_items_loo.onhold ) %]
626
                                                                        (On hold)
629
                                                                        (On hold)
627
                                                                    [% END %]
630
                                                                    [% 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 hold</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/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_reserves" %]
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="[% barcode | 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_reserves" %]
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="[% barcode | 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 (+14 lines)
Lines 760-765 Link Here
760
                                    </a>
760
                                    </a>
761
                                </li>
761
                                </li>
762
                            [% END %]
762
                            [% END %]
763
764
                            [% IF Koha.Preference('UseRecalls') %]
765
                                <li>
766
                                    <a href="#recalls" id="recalls-tab">
767
                                        [% recalls.count | html %] Recalls
768
                                    </a>
769
                                </li>
770
                            [% END %]
763
                        </ul>
771
                        </ul>
764
772
765
                        [% INCLUDE "checkouts-table.inc" %]
773
                        [% INCLUDE "checkouts-table.inc" %]
Lines 782-787 Link Here
782
                            </div>
790
                            </div>
783
                        [% END %]
791
                        [% END %]
784
792
793
                        [% IF Koha.Preference('UseRecalls') %]
794
                            <div id="recalls">
795
                                [% INCLUDE 'recalls.inc' %]
796
                            </div>
797
                        [% END %]
798
785
                        [% INCLUDE borrower_debarments.inc %]
799
                        [% INCLUDE borrower_debarments.inc %]
786
800
787
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
801
                        [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt (+46 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
[% Asset.css("css/datatables.css") | $raw %]
10
</head>
11
12
<body id="recalls_history" class="pat">
13
    [% INCLUDE 'header.inc' %]
14
    [% INCLUDE 'patron-search.inc' %]
15
16
    <div id="breadcrumbs">
17
        <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
18
        <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo;
19
        Recalls history for [% INCLUDE 'patron-title.inc' %]
20
    </div>
21
    <div class="main container-fluid">
22
        <div class="row">
23
            <div class="col-sm-10 col-sm-push-2">
24
                <main>
25
                    [% INCLUDE 'members-toolbar.inc' %]
26
                    <h1>Recalls history</h1>
27
                    [% IF Koha.Preference('UseRecalls') %]
28
                         [% INCLUDE 'recalls.inc' %]
29
                    [% ELSE %]
30
                         <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>
31
                    [% END %]
32
                </main>
33
            </div>
34
        <div class="col-sm-2 col-sm-pull-10">
35
            <aside>
36
                [% INCLUDE 'circ-menu.inc' %]
37
            </aside>
38
        </div>
39
    </div>
40
41
[% MACRO jsinclude BLOCK %]
42
    [% INCLUDE 'datatables.inc' %]
43
    [% Asset.js("js/recalls.js") | $raw %]
44
[% END %]
45
46
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recall_pickup_slip.tt (+27 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% USE Koha %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Circulation &rsaquo; Recall print receipt</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon | html %][% ELSE %][% interface | html %]/[% theme | html %]/img/favicon.ico[% END %]" type="image/x-icon" />
9
[% Asset.css("css/print.css") | $raw %]
10
[% IF ( Koha.Preference('SlipCSS') ) %]
11
<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') | html %]" />
12
[% END %]
13
14
[% INCLUDE 'slip-print.inc' #printThenClose %]
15
</head>
16
<body id="circ_printslip" class="circ">
17
<div id="receipt">
18
19
[% IF plain %]
20
<pre>
21
[% IF ( slip ) %][% slip | html %][% ELSE %]No slip template found[% END %]
22
</pre>
23
[% ELSE %]
24
[% IF ( slip ) %][% slip | html %][% ELSE %]No slip template found[% END %]
25
[% END %]
26
27
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_old_queue.tt (+58 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
<style type="text/css"> p { margin-top: 0; }</style>
10
[% Asset.css("css/datatables.css") | $raw %]
11
</head>
12
<body id="circ_recalls_old_queue" class="circ">
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
15
16
<div id="breadcrumbs">
17
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
19
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_old_queue.pl">Old recalls</a>
20
</div>
21
22
<div class="main container-fluid">
23
    <div class="row">
24
        [% IF Koha.Preference('CircSidebar') %]
25
            <div class="col-sm-10 col-sm-push-2">
26
        [% ELSE %]
27
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
28
        [% END %]
29
        <main>
30
31
        <h1>Old recalls</h1>
32
        [% IF Koha.Preference('UseRecalls') %]
33
            [% INCLUDE 'recalls.inc' %]
34
        [% ELSE %]
35
            <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>
36
        [% END %]
37
38
        </main>
39
        </div> <!-- /.col-etc -->
40
41
        [% IF Koha.Preference('CircSidebar') %]
42
            <div class="col-sm-2 col-sm-pull-10">
43
                <aside>
44
                    [% INCLUDE 'circ-nav.inc' %]
45
                </aside>
46
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
47
        [% END %]
48
49
    </div> <!-- /.row -->
50
</div>
51
52
[% MACRO jsinclude BLOCK %]
53
    [% INCLUDE 'datatables.inc' %]
54
    [% INCLUDE 'columns_settings.inc' %]
55
    [% Asset.js("js/recalls.js") | $raw %]
56
[% END %]
57
58
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_overdue.tt (+69 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
<style type="text/css"> p { margin-top: 0; }</style>
10
[% Asset.css("css/datatables.css") | $raw %]
11
</head>
12
<body id="circ_overdue_recalls" class="circ">
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
15
16
<div id="breadcrumbs">
17
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
19
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_overdue.pl">Overdue recalls</a>
20
</div>
21
22
<div class="main container-fluid">
23
    <div class="row">
24
        [% IF Koha.Preference('CircSidebar') %]
25
            <div class="col-sm-10 col-sm-push-2">
26
        [% ELSE %]
27
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
28
        [% END %]
29
        <main>
30
31
        <h1>Overdue recalls</h1>
32
        [% IF Koha.Preference('UseRecalls') %]
33
            [% IF recalls.count %]
34
                <form method="post" action="/cgi-bin/koha/recalls/recalls_overdue.pl">
35
                    <input type="hidden" name="op" value="cancel_multiple_recalls">
36
                    <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
37
                    [% INCLUDE 'recalls.inc' %]
38
                    <fieldset class="action">
39
                        <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
40
                    </fieldset>
41
                </form>
42
            [% ELSE %]
43
                <div class="dialog message">There are no recalls to show.</div>
44
            [% END %]
45
        [% ELSE %]
46
            <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>
47
        [% END %]
48
49
        </main>
50
        </div> <!-- /.col-etc -->
51
52
        [% IF Koha.Preference('CircSidebar') %]
53
            <div class="col-sm-2 col-sm-pull-10">
54
                <aside>
55
                    [% INCLUDE 'circ-nav.inc' %]
56
                </aside>
57
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
58
        [% END %]
59
60
    </div> <!-- /.row -->
61
</div>
62
63
[% MACRO jsinclude BLOCK %]
64
    [% INCLUDE 'datatables.inc' %]
65
    [% INCLUDE 'columns_settings.inc' %]
66
    [% Asset.js("js/recalls.js") | $raw %]
67
[% END %]
68
69
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_queue.tt (+69 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
<style type="text/css"> p { margin-top: 0; }</style>
10
[% Asset.css("css/datatables.css") | $raw %]
11
</head>
12
<body id="circ_recalls_queue" class="circ">
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
15
16
<div id="breadcrumbs">
17
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
19
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_queue.pl">Recalls queue</a>
20
</div>
21
22
<div class="main container-fluid">
23
    <div class="row">
24
        [% IF Koha.Preference('CircSidebar') %]
25
            <div class="col-sm-10 col-sm-push-2">
26
        [% ELSE %]
27
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
28
        [% END %]
29
        <main>
30
31
        <h1>Recalls queue</h1>
32
        [% IF Koha.Preference('UseRecalls') %]
33
            [% IF recalls.count %]
34
                <form method="post" action="/cgi-bin/koha/recalls/recalls_queue.pl">
35
                    <input type="hidden" name="op" value="cancel_multiple_recalls">
36
                    <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
37
                    [% INCLUDE 'recalls.inc' %]
38
                    <fieldset class="action">
39
                        <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
40
                    </fieldset>
41
                </form>
42
            [% ELSE %]
43
                <div class="dialog message">There are no recalls to show.</div>
44
            [% END %]
45
        [% ELSE %]
46
            <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>
47
        [% END %]
48
49
        </main>
50
        </div> <!-- /.col-etc -->
51
52
        [% IF Koha.Preference('CircSidebar') %]
53
            <div class="col-sm-2 col-sm-pull-10">
54
                <aside>
55
                    [% INCLUDE 'circ-nav.inc' %]
56
                </aside>
57
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
58
        [% END %]
59
60
    </div> <!-- /.row -->
61
</div>
62
63
[% MACRO jsinclude BLOCK %]
64
    [% INCLUDE 'datatables.inc' %]
65
    [% INCLUDE 'columns_settings.inc' %]
66
    [% Asset.js("js/recalls.js") | $raw %]
67
[% END %]
68
69
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt (+154 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
<style type="text/css"> p { margin-top: 0; }</style>
13
[% Asset.css("css/datatables.css") | $raw %]
14
</head>
15
<body id="circ_recalls_to_pull" class="circ">
16
[% INCLUDE 'header.inc' %]
17
[% INCLUDE 'cat-search.inc' %]
18
19
<div id="breadcrumbs">
20
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
22
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_to_pull.pl">Recalls to pull</a>
23
</div>
24
25
<div class="main container-fluid">
26
    <div class="row">
27
        [% IF Koha.Preference('CircSidebar') %]
28
            <div class="col-sm-10 col-sm-push-2">
29
        [% ELSE %]
30
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
31
        [% END %]
32
        <main>
33
34
        <h1>Recalls to pull</h1>
35
        The following recalls could be fulfilled by available items.
36
37
        [% IF Koha.Preference('UseRecalls') %]
38
            <div id="recalls">
39
                [% IF recalls %]
40
                <table id="recalls-table">
41
                    <thead>
42
                        <tr>
43
                            <th class="recall-topull">Pull this many items</th>
44
                            <th class="recall-items">Items available</th>
45
                            <th class="recall-patrons">Patrons with recalls</th>
46
                            <th class="recall-firstpatron">First patron</th>
47
                            <th class="recall-title anti-the">Title</th>
48
                            <th class="recall-libraries">Libraries</th>
49
                            <th class="recall-callnumbers">Available call numbers</th>
50
                            <th class="recall-copynumbers">Available copy numbers</th>
51
                            <th class="recall-enumeration">Available enumeration</th>
52
                            <th class="recall-itemtypes">Available item types</th>
53
                            <th class="recall-locations">Available locations</th>
54
                            <th class="recall-date title-string">Earliest recall date</th>
55
                            <th class="recall-action nosort">&nbsp;</th>
56
                        </tr>
57
                    </thead>
58
                    <tbody>
59
                        [% FOREACH recall IN recalls %]
60
                        <tr>
61
                            <td class="recall-topull"><b>[% recall.pull_count | html %]</b></td>
62
                            <td class="recall-items">[% recall.items_count | html %]</td>
63
                            <td class="recall-patrons">[% recall.patrons_count | html %]</td>
64
                            <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>
65
                            <td class="recall-title">
66
                                [% INCLUDE 'biblio-default-view.inc' biblionumber=recall.first_recall.biblio.biblionumber %]
67
                                [% INCLUDE 'biblio-title.inc' biblio=recall.first_recall.biblio %]
68
                                [% IF recall.first_recall.biblio.author %] by [% recall.first_recall.biblio.author | html %][% END %]
69
                            </td>
70
                            <td class="recall-libraries">
71
                                <ul>
72
                                    [% FOREACH library IN recall.libraries %]
73
                                        <li>[% Branches.GetName( library ) | html %]</li>
74
                                    [% END %]
75
                                </ul>
76
                            </td>
77
                            <td class="recall-callnumbers">
78
                                <ul>
79
                                    [% FOREACH callnumber IN recall.callnumbers %]
80
                                        <li>[% callnumber | html %]</li>
81
                                    [% END %]
82
                                </ul>
83
                            </td>
84
                            <td class="recall-copynumbers">
85
                                <ul>
86
                                    [% FOREACH copyno IN recall.copynumbers %]
87
                                        <li>[% copyno | html %]</li>
88
                                    [% END %]
89
                                </ul>
90
                            </td>
91
                            <td class="recall-enumeration">
92
                                <ul>
93
                                    [% FOREACH enumchron IN recall.enumchrons %]
94
                                        <li>[% enumchron | html %]</li>
95
                                    [% END %]
96
                                </ul>
97
                            </td>
98
                            <td class="recall-itemtypes">
99
                                <ul>
100
                                    [% FOREACH itemtype IN recall.itemtypes %]
101
                                        <li>[% ItemTypes.GetDescription( itemtype ) | html %]</li>
102
                                    [% END %]
103
                                </ul>
104
                            </td>
105
                            <td class="recall-locations">
106
                                <ul>
107
                                    [% FOREACH loc IN recall.locations %]
108
                                        <li>[% AuthorisedValues.GetByCode('LOC', loc) | html %]</li>
109
                                    [% END %]
110
                                </ul>
111
                            </td>
112
                            <td class="recall-date">
113
                                <span title="[% recall.first_recall.recalldate | html %]">[% recall.first_recall.recalldate | $KohaDates %] in [% recall.first_recall.library.branchname | html %]</span>
114
                            </td>
115
                            <td class="recall-action">
116
                                <form action="/cgi-bin/koha/recalls/recalls_to_pull.pl" method="post">
117
                                    <input type="hidden" name="op" value="cancel">
118
                                    <input type="hidden" name="recall_id" value="[% recall.first_recall.recall_id | html %]">
119
                                    <input type="submit" value="Cancel recall">
120
                                </form>
121
                            </td>
122
                        </tr>
123
                        [% END %]
124
                    </tbody>
125
                </table>
126
                [% ELSE %]
127
                    <div class="dialog message">There are no recalls to pull.</div>
128
                [% END %]
129
            </div>
130
        [% ELSE %]
131
            <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>
132
        [% END %]
133
134
        </main>
135
        </div> <!-- /.col-etc -->
136
137
        [% IF Koha.Preference('CircSidebar') %]
138
            <div class="col-sm-2 col-sm-pull-10">
139
                <aside>
140
                    [% INCLUDE 'circ-nav.inc' %]
141
                </aside>
142
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
143
        [% END %]
144
145
    </div> <!-- /.row -->
146
</div>
147
148
[% MACRO jsinclude BLOCK %]
149
    [% INCLUDE 'datatables.inc' %]
150
    [% INCLUDE 'columns_settings.inc' %]
151
    [% Asset.js("js/recalls.js") | $raw %]
152
[% END %]
153
154
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt (+182 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
<style type="text/css"> p { margin-top: 0; }</style>
10
[% Asset.css("css/datatables.css") | $raw %]
11
</head>
12
<body id="circ_recalls_awaiting_pickup" class="circ">
13
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'cat-search.inc' %]
15
16
<div id="breadcrumbs">
17
    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18
    &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
19
    &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_waiting.pl">Recalls awaiting pickup</a>
20
</div>
21
22
<div class="main container-fluid">
23
    <div class="row">
24
        [% IF Koha.Preference('CircSidebar') %]
25
            <div class="col-sm-10 col-sm-push-2">
26
        [% ELSE %]
27
            <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
28
        [% END %]
29
        <main>
30
                <h1>Recalls awaiting pickup</h1>
31
32
                [% IF Koha.Preference('UseRecalls') %]
33
34
                <div id="results" class="toptabs">
35
36
                    <ul>
37
                        <li><a href="#recallswaiting">Recalls waiting: [% recalls.count | html %]</a></li>
38
                        <li><a href="#recallsover">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a></li>
39
                    </ul>
40
41
                    <div id="recallswaiting">
42
                        [% IF ( recalls ) %]
43
                            <table id="recallswaiting-table">
44
                                <thead><tr>
45
                                    <th class="recall-waitingdate title-string">Available since</th>
46
                                    <th class="recall-title anti-the">Title</th>
47
                                    <th class="recall-patron">Requested by</th>
48
                                    <th class="recall-library">Pickup location</th>
49
                                    <th class="recall-action nosort">&nbsp;</th>
50
                                </tr></thead>
51
                                <tbody>
52
                                    [% FOREACH recall IN recalls %]<tr>
53
                                        <td class="recall-waitingdate">[% recall.waitingdate | $KohaDates %]</td>
54
                                        <td class="recall-title">
55
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | uri %]">
56
                                                [% recall.biblio.title | html %]
57
                                                [% FOREACH s IN recall.biblio.subtitle %]
58
                                                    [% s | html %]
59
                                                [% END %]
60
                                            </a>
61
                                            [% recall.biblio.author | html %]
62
                                            <br><i>Barcode: [% recall.item.barcode | html %]</i>
63
                                        </td>
64
                                        <td class="recall-patron">
65
                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.borrowernumber | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
66
                                             [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
67
                                             [% 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 %]
68
                                        </td>
69
                                        <td class="recall-library">[% recall.library.branchname | html %]</td>
70
                                        <td class="recall-action actions">
71
                                            <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
72
                                                <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
73
                                                <input type="hidden" name="op" value="modify">
74
                                                <fieldset class="action">
75
                                                    <input type="submit" name="expire" class="expire_recall" value="Expire recall">
76
                                                    <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
77
                                                </fieldset>
78
                                            </form>
79
                                        </td>
80
                                    </tr>[% END %]
81
                                </tbody>
82
                            </table>
83
                        [% ELSE %]
84
                            <div class="dialog message">There are no recalls to show.</div>
85
                        [% END %]
86
                    </div> <!-- recallswaiting -->
87
88
                    <div id="recallsover">
89
                        [% IF ( over.size ) %]
90
                            [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
91
                            <table id="recallsover-table">
92
                                <thead><tr>
93
                                    <th class="recall-waitingdate title-string">Available since</th>
94
                                    <th class="recall-title anti-the">Title</th>
95
                                    <th class="recall-patron">Requested by</th>
96
                                    <th class="recall-library">Pickup location</th>
97
                                    <th class="recall-action nosort">&nbsp;</th>
98
                                </tr></thead>
99
                                <tbody>
100
                                    [% FOREACH recall IN over %]<tr>
101
                                        <td class="recall-waitingdate">[% recall.waitingdate | $KohaDates %]</td>
102
                                        <td class="recall-title">
103
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber | uri %]">
104
                                                [% recall.biblio.title | html %]
105
                                                [% FOREACH s IN recall.biblio.subtitles %]
106
                                                    [% s | html %]
107
                                                [% END %]
108
                                                [% recall.item.enumchron | html %]
109
                                            </a>
110
                                            [% recall.biblio.author | html %]
111
                                            <br><i>Barcode: [% recall.item.barcode | html %]</i>
112
                                        </td>
113
                                        <td class="recall-patron">
114
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.borrowernumber | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
115
                                            [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
116
                                            [% 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 %]
117
                                        </td>
118
                                        <td class="recall-library">[% recall.library.branchname | html %]</td>
119
                                        <td class="recall-action actions">
120
                                            <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
121
                                                <input type="hidden" name="recall_id" value="[% recall.recall_id | html %]">
122
                                                <input type="hidden" name="op" value="modify">
123
                                                <fieldset class="action">
124
                                                    <input type="submit" name="expire" class="expire_recall" value="Expire recall">
125
                                                    <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
126
                                                </fieldset>
127
                                            </form>
128
                                        </td>
129
                                    </tr>[% END %]
130
                                </tbody>
131
                            </table>
132
                        [% ELSE %]
133
                            <div class="dialog message">There are no recalls to show.</div>
134
                        [% END %]
135
                    </div> <!-- recallsover -->
136
137
                </div> <!-- results-->
138
139
                [% ELSE %]
140
                    <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>
141
                [% END %] <!-- Koha.Preference('UseRecalls') -->
142
143
        </main>
144
        </div> <!-- /.col-etc -->
145
146
        [% IF Koha.Preference('CircSidebar') %]
147
            <div class="col-sm-2 col-sm-pull-10">
148
                <aside>
149
                    [% INCLUDE 'circ-nav.inc' %]
150
                </aside>
151
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
152
        [% END %]
153
154
    </div> <!-- /.row -->
155
</div>
156
157
[% MACRO jsinclude BLOCK %]
158
    [% INCLUDE 'datatables.inc' %]
159
    <script type="text/javascript">
160
        $(document).ready(function() {
161
            $('#results').tabs();
162
163
            $("#recallswaiting-table, #recallsover-table").dataTable($.extend(true, {}, dataTablesDefaults, {
164
                "autoWidth": false,
165
                "aoColumnDefs": [
166
                    { 'bSortable': false, 'aTargets': [ 'nosort' ] },
167
                ],
168
                "sPaginationType": "full_numbers"
169
            }));
170
171
            $(".revert_recall").click(function(e) {
172
                return confirmDelete(_("Are you sure you want to revert this recall's status from Waiting?"));
173
            });
174
175
            $(".expire_recall").click(function(e) {
176
                return confirmDelete(_("Are you sure you want to remove this recall?"));
177
            });
178
        });
179
    </script>
180
[% END %]
181
182
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt (+67 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
[% Asset.css("css/datatables.css") | $raw %]
10
</head>
11
<body id="recalls-request" class="catalog">
12
[% INCLUDE 'header.inc' %]
13
[% INCLUDE 'circ-search.inc' %]
14
15
<div id="breadcrumbs">
16
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
17
    <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo;
18
    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">[% biblio.title | html %]</a> &rsaquo;
19
    Confirm recalls on [% biblio.title | html %]
20
</div>
21
22
<div class="main container-fluid">
23
<div class="row">
24
<div class="col-sm-10 col-sm-push-2">
25
<main>
26
27
    <h1>Existing recalls</h1>
28
29
    [% IF Koha.Preference('UseRecalls') %]
30
        [% IF recalls.count %]
31
            <form method="post" action="/cgi-bin/koha/recalls/request.pl">
32
                <input type="hidden" name="op" value="cancel_multiple_recalls">
33
                <input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span>
34
                [% INCLUDE 'recalls.inc' %]
35
                <fieldset class="action">
36
                    <button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button>
37
                </fieldset>
38
            </form>
39
        [% ELSE %]
40
            <div class="dialog message">No recalls have been made.</div>
41
        [% END %]
42
    [% ELSE %]
43
        <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>
44
    [% END %]
45
46
</main>
47
</div> <!-- /.col-sm-10.col-sm-push-2 -->
48
49
<div class="col-sm-2 col-sm-pull-10">
50
    <aside>
51
        [% INCLUDE 'biblio-view-menu.inc' %]
52
    </aside>
53
</div> <!-- .col-sm-2.col-sm-pull-10 -->
54
55
</div> <!-- /.row -->
56
</div> <!-- /.main.container-fluid -->
57
58
[% MACRO jsinclude BLOCK %]
59
    [% Asset.js("js/recalls.js") | $raw %]
60
    [% INCLUDE 'datatables.inc' %]
61
    <script type="text/javascript">
62
        $(document).ready(function(){
63
            $(".old").hide();
64
        });
65
    </script>
66
[% END %]
67
[% 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 (+155 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
        $(".checkin_recall").click(function(e){
32
            if (confirmDelete(_("Are you sure you want to check in this item and confirm the recall as 'waiting'?"))){
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 checked in. Please refresh the page.");
51
                    } else {
52
                        message = _("Completed");
53
                    }
54
                    $self.parent().parent().parent().parent().html(message);
55
                });
56
            }
57
        });
58
59
        $(".expire_recall").click(function(e){
60
            if (confirmDelete(_("Are you sure you want to expire 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 may have already been expired. Please refresh the page.");
79
                    } else {
80
                        message = _("Expired");
81
                    }
82
                    $self.parent().parent().parent().parent().html(message);
83
                });
84
            }
85
        });
86
87
        $(".revert_recall").click(function(e){
88
            if (confirmDelete(_("Are you sure you want to revert the waiting status of this recall?"))){
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 waiting status may have already been reverted. Please refresh the page.");
107
                    } else {
108
                        message = _("Status updated");
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
        $("#expire_selected").click(function(e){
133
            if ($("input[name='recall_ids']:checked").length > 0){
134
                return confirmDelete(_("Are you sure you want to expire the selected recall(s)?"));
135
            } else {
136
                alert(_("Please make a selection."));
137
            }
138
        });
139
140
        $("#select_all").click(function(){
141
            if ($("#select_all").prop("checked")){
142
                $("input[name='recall_ids']").prop("checked", true);
143
            } else {
144
                $("input[name='recall_ids']").prop("checked", false);
145
            }
146
        });
147
148
        $("#hide_old").click(function(){
149
            if ($("#hide_old").prop("checked")){
150
                $(".old").show();
151
            } else {
152
                $(".old").hide();
153
            }
154
        });
155
});
(-)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 (+78 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 C4::Context;
22
use C4::Output;
23
use CGI qw ( -utf8 );
24
use C4::Auth qw/:DEFAULT get_session/;
25
use vars qw($debug);
26
27
BEGIN {
28
    $debug = $ENV{DEBUG} || 0;
29
}
30
31
my $input = new CGI;
32
my $sessionID = $input->cookie("CGISESSID");
33
my $session = get_session($sessionID);
34
35
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
36
    {
37
        template_name   => "recalls/recall_pickup_slip.tt",
38
        query           => $input,
39
        type            => "intranet",
40
        authnotrequired => 0,
41
        flagsrequired   => { circulate => "circulate_remaining_permissions" },
42
        debug           => $debug,
43
    }
44
);
45
46
my $recallid = $input->param('recall_id');
47
my $recall = Koha::Recalls->find($recallid);
48
49
my $itemnumber;
50
if ( $recall->itemnumber ){
51
    $itemnumber = $recall->itemnumber;
52
} else {
53
    $itemnumber = $recall->checkout->itemnumber;
54
}
55
56
# Print slip to inform library staff of details of recall requester, so the item can be put aside for requester
57
my $letter = C4::Letters::GetPreparedLetter (
58
    module => 'circulation',
59
    letter_code => 'RECALL_REQUESTER_DET',
60
    tables => {
61
         'branches' => $recall->branchcode,
62
         'borrowers' => $recall->borrowernumber,
63
         'biblio'   => $recall->biblionumber,
64
         'items'   => $itemnumber,
65
         'recalls'  => $recall->recall_id,
66
    }
67
);
68
69
my ($slip, $is_html);
70
if ($letter) {
71
    $slip = $letter->{content};
72
    $is_html = $letter->{is_html};
73
}
74
75
$template->param( slip => $slip ) if ($slip);
76
$template->param( plain => !$is_html );
77
78
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 (+117 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
    Koha::Recalls->find( $recall_id )->set_cancelled;
41
    $op = 'list';
42
}
43
if ( $op eq 'list' ) {
44
    my @recalls = Koha::Recalls->search({ status => [ 'R','O' ] });
45
    my @pull_list;
46
    my %seen_bib;
47
    foreach my $recall ( @recalls ) {
48
        if ( $seen_bib{$recall->biblionumber} ){
49
            # we've already looked at the recalls on this biblio
50
            next;
51
        } else {
52
            # this is an unseen biblio
53
            $seen_bib{$recall->biblionumber}++;
54
55
            # get recall data about this biblio
56
            my @this_bib_recalls = Koha::Recalls->search({ biblionumber => $recall->biblionumber, status => [ 'R','O' ] }, { order_by => { -asc => 'recalldate' } });
57
            my $recalls_count = scalar @this_bib_recalls;
58
            my @unique_patrons = do { my %seen; grep { !$seen{$_->borrowernumber}++ } @this_bib_recalls };
59
            my $patrons_count = scalar @unique_patrons;
60
            my $first_recall = $this_bib_recalls[0];
61
62
            my $items_count;
63
            my @callnumbers;
64
            my @copynumbers;
65
            my @enumchrons;
66
            my @itemtypes;
67
            my @locations;
68
            my @libraries;
69
70
            my @items = Koha::Items->search({ biblionumber => $recall->biblionumber });
71
            foreach my $item ( @items ) {
72
                if ( $item->can_be_waiting_recall ) {
73
                    # if item can be pulled to fulfill recall, collect item data
74
                    $items_count++;
75
                    push( @callnumbers, $item->itemcallnumber ) if ( $item->itemcallnumber );
76
                    push( @copynumbers, $item->copynumber ) if ( $item->copynumber );
77
                    push( @enumchrons, $item->enumchron ) if ( $item->enumchron );
78
                    push( @itemtypes, $item->effective_itemtype ) if ( $item->effective_itemtype );
79
                    push( @locations, $item->location ) if ( $item->location );
80
                    push( @libraries, $item->holdingbranch ) if ( $item->holdingbranch );
81
                }
82
            }
83
84
            # get unique values
85
            my @unique_callnumbers = do { my %seen; grep { !$seen{$_}++ } @callnumbers };
86
            my @unique_copynumbers = do { my %seen; grep { !$seen{$_}++ } @copynumbers };
87
            my @unique_enumchrons = do { my %seen; grep { !$seen{$_}++ } @enumchrons };
88
            my @unique_itemtypes = do { my %seen; grep { !$seen{$_}++ } @itemtypes };
89
            my @unique_locations = do { my %seen; grep { !$seen{$_}++ } @locations };
90
            my @unique_libraries = do { my %seen; grep { !$seen{$_}++ } @libraries };
91
92
            push( @pull_list, {
93
                biblio => $recall->biblio,
94
                items_count => $items_count,
95
                recalls_count => $recalls_count,
96
                patrons_count => $patrons_count,
97
                pull_count => $items_count <= $recalls_count ? $items_count : $recalls_count,
98
                first_recall => $first_recall,
99
                callnumbers => \@unique_callnumbers,
100
                copynumbers => \@unique_copynumbers,
101
                enumchrons => \@unique_enumchrons,
102
                itemtypes => \@unique_itemtypes,
103
                locations => \@unique_locations,
104
                libraries => \@unique_libraries,
105
            });
106
        }
107
    }
108
    $template->param(
109
        recalls => \@pull_list,
110
    );
111
}
112
113
# Checking if there is a Fast Cataloging Framework
114
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
115
116
# writing the template
117
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 (+63 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
} else {
51
    $recalls = Koha::Recalls->search({ biblionumber => $biblionumber, old => undef });
52
    $biblio = Koha::Biblios->find( $biblionumber );
53
}
54
55
$template->param(
56
    recalls     => $recalls,
57
    recallsview => 1,
58
    biblio      => $biblio,
59
    checkboxes  => 1,
60
    C4::Search::enabled_staff_search_views,
61
);
62
63
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 (+96 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 along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use CGI;
23
use JSON qw(encode_json);
24
25
use C4::Context;
26
use C4::Auth qw(check_cookie_auth);
27
use C4::Output qw(output_with_http_headers);
28
use C4::Circulation qw(AddReturn);
29
use Koha::Recalls;
30
31
my $input = new CGI;
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
} elsif ( $op eq 'checkin' ) {
54
    # check in recall and set to waiting
55
    my $branch = $input->param('branchcode');
56
    my $item;
57
    if ( $recall->item_level_recall ) {
58
        $item = $recall->item;
59
    } elsif ( $recall->checkout ) {
60
        # biblio-level recall with a relevant item that is still checked out to another borrower
61
       $item = $recall->checkout->item;
62
    } else {
63
        # biblio-level recall with no items checked out, so take the first available and recallable item
64
        my @items = Koha::Items->search({ biblionumber => $recall->biblionumber });
65
        foreach ( @items ) {
66
            if ( $_->can_be_waiting_recall ){
67
                $item = $_;
68
                last;
69
            }
70
        }
71
    }
72
73
    my $barcode = $item->barcode;
74
75
    my ( $result, $messages ) = AddReturn( $barcode, $branch );
76
77
    foreach my $code ( %$messages ) {
78
        if ( $code eq 'RecallFound' ) {
79
            my $expirationdate = $recall->calc_expirationdate;
80
            if ( $recall->item_level_recall ) {
81
                $recall->set_waiting({ expirationdate => $expirationdate });
82
            } else {
83
                $recall->set_waiting({ expirationdate => $expirationdate, item => $item });
84
            }
85
        }
86
    }
87
} elsif ( $op eq 'expire' ) {
88
    # expire recall
89
    $recall->set_expired({ interface => 'INTRANET' });
90
} elsif ( $op eq 'revert' ) {
91
    # revert recall waiting status
92
    $recall->revert_waiting;
93
}
94
95
my $json = encode_json({ success => 1 });
96
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