Bugzilla – Attachment 95870 Details for
Bug 20948
Item-level hold info displayed regardless its priority (detail.pl)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20948: Simplify existing code
Bug-20948-Simplify-existing-code.patch (text/plain), 3.62 KB, created by
Marcel de Rooy
on 2019-11-29 08:04:12 UTC
(
hide
)
Description:
Bug 20948: Simplify existing code
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-11-29 08:04:12 UTC
Size:
3.62 KB
patch
obsolete
>From 6476c49aa20c4e3706b84bd08c5c09bcfe1ca22c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Nov 2019 10:10:56 +0100 >Subject: [PATCH] Bug 20948: Simplify existing code >Content-Type: text/plain; charset=utf-8 > >No changes expected here. > >Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > catalogue/detail.pl | 8 +------- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 13 +++++++------ > 2 files changed, 8 insertions(+), 13 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 511855e9fc..249a7417cb 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -314,13 +314,7 @@ foreach my $item (@items) { > my $item_object = Koha::Items->find( $item->{itemnumber} ); > my $holds = $item_object->current_holds; > if ( my $first_hold = $holds->next ) { >- my $patron = Koha::Patrons->find( $first_hold->borrowernumber ); >- $item->{backgroundcolor} = 'reserved'; >- $item->{reservedate} = $first_hold->reservedate; >- $item->{ReservedFor} = $patron, >- $item->{ExpectedAtLibrary} = $first_hold->branchcode; >- # Check waiting status >- $item->{waitingdate} = $first_hold->waitingdate; >+ $item->{first_hold} = $first_hold; > } > > if ( my $checkout = $item_object->checkout ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index daa9c20bee..bb69151106 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -355,18 +355,19 @@ > [% END %] > [% END %] > >- [% IF ( item.reservedate ) %] >- [% IF ( item.waitingdate ) %] >- Waiting at [% Branches.GetName( item.ExpectedAtLibrary ) | html %] since [% item.waitingdate | $KohaDates %]. >+ [% SET hold = item.first_hold %] >+ [% IF hold %] >+ [% IF hold.waitingdate %] >+ Waiting at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. > [% ELSE %] >- Item-level hold (placed [% item.reservedate | $KohaDates %]) for delivery at [% Branches.GetName( item.ExpectedAtLibrary ) | html %]. >+ Item-level hold (placed [% hold.reservedate | $KohaDates %]) for delivery at [% Branches.GetName( hold.branchcode ) | html %]. > [% END %] > [% IF ( canreservefromotherbranches ) %] > Hold for: >- [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %] >+ [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] > [% END %] > [% END %] >- [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %] >+ [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %] > Available > [% END %] > >-- >2.11.0
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 20948
:
76145
|
76216
|
95476
|
95477
|
95636
|
95637
| 95870 |
95871
|
96137