@@ -274,7 +276,7 @@
[% IF ( itemsloo.notforloan ) %]
No holds allowed
[% ELSE %]
- [% IF ( itemsloo.ITEM_RESULTS.size ) %]
+ [% IF ( itemsloo.ITEM_RESULTS.count ) %]
Holds
[% IF ( holdfor ) %] | Place hold for [% holdfor_firstname | html %] [% holdfor_surname | html %] ([% holdfor_cardnumber | html %])[% END %]
[% ELSE %]
@@ -293,12 +295,16 @@
[% itemsloo.dateadded | $KohaDates%] |
- [% FOREACH result IN itemsloo.ITEM_RESULTS %]
+ [% FOREACH item IN itemsloo.ITEM_RESULTS %]
-
- [% result.holdingbranch | html %]
- [% IF ( result.location_intranet ) %][% result.location_intranet | html %][% END %]
- [% IF ( result.itemcallnumber ) %]
- [[% result.itemcallnumber | html %]]
+ [% Branches.GetName(item.holdingbranch) | html %]
+ [% IF ( item.location ) %]
+
+ [% SET AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]%]
+
+ [% END %]
+ [% IF ( item.itemcallnumber ) %]
+ [[% item.itemcallnumber | html %]]
[% END %]
[% END %]
diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl
index 0bcb43cea1e..4000192b3be 100755
--- a/virtualshelves/sendshelf.pl
+++ b/virtualshelves/sendshelf.pl
@@ -29,7 +29,6 @@ use C4::Biblio qw(
GetMarcISBN
GetMarcSubjects
);
-use C4::Items qw( GetItemsInfo );
use C4::Output qw(
output_html_with_http_headers
output_and_exit
@@ -83,13 +82,13 @@ if ($to_address) {
my $marcauthorsarray = $biblio->get_marc_authors;
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
- my @items = GetItemsInfo($biblionumber);
+ my $items = $biblio->items;
$dat->{ISBN} = GetMarcISBN($record, $marcflavour);
$dat->{MARCSUBJCTS} = $marcsubjctsarray;
$dat->{MARCAUTHORS} = $marcauthorsarray;
$dat->{'biblionumber'} = $biblionumber;
- $dat->{ITEM_RESULTS} = \@items;
+ $dat->{ITEM_RESULTS} = $items;
$dat->{HASAUTHORS} = $dat->{'author'} || @$marcauthorsarray;
$iso2709 .= $record->as_usmarc();
diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl
index 8b70dc2bb51..870f0a788f0 100755
--- a/virtualshelves/shelves.pl
+++ b/virtualshelves/shelves.pl
@@ -26,7 +26,6 @@ use C4::Koha qw(
GetNormalizedOCLCNumber
GetNormalizedUPC
);
-use C4::Items qw( GetItemsLocationInfo );
use C4::Members;
use C4::Output qw( pagination_bar output_html_with_http_headers );
use C4::XSLT qw( XSLTParse4Display );
@@ -302,8 +301,8 @@ if ( $op eq 'view' ) {
}
# Getting items infos for location display
- my @items_infos = &GetItemsLocationInfo( $biblionumber );
- $this_item->{'ITEM_RESULTS'} = \@items_infos;
+ my $items = $biblio->items;
+ $this_item->{'ITEM_RESULTS'} = $items;
$this_item->{biblionumber} = $biblionumber;
push @items, $this_item;
}
--
2.25.1 |