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'); |