From 5961683be53e4cb568498f44d2c2a3f8bb00e22d Mon Sep 17 00:00:00 2001 From: Viktor Sarge Date: Mon, 16 Jun 2014 08:03:42 +0100 Subject: [PATCH] 5956 Highlight holds on chech-in This patch adds a flag in returns.pl if the returned books have reservervations. The flag is picked up by returns.tt and displays a warning using the "Note" field and CSS-class already in place. Note that this differs from the atcual suggestion from Jared, but using the note field instead of making the title red felt that it kept it more consistent. Apologies if the commit message hints at the fact that I'm still learning Git. --- circ/returns.pl | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index a95a17c..20b9e0c 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -566,6 +566,9 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{homebranch} = $item->{'homebranch'}; $ri{holdingbranch} = $item->{'holdingbranch'}; + if (GetReservesFromItemnumber($biblio->{'itemnumber'})){ + $ri{reservewarning} = 1;} + $ri{location} = $biblio->{'location'}; my $shelfcode = $ri{'location'}; $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 72f9ee3..32ae6f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -547,8 +547,8 @@ $(document).ready(function () { [% ELSE %]Not checked out[% END %] [% IF ( riloo.bornote ) %][% riloo.bornote %]
[% END %] - [% IF ( riloo.itemnote ) %][% riloo.itemnote %][% END %] - + [% IF ( riloo.itemnote ) %][% riloo.itemnote %]
[% END %] + [% IF ( riloo.reservewarning ) %]This item is reserved[% END %] [% END %] -- 1.7.10.4