GetMarcSubjects
GetMarcUrls
);
-use C4::Items qw( GetItemsInfo );
use C4::Auth qw( get_template_and_user );
use C4::Output qw( output_html_with_http_headers );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
- my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {
$hasauthors = 1;
}
-
- my $shelflocations =
- { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) };
-
- for my $itm (@items) {
- if ($itm->{'location'}){
- $itm->{'location_description'} = $shelflocations->{$itm->{'location'} };
- }
- }
- # COinS format FIXME: for books Only
- my $fmt = substr $record->leader(), 6,2;
- my $fmts;
- $fmts->{'am'} = 'book';
- $dat->{ocoins_format} = $fmts->{$fmt};
+
+ # COinS format FIXME: for books Only
+ my $fmt = substr $record->leader(), 6,2;
+ my $fmts;
+ $fmts->{'am'} = 'book';
+ $dat->{ocoins_format} = $fmts->{$fmt};
if ( $num % 2 == 1 ) {
$dat->{'even'} = 1;
$num++;
$dat->{biblionumber} = $biblionumber;
- $dat->{ITEM_RESULTS} = \@items;
+ $dat->{ITEM_RESULTS} = $biblio->items->search_ordered;
$dat->{MARCNOTES} = $marcnotesarray;
$dat->{MARCSUBJCTS} = $marcsubjctsarray;
$dat->{MARCAUTHORS} = $marcauthorsarray;
[% USE raw %]
[% USE Asset %]
+[% USE AuthorisedValues %]
+[% USE Branches %]
[% SET footerjs = 1 %]
[% BLOCK controls %]
<p class="cart-controls">
<tr>
<th scope="row">Location(s)</th>
<td>
- [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
+ [% IF BIBLIO_RESULT.ITEM_RESULTS %]
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
<p>
- [% ITEM_RESULT.branchname | html %]
- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
+ [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
+ <span class="shelvingloc">
+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]
+ </span>
[% IF ( ITEM_RESULT.itemcallnumber ) %]
([% ITEM_RESULT.itemcallnumber | html %])
[% END %]
<strong>
<span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span>
</strong>
- [% ITEM_RESULT.branchname | html %]
- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
+ [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]
+ <span class="shelvingloc">
+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %]
+ </span>
</span>
</div>
[% END %]