@@ -, +, @@ --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 14 ++++++++++++-- opac/opac-detail.pl | 3 --- 2 files changed, 12 insertions(+), 5 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1240,7 +1240,12 @@
[% ITEM_RESULT.holding_branch_opac_info | $raw %]
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %] - [% ITEM_RESULT.location_description | html %] + + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.permanent_location, opac => '1' ) | html %] + [% IF ITEM_RESULT.location AND ITEM_RESULT.location != ITEM_RESULT.permanent_location %] + ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => '1' ) | html %]) + [% END %] + [% END %] @@ -1265,7 +1270,12 @@
[% ITEM_RESULT.home_branch_opac_info | $raw %]
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %] - [% ITEM_RESULT.location_description | html %] + + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.permanent_location, opac => '1' ) | html %] + [% IF ITEM_RESULT.location AND ITEM_RESULT.location != ITEM_RESULT.permanent_location %] + ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => '1' ) | html %]) + [% END %] + [% END %] --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -682,9 +682,6 @@ if ( not $viewallitems and @items > $max_items_to_display ) { $itm->{'ccode'} = $collections->{$ccode} if defined($ccode) && $collections && exists( $collections->{$ccode} ); my $copynumber = $itm->{'copynumber'}; $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); - if ( defined $itm->{'location'} ) { - $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} }; - } if (exists $itm->{itype} && defined($itm->{itype}) && exists $itemtypes->{ $itm->{itype} }) { $itm->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} ); $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description}; --