Bugzilla – Attachment 151158 Details for
Bug 33725
Add item's collection code to search results location column in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33725: Add collection to search results
Bug-33725-Add-collection-to-search-results.patch (text/plain), 3.83 KB, created by
ByWater Sandboxes
on 2023-05-12 18:54:11 UTC
(
hide
)
Description:
Bug 33725: Add collection to search results
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2023-05-12 18:54:11 UTC
Size:
3.83 KB
patch
obsolete
>From 2183dd5394c6de349178868c26da4befd8ca4179 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 12 May 2023 17:54:26 +0000 >Subject: [PATCH] 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> >--- > C4/Search.pm | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 +++ > 2 files changed, 6 insertions(+) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 5985db2edb..ba32bc0712 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1869,6 +1869,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} ) { >@@ -1968,6 +1969,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 { >@@ -1978,6 +1980,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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 53ca58dbae..83f71cb382 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -627,6 +627,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> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33725
:
151151
|
151158
|
151890
|
152132
|
152133