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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-15 / +15 lines)
Lines 47-53 Link Here
47
                                        [% FOREACH RECALL IN RECALLS %]
47
                                        [% FOREACH RECALL IN RECALLS %]
48
                                            <tr>
48
                                            <tr>
49
                                                <td class="title">
49
                                                <td class="title">
50
                                                    <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">
50
                                                    <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">
51
                                                         [% RECALL.biblio.title | html %]
51
                                                         [% RECALL.biblio.title | html %]
52
                                                         [% FOREACH s IN RECALL.biblio.subtitle %]
52
                                                         [% FOREACH s IN RECALL.biblio.subtitle %]
53
                                                            [% s | html %]
53
                                                            [% s | html %]
Lines 55-73 Link Here
55
                                                    </a>
55
                                                    </a>
56
                                                    [% RECALL.biblio.author | html %]
56
                                                    [% RECALL.biblio.author | html %]
57
                                                </td>
57
                                                </td>
58
                                                <td class="recalldate" data-order="[% RECALL.recalldate | html %]">
58
                                                <td class="recalldate" data-order="[% RECALL.created_date | html %]">
59
                                                    <span title="[% RECALL.recalldate | html %]">
59
                                                    <span title="[% RECALL.created_date | html %]">
60
                                                        <span class="tdlabel">Recall date:</span>
60
                                                        <span class="tdlabel">Recall date:</span>
61
                                                            [% RECALL.recalldate | $KohaDates %]
61
                                                            [% RECALL.created_date | $KohaDates %]
62
                                                    </span>
62
                                                    </span>
63
                                                </td>
63
                                                </td>
64
                                                <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
64
                                                <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
65
                                                        [% IF ( RECALL.expirationdate ) %]
65
                                                        [% IF ( RECALL.expiration_date ) %]
66
                                                            <span title="[% RECALL.expirationdate | html %]">
66
                                                            <span title="[% RECALL.expiration_date | html %]">
67
                                                                <span class="tdlabel">Expiration:</span>
67
                                                                <span class="tdlabel">Expiration:</span>
68
                                                                [% RECALL.expirationdate | $KohaDates %]
68
                                                                [% RECALL.expiration_date | $KohaDates %]
69
                                                            </span>
69
                                                            </span>
70
                                                        [% ELSIF ( !RECALL.old ) %]
70
                                                        [% ELSIF ( !RECALL.completed ) %]
71
                                                            <span title="0000-00-00">
71
                                                            <span title="0000-00-00">
72
                                                                <span class="tdlabel">Expiration:</span>
72
                                                                <span class="tdlabel">Expiration:</span>
73
                                                                    Never expires
73
                                                                    Never expires
Lines 89-97 Link Here
89
                                                        [% ELSIF ( RECALL.overdue ) %]
89
                                                        [% ELSIF ( RECALL.overdue ) %]
90
                                                            Overdue to be returned
90
                                                            Overdue to be returned
91
                                                        [% ELSIF ( RECALL.expired ) %]
91
                                                        [% ELSIF ( RECALL.expired ) %]
92
                                                            Expired on [% RECALL.expirationdate | $KohaDates %]
92
                                                            Expired on [% RECALL.expiration_date | $KohaDates %]
93
                                                        [% ELSIF ( RECALL.cancelled ) %]
93
                                                        [% ELSIF ( RECALL.cancelled ) %]
94
                                                            Cancelled on [% RECALL.cancellationdate | $KohaDates %]
94
                                                            Cancelled on [% RECALL.completed_date | $KohaDates %]
95
                                                        [% ELSIF ( RECALL.fulfilled ) %]
95
                                                        [% ELSIF ( RECALL.fulfilled ) %]
96
                                                            Fulfilled
96
                                                            Fulfilled
97
                                                        [% ELSE %]
97
                                                        [% ELSE %]
Lines 102-109 Link Here
102
                                                        <span class="tdlabel">Due date</span>
102
                                                        <span class="tdlabel">Due date</span>
103
                                                        [% IF ( RECALL.requested ) %]
103
                                                        [% IF ( RECALL.requested ) %]
104
                                                            Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
104
                                                            Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
105
                                                        [% ELSIF ( RECALL.waiting and RECALL.expirationdate ) %]
105
                                                        [% ELSIF ( RECALL.waiting and RECALL.expiration_date ) %]
106
                                                            Pick up by [% RECALL.expirationdate | $KohaDates %]
106
                                                            Pick up by [% RECALL.expiration_date | $KohaDates %]
107
                                                        [% ELSE %]
107
                                                        [% ELSE %]
108
                                                            -
108
                                                            -
109
                                                        [% END %]
109
                                                        [% END %]
Lines 113-120 Link Here
113
                                                        [% IF ( RECALL.requested or RECALL.overdue ) %]
113
                                                        [% IF ( RECALL.requested or RECALL.overdue ) %]
114
                                                            <form action="/cgi-bin/koha/opac-recall.pl" method="post">
114
                                                            <form action="/cgi-bin/koha/opac-recall.pl" method="post">
115
                                                                <input type="hidden" name="op" value="cancel">
115
                                                                <input type="hidden" name="op" value="cancel">
116
                                                                <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
116
                                                                <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
117
                                                                <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
117
                                                                <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
118
                                                                <input type="submit" name="submit" class="btn btn-danger cancel_recall" value="Cancel">
118
                                                                <input type="submit" name="submit" class="btn btn-danger cancel_recall" value="Cancel">
119
                                                            </form>
119
                                                            </form>
120
                                                        [% END %]
120
                                                        [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-10 / +10 lines)
Lines 767-785 Link Here
767
                                        [% FOREACH RECALL IN RECALLS %]
767
                                        [% FOREACH RECALL IN RECALLS %]
768
                                        <tr>
768
                                        <tr>
769
                                            <td class="title">
769
                                            <td class="title">
770
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level_recall %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
770
                                                <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
771
                                            </td>
771
                                            </td>
772
                                            <td class="recalldate" data-order="[% RECALL.recalldate | html %]">
772
                                            <td class="recalldate" data-order="[% RECALL.created_date | html %]">
773
                                                <span title="[% RECALL.recalldate | html %]">
773
                                                <span title="[% RECALL.created_date | html %]">
774
                                                    <span class="tdlabel">Recall date:</span>
774
                                                    <span class="tdlabel">Recall date:</span>
775
                                                    [% RECALL.recalldate | $KohaDates %]
775
                                                    [% RECALL.created_date | $KohaDates %]
776
                                                </span>
776
                                                </span>
777
                                            </td>
777
                                            </td>
778
                                            <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
778
                                            <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
779
                                                [% IF ( RECALL.expirationdate ) %]
779
                                                [% IF ( RECALL.expiration_date ) %]
780
                                                    <span title="[% RECALL.expirationdate | html %]">
780
                                                    <span title="[% RECALL.expiration_date | html %]">
781
                                                        <span class="tdlabel">Expiration:</span>
781
                                                        <span class="tdlabel">Expiration:</span>
782
                                                        [% RECALL.expirationdate | $KohaDates %]
782
                                                        [% RECALL.expiration_date | $KohaDates %]
783
                                                    </span>
783
                                                    </span>
784
                                                [% ELSE %]
784
                                                [% ELSE %]
785
                                                    <span title="0000-00-00">
785
                                                    <span title="0000-00-00">
Lines 808-815 Link Here
808
                                                [% IF ( RECALL.requested or RECALL.overdue ) %]
808
                                                [% IF ( RECALL.requested or RECALL.overdue ) %]
809
                                                    <form action="/cgi-bin/koha/opac-recall.pl" method="post">
809
                                                    <form action="/cgi-bin/koha/opac-recall.pl" method="post">
810
                                                        <input type="hidden" name="op" value="cancel">
810
                                                        <input type="hidden" name="op" value="cancel">
811
                                                        <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
811
                                                        <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
812
                                                        <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
812
                                                        <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
813
                                                        <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
813
                                                        <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
814
                                                    </form>
814
                                                    </form>
815
                                                [% END %]
815
                                                [% END %]
(-)a/opac/opac-detail.pl (-3 / +3 lines)
Lines 735-743 if ( not $viewallitems and @items > $max_items_to_display ) { Link Here
735
    if ( C4::Context->preference('UseRecalls') ) {
735
    if ( C4::Context->preference('UseRecalls') ) {
736
        my $recall_status = Koha::Recalls->search(
736
        my $recall_status = Koha::Recalls->search(
737
            {
737
            {
738
                itemnumber => $itm->{itemnumber},
738
                item_id   => $itm->{itemnumber},
739
                status     => 'waiting',
739
                status    => 'waiting',
740
                old        => undef,
740
                completed => undef,
741
            }
741
            }
742
        )->count;
742
        )->count;
743
    }
743
    }
(-)a/opac/opac-recall.pl (-1 / +1 lines)
Lines 46-52 if ( C4::Context->preference('UseRecalls') ) { Link Here
46
    my $items = Koha::Items->search({ biblionumber => $biblionumber })->as_list;
46
    my $items = Koha::Items->search({ biblionumber => $biblionumber })->as_list;
47
47
48
    # check if already recalled
48
    # check if already recalled
49
    my $recalled = $biblio->recalls->filter_by_current->search({ borrowernumber => $borrowernumber })->count;
49
    my $recalled = $biblio->recalls->filter_by_current->search({ patron_id => $borrowernumber })->count;
50
    if ( defined $recalled and $recalled > 0 ) {
50
    if ( defined $recalled and $recalled > 0 ) {
51
        my $recalls_per_record = Koha::CirculationRules->get_effective_rule({
51
        my $recalls_per_record = Koha::CirculationRules->get_effective_rule({
52
            categorycode => $patron->categorycode,
52
            categorycode => $patron->categorycode,
(-)a/opac/opac-recalls.pl (-1 / +1 lines)
Lines 32-38 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
32
   }
32
   }
33
);
33
);
34
34
35
my $recalls = Koha::Recalls->search({ borrowernumber => $borrowernumber }, { order_by => { -desc => 'recalldate' } });
35
my $recalls = Koha::Recalls->search({ patron_id => $borrowernumber }, { order_by => { -desc => 'created_date' } });
36
$template->param(
36
$template->param(
37
     RECALLS => $recalls,
37
     RECALLS => $recalls,
38
     recallsview => 1
38
     recallsview => 1
(-)a/opac/opac-user.pl (-3 / +2 lines)
Lines 309-315 if ( $pending_checkouts->count ) { # Useless test Link Here
309
                }
309
                }
310
310
311
        if ( C4::Context->preference('UseRecalls') ) {
311
        if ( C4::Context->preference('UseRecalls') ) {
312
            my $maybe_recalls = Koha::Recalls->search({ biblionumber => $issue->{biblionumber}, itemnumber => [ undef, $issue->{itemnumber} ], old => 0 });
312
            my $maybe_recalls = Koha::Recalls->search({ biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 });
313
            while( my $recall = $maybe_recalls->next ) {
313
            while( my $recall = $maybe_recalls->next ) {
314
                if ( $recall->checkout and $recall->checkout->issue_id == $issue->{issue_id} ) {
314
                if ( $recall->checkout and $recall->checkout->issue_id == $issue->{issue_id} ) {
315
                    $issue->{recall} = 1;
315
                    $issue->{recall} = 1;
Lines 345-351 $template->param( Link Here
345
);
345
);
346
346
347
if ( C4::Context->preference('UseRecalls') ) {
347
if ( C4::Context->preference('UseRecalls') ) {
348
    my $recalls = Koha::Recalls->search( { borrowernumber => $borrowernumber, old => 0 } );
348
    my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
349
    $template->param( RECALLS => $recalls );
349
    $template->param( RECALLS => $recalls );
350
}
350
}
351
351
352
- 

Return to bug 30291