View | Details | Raw Unified | Return to bug 24975
Collapse All | Expand All

(-)a/Koha/UI/Form/Builder/Item.pm (-2 / +3 lines)
Lines 209-216 sub generate_subfield_form { Link Here
209
            push @authorised_values, "";
209
            push @authorised_values, "";
210
            my $itemtypes;
210
            my $itemtypes;
211
            if ($branch_limit) {
211
            if ($branch_limit) {
212
                $itemtypes = Koha::ItemTypes->search(
212
                $itemtypes =
213
                    { branchcode => $branch_limit } );
213
                  Koha::ItemTypes->search_with_library_limits( undef, undef,
214
                    $branch_limit );
214
            }
215
            }
215
            else {
216
            else {
216
                $itemtypes = Koha::ItemTypes->search;
217
                $itemtypes = Koha::ItemTypes->search;
(-)a/catalogue/detail.pl (-1 / +3 lines)
Lines 50-55 use Koha::Biblio::ItemGroup::Items; Link Here
50
use Koha::Biblio::ItemGroups;
50
use Koha::Biblio::ItemGroups;
51
use Koha::CoverImages;
51
use Koha::CoverImages;
52
use Koha::DateUtils;
52
use Koha::DateUtils;
53
use Koha::I18N;
53
use Koha::Illrequests;
54
use Koha::Illrequests;
54
use Koha::Items;
55
use Koha::Items;
55
use Koha::ItemTypes;
56
use Koha::ItemTypes;
Lines 189-195 $template->param( Link Here
189
    content_identifier_exists =>  $content_identifier_exists,
190
    content_identifier_exists =>  $content_identifier_exists,
190
);
191
);
191
192
192
my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search_with_localization->as_list } };
193
my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search->as_list } };
194
193
my $all_items = $biblio->items->search_ordered;
195
my $all_items = $biblio->items->search_ordered;
194
my @items;
196
my @items;
195
my $patron = Koha::Patrons->find( $borrowernumber );
197
my $patron = Koha::Patrons->find( $borrowernumber );
(-)a/catalogue/search.pl (-1 / +7 lines)
Lines 579-585 for (my $i=0;$i<@servers;$i++) { Link Here
579
                \@sort_by, $scan, $lang, { weighted_fields => $weight_search, whole_record => $whole_record });
579
                \@sort_by, $scan, $lang, { weighted_fields => $weight_search, whole_record => $whole_record });
580
            my $quoted_results_hashref;
580
            my $quoted_results_hashref;
581
            eval {
581
            eval {
582
                my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
582
                my $itemtypes = {
583
                    map {
584
                        $_->{itemtype} =>
585
                          { %$_, description => db_t( 'itemtype', $_->{itemtype} ), }
586
                    } @{ Koha::ItemTypes->search->unblessed }
587
                };
588
583
                ( $error, $quoted_results_hashref, $facets ) = $searcher->search_compat(
589
                ( $error, $quoted_results_hashref, $facets ) = $searcher->search_compat(
584
                    $query,            $simple_query, \@sort_by,       ['biblioserver'],
590
                    $query,            $simple_query, \@sort_by,       ['biblioserver'],
585
                    $results_per_page, $offset,       undef,           $itemtypes,
591
                    $results_per_page, $offset,       undef,           $itemtypes,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 405-411 Link Here
405
                            [% IF !noItemTypeImages && itemtype.image_location('intranet') %]
405
                            [% IF !noItemTypeImages && itemtype.image_location('intranet') %]
406
                                <img src="[% itemtype.image_location('intranet') | html %]" alt="[% ItemTypes.t(itemtype.translation_key) | html %]" title="[% ItemTypes.t(itemtype.translation_key) | html %]" />
406
                                <img src="[% itemtype.image_location('intranet') | html %]" alt="[% ItemTypes.t(itemtype.translation_key) | html %]" title="[% ItemTypes.t(itemtype.translation_key) | html %]" />
407
                            [% END %]
407
                            [% END %]
408
                            <span class="itypedesc itypetext">[% ItemTypes.t(item.translation_key) | html %]</span>
408
                            <span class="itypedesc itypetext">[% ItemTypes.t(itemtype.translation_key) | html %]</span>
409
                        </td>
409
                        </td>
410
                    [% END %]
410
                    [% END %]
411
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
411
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt (-2 / +2 lines)
Lines 232-238 Link Here
232
                                                <li class="itype">
232
                                                <li class="itype">
233
                                                    <span class="label">Item type: </span>
233
                                                    <span class="label">Item type: </span>
234
                                                    [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
234
                                                    [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
235
                                                    <span class="itypetext">[% ItemTypes.t(bibitemloo.translation_key) | html %]</span>
235
                                                    <span class="itypetext">[% bibitemloo.description | html %]</span>
236
                                                </li>
236
                                                </li>
237
                                            [% END %]
237
                                            [% END %]
238
238
Lines 421-427 Link Here
421
                                                                            <img src="[% itemLoo.imageurl | html %]" alt="" />
421
                                                                            <img src="[% itemLoo.imageurl | html %]" alt="" />
422
                                                                        [% END %]
422
                                                                        [% END %]
423
                                                                    [% END %]
423
                                                                    [% END %]
424
                                                                    <span class="itypetext">[% ItemTypes.t(itemLoo.translation_key) | html %]</span>
424
                                                                    <span class="itypetext">[% itemLoo.description | html %]</span>
425
                                                                </td>
425
                                                                </td>
426
                                                            [% END %]
426
                                                            [% END %]
427
427
(-)a/opac/opac-reserve.pl (-5 / +7 lines)
Lines 35-40 use C4::Overdues; Link Here
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::CirculationRules;
37
use Koha::CirculationRules;
38
use Koha::I18N;
38
use Koha::Items;
39
use Koha::Items;
39
use Koha::ItemTypes;
40
use Koha::ItemTypes;
40
use Koha::Checkouts;
41
use Koha::Checkouts;
Lines 72-78 unless ( $can_place_hold_if_available_at_pickup ) { Link Here
72
    }
73
    }
73
}
74
}
74
75
75
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
76
my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search->as_list } };
76
77
77
# There are two ways of calling this script, with a single biblio num
78
# There are two ways of calling this script, with a single biblio num
78
# or multiple biblio nums.
79
# or multiple biblio nums.
Lines 413-420 foreach my $biblioNum (@biblionumbers) { Link Here
413
    $biblioLoopIter{object} = $biblio;
414
    $biblioLoopIter{object} = $biblio;
414
415
415
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
416
    if (!$itemLevelTypes && $biblioData->{itemtype}) {
416
        $biblioLoopIter{description} = $itemtypes->{$biblioData->{itemtype}}{description};
417
        $biblioLoopIter{description} =
417
        $biblioLoopIter{imageurl} = getitemtypeimagesrc() . "/". $itemtypes->{$biblioData->{itemtype}}{imageurl};
418
            db_t('itemtype', $itemtypes->{$biblioData->{itemtype}}->translation_key);
419
        $biblioLoopIter{imageurl} = getitemtypeimagesrc() . "/". $itemtypes->{$biblioData->{itemtype}}->imageurl;
418
    }
420
    }
419
421
420
422
Lines 435-443 foreach my $biblioNum (@biblionumbers) { Link Here
435
        if ($itemLevelTypes) {
437
        if ($itemLevelTypes) {
436
            my $itemtype = $item->itemtype;
438
            my $itemtype = $item->itemtype;
437
            $item_info->{'imageurl'} = getitemtypeimagelocation( 'opac',
439
            $item_info->{'imageurl'} = getitemtypeimagelocation( 'opac',
438
                $itemtypes->{ $itemtype->itemtype }->{'imageurl'} );
440
                $itemtypes->{ $itemtype->itemtype }->imageurl );
439
            $item_info->{'description'} =
441
            $item_info->{'description'} =
440
                db_t('itemtype', $itemtypes->{ $itemtype->itemtype }->{description});
442
                db_t('itemtype', $itemtypes->{ $itemtype->itemtype }->translation_key);
441
        }
443
        }
442
444
443
        # checking for holds
445
        # checking for holds
(-)a/opac/opac-search.pl (-3 / +14 lines)
Lines 577-583 if ($tag) { Link Here
577
    $pasarParams .= '&amp;count=' . uri_escape_utf8($results_per_page);
577
    $pasarParams .= '&amp;count=' . uri_escape_utf8($results_per_page);
578
    $pasarParams .= '&amp;simple_query=' . uri_escape_utf8($simple_query);
578
    $pasarParams .= '&amp;simple_query=' . uri_escape_utf8($simple_query);
579
    $pasarParams .= '&amp;query_type=' . uri_escape_utf8($query_type) if ($query_type);
579
    $pasarParams .= '&amp;query_type=' . uri_escape_utf8($query_type) if ($query_type);
580
    my $itemtypes_nocategory = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
580
    my $itemtypes_nocategory = {
581
        map {
582
            $_->{itemtype} =>
583
              { %$_, description => db_t( 'itemtype', $_->{itemtype} ), }
584
        } @{ Koha::ItemTypes->search->unblessed }
585
    };
586
581
    eval {
587
    eval {
582
        ($error, $results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan,1);
588
        ($error, $results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan,1);
583
};
589
};
Lines 638-644 for (my $i=0;$i<@servers;$i++) { Link Here
638
                }
644
                }
639
            );
645
            );
640
            my $quoted_results_hashref;
646
            my $quoted_results_hashref;
641
            my $itemtypes_nocategory = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
647
            my $itemtypes_nocategory = {
648
                map {
649
                    $_->{itemtype} =>
650
                      { %$_, description => db_t( 'itemtype', $_->{itemtype} ), }
651
                } @{ Koha::ItemTypes->search->unblessed }
652
            };
653
642
            eval {
654
            eval {
643
                ($error, $quoted_results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan,1);
655
                ($error, $quoted_results_hashref, $facets) = $searcher->search_compat($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes_nocategory,$query_type,$scan,1);
644
            };
656
            };
645
- 

Return to bug 24975