@@ -, +, @@
on a specific copy (Intranet)
- Place a specific hold on
- a record with one or more items with collections
- a record with one or more items without collections
- Verify the collections display correctly when they exist
- Verify the table still works as expected
---
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 9 +++++++++
reserve/request.pl | 6 ++++++
2 files changed, 15 insertions(+)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -4,6 +4,7 @@
[% USE Branches %]
[% USE Categories %]
[% USE ItemTypes %]
+[% USE AuthorisedValues %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% UNLESS ( multi_hold ) %]
@@ -291,6 +292,9 @@
Barcode |
Home library |
Last location |
+ [% IF itemdata_ccode %]
+ Collection |
+ [% END %]
Call no. |
Copy number |
[% IF itemdata_enumchron %]
@@ -358,6 +362,11 @@
[% Branches.GetName( itemloo.holdingbranch ) %]
|
+ [% IF itemdata_ccode %]
+
+ [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) %][% END %]
+ |
+ [% END %]
[% itemloo.itemcallnumber %]
|
--- a/reserve/request.pl
+++ a/reserve/request.pl
@@ -199,6 +199,7 @@ my $patron = Koha::Patrons->find( $borrowernumber_hold );
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
my $itemdata_enumchron = 0;
+my $itemdata_ccode = 0;
my @biblioloop = ();
foreach my $biblionumber (@biblionumbers) {
next unless $biblionumber =~ m|^\d+$|;
@@ -492,6 +493,10 @@ foreach my $biblionumber (@biblionumbers) {
if ($item->{enumchron}) {
$itemdata_enumchron = 1;
}
+ # Show collection when needed
+ if ($item->{ccode}) {
+ $itemdata_ccode = 1;
+ }
}
push @{ $biblioitem->{itemloop} }, $item;
@@ -602,6 +607,7 @@ foreach my $biblionumber (@biblionumbers) {
optionloop => \@optionloop,
bibitemloop => \@bibitemloop,
itemdata_enumchron => $itemdata_enumchron,
+ itemdata_ccode => $itemdata_ccode,
date => $date,
biblionumber => $biblionumber,
findborrower => $findborrower,
--