| Summary: | (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Janusz Kaczmarek <januszop> |
| Component: | OPAC | Assignee: | Janusz Kaczmarek <januszop> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | david, oleonard |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | Sponsored | Comma delimited list of Sponsors: | Pontificia Università di San Tommaso d'Aquino (Angelicum), Pontificia Università di San Tommaso d'Aquino (Angelicum) |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes the link to library information (the (i) icon) in the OPAC holdings table, before the current and home library name. The (i) icon now only appears if the OpacLibraryInfo HTML customization is defined.
Before this, a link to library information was appearing even if OpacLibraryInfo was not defined.
(If there is:
- only a URL defined for the library, the current and home library is an active link to the website
- an OpacLibraryInfo HTML customization AND a URL defined for the library, an (i) icon is shown and in the pop-up window there is the library information and a button with "Visit website".)
(This is related to bug 39482 - Link to edit OpacLibraryInfo from library edit page broken, included in Koha 26.05.00 and 25.11.01.)
|
Version(s) released in: | |
| Circulation function: | |||
| Attachments: |
Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL
Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL Bug 42020: (follow-up) Fix spelling for button - web site to website |
||
|
Description
Janusz Kaczmarek
2026-03-07 14:05:52 UTC
Created attachment 194935 [details] [review] Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL 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) Created attachment 194937 [details] [review] Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL 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> Created attachment 194938 [details] [review] Bug 42020: (Bug 39482 follow-up) Library info link shown in OPAC without OpacLibraryInfo and library URL 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> Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum) Created attachment 194939 [details] [review] Bug 42020: (follow-up) Fix spelling for button - web site to website Changes the spelling for the button in the pop-up window (when a library URL is defined) - "Visit web site" to "Visit website". The common spelling now is just website. Signed-off-by: David Nind <david@davidnind.com> Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum) |