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

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

Return to bug 19532