Bug 30291: Changes to OPAC files
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
674e385bf1
commit
39c010a87a
|
|
@ -47,7 +47,7 @@
|
|||
[% FOREACH RECALL IN RECALLS %]
|
||||
<tr>
|
||||
<td class="title">
|
||||
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">
|
||||
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">
|
||||
[% RECALL.biblio.title | html %]
|
||||
[% FOREACH s IN RECALL.biblio.subtitle %]
|
||||
[% s | html %]
|
||||
|
|
@ -55,19 +55,19 @@
|
|||
</a>
|
||||
[% RECALL.biblio.author | html %]
|
||||
</td>
|
||||
<td class="recalldate" data-order="[% RECALL.recalldate | html %]">
|
||||
<span title="[% RECALL.recalldate | html %]">
|
||||
<td class="recalldate" data-order="[% RECALL.created_date | html %]">
|
||||
<span title="[% RECALL.created_date | html %]">
|
||||
<span class="tdlabel">Recall date:</span>
|
||||
[% RECALL.recalldate | $KohaDates %]
|
||||
[% RECALL.created_date | $KohaDates %]
|
||||
</span>
|
||||
</td>
|
||||
<td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
|
||||
[% IF ( RECALL.expirationdate ) %]
|
||||
<span title="[% RECALL.expirationdate | html %]">
|
||||
<td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
|
||||
[% IF ( RECALL.expiration_date ) %]
|
||||
<span title="[% RECALL.expiration_date | html %]">
|
||||
<span class="tdlabel">Expiration:</span>
|
||||
[% RECALL.expirationdate | $KohaDates %]
|
||||
[% RECALL.expiration_date | $KohaDates %]
|
||||
</span>
|
||||
[% ELSIF ( !RECALL.old ) %]
|
||||
[% ELSIF ( !RECALL.completed ) %]
|
||||
<span title="0000-00-00">
|
||||
<span class="tdlabel">Expiration:</span>
|
||||
Never expires
|
||||
|
|
@ -89,9 +89,9 @@
|
|||
[% ELSIF ( RECALL.overdue ) %]
|
||||
Overdue to be returned
|
||||
[% ELSIF ( RECALL.expired ) %]
|
||||
Expired on [% RECALL.expirationdate | $KohaDates %]
|
||||
Expired on [% RECALL.expiration_date | $KohaDates %]
|
||||
[% ELSIF ( RECALL.cancelled ) %]
|
||||
Cancelled on [% RECALL.cancellationdate | $KohaDates %]
|
||||
Cancelled on [% RECALL.completed_date | $KohaDates %]
|
||||
[% ELSIF ( RECALL.fulfilled ) %]
|
||||
Fulfilled
|
||||
[% ELSE %]
|
||||
|
|
@ -102,8 +102,8 @@
|
|||
<span class="tdlabel">Due date</span>
|
||||
[% IF ( RECALL.requested ) %]
|
||||
Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
|
||||
[% ELSIF ( RECALL.waiting and RECALL.expirationdate ) %]
|
||||
Pick up by [% RECALL.expirationdate | $KohaDates %]
|
||||
[% ELSIF ( RECALL.waiting and RECALL.expiration_date ) %]
|
||||
Pick up by [% RECALL.expiration_date | $KohaDates %]
|
||||
[% ELSE %]
|
||||
-
|
||||
[% END %]
|
||||
|
|
@ -113,8 +113,8 @@
|
|||
[% IF ( RECALL.requested or RECALL.overdue ) %]
|
||||
<form action="/cgi-bin/koha/opac-recall.pl" method="post">
|
||||
<input type="hidden" name="op" value="cancel">
|
||||
<input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
|
||||
<input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
|
||||
<input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
|
||||
<input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
|
||||
<input type="submit" name="submit" class="btn btn-danger cancel_recall" value="Cancel">
|
||||
</form>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -767,19 +767,19 @@
|
|||
[% FOREACH RECALL IN RECALLS %]
|
||||
<tr>
|
||||
<td class="title">
|
||||
<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 %]
|
||||
<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 %]
|
||||
</td>
|
||||
<td class="recalldate" data-order="[% RECALL.recalldate | html %]">
|
||||
<span title="[% RECALL.recalldate | html %]">
|
||||
<td class="recalldate" data-order="[% RECALL.created_date | html %]">
|
||||
<span title="[% RECALL.created_date | html %]">
|
||||
<span class="tdlabel">Recall date:</span>
|
||||
[% RECALL.recalldate | $KohaDates %]
|
||||
[% RECALL.created_date | $KohaDates %]
|
||||
</span>
|
||||
</td>
|
||||
<td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
|
||||
[% IF ( RECALL.expirationdate ) %]
|
||||
<span title="[% RECALL.expirationdate | html %]">
|
||||
<td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
|
||||
[% IF ( RECALL.expiration_date ) %]
|
||||
<span title="[% RECALL.expiration_date | html %]">
|
||||
<span class="tdlabel">Expiration:</span>
|
||||
[% RECALL.expirationdate | $KohaDates %]
|
||||
[% RECALL.expiration_date | $KohaDates %]
|
||||
</span>
|
||||
[% ELSE %]
|
||||
<span title="0000-00-00">
|
||||
|
|
@ -808,8 +808,8 @@
|
|||
[% IF ( RECALL.requested or RECALL.overdue ) %]
|
||||
<form action="/cgi-bin/koha/opac-recall.pl" method="post">
|
||||
<input type="hidden" name="op" value="cancel">
|
||||
<input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
|
||||
<input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
|
||||
<input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
|
||||
<input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
|
||||
<button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
|
||||
</form>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -735,9 +735,9 @@ if ( not $viewallitems and @items > $max_items_to_display ) {
|
|||
if ( C4::Context->preference('UseRecalls') ) {
|
||||
my $recall_status = Koha::Recalls->search(
|
||||
{
|
||||
itemnumber => $itm->{itemnumber},
|
||||
status => 'waiting',
|
||||
old => undef,
|
||||
item_id => $itm->{itemnumber},
|
||||
status => 'waiting',
|
||||
completed => undef,
|
||||
}
|
||||
)->count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ if ( C4::Context->preference('UseRecalls') ) {
|
|||
my $items = Koha::Items->search({ biblionumber => $biblionumber })->as_list;
|
||||
|
||||
# check if already recalled
|
||||
my $recalled = $biblio->recalls->filter_by_current->search({ borrowernumber => $borrowernumber })->count;
|
||||
my $recalled = $biblio->recalls->filter_by_current->search({ patron_id => $borrowernumber })->count;
|
||||
if ( defined $recalled and $recalled > 0 ) {
|
||||
my $recalls_per_record = Koha::CirculationRules->get_effective_rule({
|
||||
categorycode => $patron->categorycode,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
my $recalls = Koha::Recalls->search({ borrowernumber => $borrowernumber }, { order_by => { -desc => 'recalldate' } });
|
||||
my $recalls = Koha::Recalls->search({ patron_id => $borrowernumber }, { order_by => { -desc => 'created_date' } });
|
||||
$template->param(
|
||||
RECALLS => $recalls,
|
||||
recallsview => 1
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ if ( $pending_checkouts->count ) { # Useless test
|
|||
}
|
||||
|
||||
if ( C4::Context->preference('UseRecalls') ) {
|
||||
my $maybe_recalls = Koha::Recalls->search({ biblionumber => $issue->{biblionumber}, itemnumber => [ undef, $issue->{itemnumber} ], old => 0 });
|
||||
my $maybe_recalls = Koha::Recalls->search({ biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 });
|
||||
while( my $recall = $maybe_recalls->next ) {
|
||||
if ( $recall->checkout and $recall->checkout->issue_id == $issue->{issue_id} ) {
|
||||
$issue->{recall} = 1;
|
||||
|
|
@ -340,7 +340,7 @@ $template->param(
|
|||
);
|
||||
|
||||
if ( C4::Context->preference('UseRecalls') ) {
|
||||
my $recalls = Koha::Recalls->search( { borrowernumber => $borrowernumber, old => 0 } );
|
||||
my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
|
||||
$template->param( RECALLS => $recalls );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue