Bugzilla – Attachment 145015 Details for
Bug 32445
Status display of 'not for loan' items is broken in OPAC/staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32445: Fix availability display on opac-course-details
Bug-32445-Fix-availability-display-on-opac-course-.patch (text/plain), 3.61 KB, created by
Nick Clemens (kidclamp)
on 2023-01-04 13:44:37 UTC
(
hide
)
Description:
Bug 32445: Fix availability display on opac-course-details
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-01-04 13:44:37 UTC
Size:
3.61 KB
patch
obsolete
>From bc0c87880fde00be3bc1a7924f63249ca1486111 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 3 Jan 2023 11:02:37 +0100 >Subject: [PATCH] Bug 32445: Fix availability display on opac-course-details > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc | 7 +++++-- > .../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- > opac/opac-course-details.pl | 5 +---- > 3 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >index ca13bac71c..fc457e816b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc >@@ -39,8 +39,11 @@ > <span class="item-status checkedout">Checked out</span> > [% END %] > [% END %] >- [%# FIXME We should move avail_for_recall to a Koha::Item method %] >- [% IF !item.isa('Koha::Item') AND item.avail_for_recall %]<a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% item.biblionumber | uri %]" class="btn btn-default btn-xs">Recall</a>[% END %] >+ [% IF show_recall_link %] >+ [% IF datedue && logged_in_user.borrowernumber != issue.borrowernumber %] >+ <a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% item.biblionumber | uri %]" class="btn btn-default btn-xs">Recall</a> >+ [% END %] >+ [% END %] > [% END %] > > [% IF item.isa('Koha::Item') %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >index 0f1e97c980..8e4aa87c01 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >@@ -87,7 +87,7 @@ > <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode, opac => 1 ) | html %]</td> > <td>[% cr.item.itemcallnumber | html %]</td> > <td>[% cr.item.copynumber | html %]</td> >- <td>[% INCLUDE 'item-status.inc' item=cr.course_item issue=cr.issue %]</td> >+ <td>[% INCLUDE 'item-status.inc' item=cr.course_item issue=cr.issue show_recall_link=1 %]</td> > <td data-order="[% cr.issue.date_due | html %]">[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</td> > <td>[% IF ( cr.public_note ) %] > [% cr.public_note | $raw %] >diff --git a/opac/opac-course-details.pl b/opac/opac-course-details.pl >index 48b5b9f746..6154549c06 100755 >--- a/opac/opac-course-details.pl >+++ b/opac/opac-course-details.pl >@@ -46,10 +46,7 @@ my $course_reserves = GetCourseReserves( course_id => $course_id, include_items > > if ( C4::Context->preference('UseRecalls') ) { > foreach my $cr ( @$course_reserves ) { >- if ( $cr->{issue}->{date_due} and $cr->{issue}->{borrowernumber} and $borrowernumber != $cr->{issue}->{borrowernumber} ) { >- $cr->{course_item}->{avail_for_recall} = 1; >- $cr->{course_item}->{biblionumber} = Koha::Items->find( $cr->{itemnumber} )->biblionumber; >- } >+ $cr->{course_item} = Koha::Items->find($cr->{itemnumber}); > } > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32445
:
144542
|
144926
|
144927
|
144928
|
144929
|
144930
|
144971
|
144978
|
144987
|
144988
|
144989
|
144990
|
144991
|
144992
|
144993
|
144994
|
145004
|
145005
|
145006
|
145007
|
145008
|
145009
|
145010
|
145011
|
145014
| 145015 |
145016
|
145017
|
145018
|
145019
|
145020
|
145021