Bugzilla – Attachment 190227 Details for
Bug 14962
Temp Shelving Location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14962: On Display code for OPAC scripts & templates
Bug-14962-On-Display-code-for-OPAC-scripts--templa.patch (text/plain), 4.17 KB, created by
Jake Deery
on 2025-12-05 14:51:45 UTC
(
hide
)
Description:
Bug 14962: On Display code for OPAC scripts & templates
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-12-05 14:51:45 UTC
Size:
4.17 KB
patch
obsolete
>From 92927429f1c0c9ba12a8dda97521990181e0a142 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@openfifth.co.uk> >Date: Mon, 1 Dec 2025 14:47:58 +0000 >Subject: [PATCH] Bug 14962: On Display code for OPAC scripts & templates > >This patch makes the necessary changes to the OPAC to make sure >effective locations, collection codes, and branches are correctly >displayed. >Please see the test files commit for instructions on how to test this >bundle of patches. >--- > .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 4 ++-- > opac/opac-detail.pl | 11 +++++++++-- > 2 files changed, 11 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index a19db309bf0..5263dd9487e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -292,7 +292,7 @@ > [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] > <li> > <strong>[% Branches.GetName(ITEM_RESULT.holdingbranch) | html %]</strong> >- <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span> >+ <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.effective_location, opac => 1 ) | html %]</span> > [% IF ( ITEM_RESULT.itemcallnumber ) %] > ([% ITEM_RESULT.itemcallnumber | html %]) > [% END %] >@@ -374,7 +374,7 @@ > >[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] > <li> > [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %] >- <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location, opac => 1 ) | html %]</span> >+ <span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.effective_location, opac => 1 ) | html %]</span> > <span class="ccode">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => ITEM_RESULT.ccode, opac => 1 ) | html %]</span> > [% IF ( ITEM_RESULT.itemcallnumber ) %] > ([% ITEM_RESULT.itemcallnumber | html %]) >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 211dac36ea1..b42b97ac429 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -739,8 +739,15 @@ if ( not $viewallitems and $items->count > $max_items_to_display ) { > && defined($copynumber) > && exists( $copynumbers->{$copynumber} ) ); > >- if ( defined $item->location ) { >- $item_info->{'location_description'} = $shelflocations->{ $item->location }; >+ if ( defined $item->effective_location ) { >+ my $effective_loc = $item->effective_location; >+ >+ # If it starts with "DISPLAY:", use it as-is, otherwise look it up >+ if ( $effective_loc =~ /^DISPLAY:/ ) { >+ $item_info->{'location_description'} = $effective_loc; >+ } else { >+ $item_info->{'location_description'} = $shelflocations->{$effective_loc}; >+ } > } > > my $itemtype = $item->itemtype; >-- >2.50.1 (Apple Git-155)
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 14962
:
190216
|
190217
|
190218
|
190219
|
190220
|
190221
|
190222
|
190223
|
190224
|
190225
|
190226
| 190227 |
190228
|
190229
|
190230
|
190231
|
190232