Bug 33725: Add collection to search results
To test: 1. Apply patch and restart services 2. Do a catalog search that will return available, onloan, and notforloan items. (withdrawn,lost,damaged) 3. Notice that the location column should now also include the collection description underneath the shelving location. Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
2d28f7417c
commit
3e77b5b974
2 changed files with 6 additions and 0 deletions
|
@ -1870,6 +1870,7 @@ sub searchResults {
|
|||
$onloan_items->{$key}->{description} = $item->{description};
|
||||
$onloan_items->{$key}->{imageurl} =
|
||||
getitemtypeimagelocation( $search_context->{'interface'}, $itemtypes{ $item->{itype} }->{imageurl} );
|
||||
$onloan_items->{$key}->{collectioncode} = GetAuthorisedValueDesc('','',$item->{ccode},'','','CCODE');
|
||||
|
||||
# if something's checked out and lost, mark it as 'long overdue'
|
||||
if ( $item->{itemlost} ) {
|
||||
|
@ -1969,6 +1970,7 @@ sub searchResults {
|
|||
$other_items->{$key}->{location} = $shelflocations->{ $item->{location} } if $item->{location};
|
||||
$other_items->{$key}->{description} = $item->{description};
|
||||
$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context->{'interface'}, $itemtypes{ $item->{itype}//q{} }->{imageurl} );
|
||||
$other_items->{$key}->{collectioncode} = GetAuthorisedValueDesc('','',$item->{ccode},'','','CCODE');
|
||||
}
|
||||
# item is available
|
||||
else {
|
||||
|
@ -1979,6 +1981,7 @@ sub searchResults {
|
|||
}
|
||||
$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} } if $item->{location};
|
||||
$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context->{'interface'}, $itemtypes{ $item->{itype}//q{} }->{imageurl} );
|
||||
$available_items->{$prefix}->{collectioncode} = GetAuthorisedValueDesc('','',$item->{ccode},'','','CCODE');
|
||||
}
|
||||
}
|
||||
} # notforloan, item level and biblioitem level
|
||||
|
|
|
@ -626,6 +626,9 @@
|
|||
[% IF ( items_loo.location ) %]
|
||||
<span class="shelvingloc">[% items_loo.location | html %]</span>
|
||||
[% END %]
|
||||
[% IF ( items_loo.collectioncode ) %]
|
||||
<span class="ccode">[% items_loo.collectioncode | html %]</span>
|
||||
[% END %]
|
||||
|
||||
[% IF ( items_loo.itemcallnumber ) %]
|
||||
<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% items_loo.itemcallnumber |uri %]%22">[% items_loo.itemcallnumber | html %]</a>
|
||||
|
|
Loading…
Reference in a new issue