Bugzilla – Attachment 194937 Details for
Bug 42020
(Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL
2559c85.patch (text/plain), 3.89 KB, created by
David Nind
on 2026-03-08 01:51:39 UTC
(
hide
)
Description:
Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-03-08 01:51:39 UTC
Size:
3.89 KB
patch
obsolete
>From 2559c8566129e16b08a001e7943252141c016353 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Sat, 7 Mar 2026 21:18:51 +0000 >Subject: [PATCH] Bug 42020: (Bug 39482 follow-up) Library info link shown in > OPAC without OpacLibraryInfo and library URL >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Prior to Bug 39482 a link to library info modal (with (i) icon) was >generated only if OpacLibraryInfo was defined (cf. original Bug >29616). Now it is there even if there is no OpacLibraryInfo at all >and no URL defined for the library. It is generated in any >circumstances. > >The test on $item->holding_branch->opac_info( { lang => $lang } ) in >opac-detail.pl now returns always true. This is because >Koha::Library::opac_info returns a RS now, and not an object, as it >was before (find_best_match --> search_for_display). > >This patch restores the original behavior designed in Bug 29616. > >Test plan: >1. Have a standard ktd installation. >2. Make sure there is no OpacLibraryInfo defined in HTML customizations. >3. Make sure there is no URL for any library. >4. In OPAC, perform any search. On a detail page you would see a link > to an empty modal from the Current library items column. >5. Apply the patch ; restart_all. >6. Repeat p. 4. There should be no link generated now. >7. Extent the test to follow Bug 29616 logic: > >A. One with both branches.branchurl and OpacLibraryInfo defined >B. One with branches.branchurl but no OpacLibraryInfo defined >C. One with OpacLibraryInfo defined but no branches.branchurl >D. One with neither branches.branchurl nor OpacLibraryInfo defined >(neither for a specific library, nor default one) > >View the bibliographic detail page in the OPAC for title(s) which have >holdings from the libraries you configured above. In the holdings table, >check the behavior of the library name in the "Current library" or "Home >library" columns * > >- Case A: The library name appears as a link with an "info" icon. > Clicking it shows the library information in a modal window. In the > modal footer, a "Visit web site" button should take you to the correct > URL. >- Case B: The library name appears as a link without an icon. Clicking > the link takes you to the correct URL. >- Case C: The library name appears as a link with an "info" icon. > Clicking it shows the library information in a modal window. In the > modal footer there is no "Visit web site" button. >- Case D: The library name is plain text. > >* Display of "Current library" and/or "Home library" is controlled by > the OpacLocationBranchToDisplay system preference. > >Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum) >Signed-off-by: David Nind <david@davidnind.com> >--- > opac/opac-detail.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index edf609cb02..fb4ecadb15 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -714,9 +714,10 @@ if ( not $viewallitems and $items->count > $max_items_to_display ) { > # Get opac_info from Additional contents for home and holding library > my ( $opac_info_home, $opac_info_holding ); > $opac_info_holding = $library_info->{ $item->holdingbranch } >- // $item->holding_branch->opac_info( { lang => $lang } ); >+ // $item->holding_branch->opac_info( { lang => $lang } )->next; > $library_info->{ $item->holdingbranch } = $opac_info_holding; >- $opac_info_home = $library_info->{ $item->homebranch } // $item->home_branch->opac_info( { lang => $lang } ); >+ $opac_info_home = $library_info->{ $item->homebranch } >+ // $item->home_branch->opac_info( { lang => $lang } )->next; > $library_info->{ $item->homebranch } = $opac_info_home; > $item_info->{holding_library_info} = $opac_info_holding if $opac_info_holding; > $item_info->{home_library_info} = $opac_info_home if $opac_info_home; >-- >2.39.5 >
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 42020
:
194935
|
194937
|
194938
|
194939