Bug 14100: Fix some missing occurrences

This patch fixes:
- reports/bor_issues_top.pl
- sort order
- adv search and search results
- opac-topissues.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2015-10-14 09:38:05 +01:00 committed by Tomas Cohen Arazi
parent c3b0e35bb5
commit d58f2cfaf6
6 changed files with 9 additions and 8 deletions

View file

@ -570,7 +570,7 @@ sub getRecords {
{
$facet_label_value =
$itemtypes->{$one_facet}
->{'description'};
->{translated_description};
}
}
@ -1948,7 +1948,7 @@ sub searchResults {
# edition information, if any
$oldbiblio->{edition} = $oldbiblio->{editionstatement};
$oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description};
$oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{translated_description};
# Build summary if there is one (the summary is defined in the itemtypes table)
# FIXME: is this used anywhere, I think it can be commented out? -- JF
if ( $itemtypes{ $oldbiblio->{itemtype} }->{summary} ) {
@ -2060,7 +2060,7 @@ sub searchResults {
foreach my $code ( keys %subfieldstosearch ) {
$item->{$code} = $field->subfield( $subfieldstosearch{$code} );
}
$item->{description} = $itemtypes{ $item->{itype} }{description};
$item->{description} = $itemtypes{ $item->{itype} }{translated_description};
# OPAC hidden items
if ($is_opac) {

View file

@ -262,7 +262,7 @@ foreach my $advanced_srch_type (@advanced_search_types) {
if ($advanced_srch_type eq 'itemtypes') {
# itemtype is a special case, since it's not defined in authorized values
my @itypesloop;
foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes ) {
my %row =( number=>$cnt++,
ccl => "$itype_or_itemtype,phr",
code => $thisitemtype,

View file

@ -41,7 +41,7 @@
[% ELSE %]
<option value="[% itemtype.itemtype %]">
[% END %]
[% itemtype.description %]
[% itemtype.translated_description %]
</option>
[% END %]
</select>

View file

@ -236,13 +236,13 @@ foreach my $advanced_srch_type (@advanced_search_types) {
if ($advanced_srch_type eq 'itemtypes') {
# itemtype is a special case, since it's not defined in authorized values
my @itypesloop;
foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes ) {
next if $hidingrules->{itype} && any { $_ eq $thisitemtype } @{$hidingrules->{itype}};
next if $hidingrules->{itemtype} && any { $_ eq $thisitemtype } @{$hidingrules->{itemtype}};
my %row =( number=>$cnt++,
ccl => "$itype_or_itemtype,phr",
code => $thisitemtype,
description => $itemtypes->{$thisitemtype}->{'description'},
description => $itemtypes->{$thisitemtype}->{translated_description},
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
cat => $itemtypes->{$thisitemtype}->{'iscat'},
hideinopac => $itemtypes->{$thisitemtype}->{'hideinopac'},

View file

@ -25,6 +25,7 @@ use warnings;
use CGI qw ( -utf8 );
use C4::Auth;
use C4::Context;
use C4::Languages;
use C4::Search;
use C4::Output;
use C4::Koha;

View file

@ -125,7 +125,7 @@ my $itemtypes = GetItemTypes;
my @itemtypeloop;
foreach (sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description}} keys %$itemtypes) {
my %row = (value => $_,
description => $itemtypes->{$_}->{translated_description},
translated_description => $itemtypes->{$_}->{translated_description},
);
push @itemtypeloop, \%row;
}