@@ -, +, @@ --- Koha/Recall.pm | 43 ++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 93 ++++++++++++++++++++++ opac/opac-recall.pl | 4 + opac/opac-user.pl | 8 ++ 4 files changed, 148 insertions(+) --- a/Koha/Recall.pm +++ a/Koha/Recall.pm @@ -41,6 +41,49 @@ sub _type { return 'Recall'; } +=head3 biblio + +Returns the related Koha::Biblio object for this hold + +=cut + +sub biblio { + my ($self) = @_; + + $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() ); + + return $self->{_biblio}; +} + +=head3 item + +Returns the related Koha::Item object for this Hold + +=cut + +sub item { + + my ($self) = @_; + + $self->{_item} ||= Koha::Items->find( $self->itemnumber() ); + + return $self->{_item}; +} + +=head3 branch + +Returns the related Koha::Library object for this Hold + +=cut + +sub branch { + my ($self) = @_; + + $self->{_branch} ||= Koha::Libraries->find( $self->branchcode() ); + + return $self->{_branch}; +} + =head3 is_waiting Returns true if recall is awaiting pickup --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -159,6 +159,7 @@ [% END %] [% IF ( RESERVES.count ) %]
Title | +Placed on | +Expires on | +Pick up location | +Status | +Cancel | ++ + [% RECALL.biblio.title %] + [% FOREACH s IN RECALL.biblio.subtitles %] + [% s %] + [% END %] + [% RECALL.item.enumchron %] + + [% RECALL.biblio.author %] + | ++ + Recall date: + [% RECALL.recalldate | $KohaDates %] + + | ++ [% IF ( RECALL.is_waiting ) %] + [% IF ( RECALL.expirationdate ) %] + + Expiration: + [% RECALL.expirationdate | $KohaDates %] + + [% ELSE %] + + Expiration: + Never expires + + [% END %] + [% ELSIF ( RECALL.has_expired && RECALL.expirationdate ) %] + + Expiration: + [% RECALL.expirationdate | $KohaDates %] + + [% ELSE %] + - + [% END %] + | ++ Pick up location: + [% RECALL.branch.branchname %] + | ++ Status: + [% IF ( RECALL.is_requested ) %] + Requested + [% ELSIF ( RECALL.is_waiting ) %] + Ready for pickup + [% ELSIF ( RECALL.has_expired ) %] + Expired + [% END %] + | ++ [% IF ( !RECALL.cancellationdate ) %] + + [% ELSE %] + Cancelled + [% END %] + | + [% END %] + +
---|