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

(-)a/C4/Search.pm (-1 / +5 lines)
Lines 1842-1854 sub searchResults { Link Here
1842
1842
1843
            my $hbranch     = C4::Context->preference('StaffSearchResultsDisplayBranch');
1843
            my $hbranch     = C4::Context->preference('StaffSearchResultsDisplayBranch');
1844
            my $otherbranch = $hbranch eq 'homebranch' ? 'holdingbranch' : 'homebranch';
1844
            my $otherbranch = $hbranch eq 'homebranch' ? 'holdingbranch' : 'homebranch';
1845
1846
            # set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one
1845
            # set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one
1847
            if ($item->{$hbranch}) {
1846
            if ($item->{$hbranch}) {
1848
                $item->{'branchname'} = $branches{$item->{$hbranch}};
1847
                $item->{'branchname'} = $branches{$item->{$hbranch}};
1848
                $item->{'branchcode'} = $item->{$hbranch};
1849
            }
1849
            }
1850
            elsif ($item->{$otherbranch}) {	# Last resort
1850
            elsif ($item->{$otherbranch}) {	# Last resort
1851
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1851
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1852
                $item->{'branchcode'} = $item->{$otherbranch};
1852
            }
1853
            }
1853
1854
1854
            my $prefix =
1855
            my $prefix =
Lines 1867-1872 sub searchResults { Link Here
1867
                $onloan_items->{$key}->{due_date} = $item->{onloan};
1868
                $onloan_items->{$key}->{due_date} = $item->{onloan};
1868
                $onloan_items->{$key}->{count}++ if $item->{$hbranch};
1869
                $onloan_items->{$key}->{count}++ if $item->{$hbranch};
1869
                $onloan_items->{$key}->{branchname}     = $item->{branchname};
1870
                $onloan_items->{$key}->{branchname}     = $item->{branchname};
1871
                $onloan_items->{$key}->{branchcode}     = $item->{branchcode};
1870
                $onloan_items->{$key}->{location}       = $shelflocations->{ $item->{location} } if $item->{location};
1872
                $onloan_items->{$key}->{location}       = $shelflocations->{ $item->{location} } if $item->{location};
1871
                $onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
1873
                $onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
1872
                $onloan_items->{$key}->{description}    = $item->{description};
1874
                $onloan_items->{$key}->{description}    = $item->{description};
Lines 1964-1969 sub searchResults { Link Here
1964
                    foreach (qw(withdrawn itemlost damaged branchname itemcallnumber)) {
1966
                    foreach (qw(withdrawn itemlost damaged branchname itemcallnumber)) {
1965
                        $other_items->{$key}->{$_} = $item->{$_};
1967
                        $other_items->{$key}->{$_} = $item->{$_};
1966
                    }
1968
                    }
1969
                    $other_items->{$key}->{branchcode}     = $item->{branchcode};
1967
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1970
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1968
                    $other_items->{$key}->{recalled} = ($recallstatus) ? 1 : 0;
1971
                    $other_items->{$key}->{recalled} = ($recallstatus) ? 1 : 0;
1969
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1972
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
Lines 1981-1986 sub searchResults { Link Here
1981
                    foreach (qw(branchname itemcallnumber description)) {
1984
                    foreach (qw(branchname itemcallnumber description)) {
1982
                        $available_items->{$prefix}->{$_} = $item->{$_};
1985
                        $available_items->{$prefix}->{$_} = $item->{$_};
1983
                    }
1986
                    }
1987
                    $available_items->{$prefix}->{branchcode} = $item->{branchcode};
1984
                    $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} } if $item->{location};
1988
                    $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} } if $item->{location};
1985
                    $available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context->{'interface'}, $itemtypes{ $item->{itype}//q{} }->{imageurl} );
1989
                    $available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context->{'interface'}, $itemtypes{ $item->{itype}//q{} }->{imageurl} );
1986
                    $available_items->{$prefix}->{collectioncode} = GetAuthorisedValueDesc('','',$item->{ccode},'','','CCODE');
1990
                    $available_items->{$prefix}->{collectioncode} = GetAuthorisedValueDesc('','',$item->{ccode},'','','CCODE');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-3 / +2 lines)
Lines 631-640 Link Here
631
                                                                <ul class="[% items_loop | html %]_items">
631
                                                                <ul class="[% items_loop | html %]_items">
632
                                                                    [% FOREACH items_loo IN SEARCH_RESULT.${items_loop} %]
632
                                                                    [% FOREACH items_loo IN SEARCH_RESULT.${items_loop} %]
633
                                                                        [% IF item_level_itypes && !noItemTypeImages && items_loo.imageurl %]
633
                                                                        [% IF item_level_itypes && !noItemTypeImages && items_loo.imageurl %]
634
                                                                            <li class="result_itype_image">
634
                                                                            <li class="result_itype_image [% items_loo.branchcode | html %]">
635
                                                                                <img src="[% items_loo.imageurl | html %]" title="[% items_loo.description | html %]" alt="[% items_loo.description | html %]" />
635
                                                                                <img src="[% items_loo.imageurl | html %]" title="[% items_loo.description | html %]" alt="[% items_loo.description | html %]" />
636
                                                                        [% ELSE %]
636
                                                                        [% ELSE %]
637
                                                                            <li>
637
                                                                            <li class="[% items_loo.branchcode | html %]">
638
                                                                        [% END %]
638
                                                                        [% END %]
639
                                                                        [% IF ( items_loo.branchname ) %]
639
                                                                        [% IF ( items_loo.branchname ) %]
640
                                                                            [% items_loo.branchname | html %]
640
                                                                            [% items_loo.branchname | html %]
641
- 

Return to bug 37004