Bugzilla – Attachment 174401 Details for
Bug 38422
Add data-isbn and data-title to lists for plugin cover images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38422: Allow plugin cover images in OPAC lists
Bug-38422-Allow-plugin-cover-images-in-OPAC-lists.patch (text/plain), 4.42 KB, created by
Matt Blenkinsop
on 2024-11-12 11:06:13 UTC
(
hide
)
Description:
Bug 38422: Allow plugin cover images in OPAC lists
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-12 11:06:13 UTC
Size:
4.42 KB
patch
obsolete
>From 05ff822fcb9be31a260ef9eac49ec3e90656078f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Tue, 12 Nov 2024 11:01:57 +0000 >Subject: [PATCH] Bug 38422: Allow plugin cover images in OPAC lists > >This patch updates the template to allow cover images from plugins in the OPAC list page. It adds a data-isbn and data-title attribute to the cover images element and also moves the element below the setting of the title so that we can pass that directly. > >It also adds the script call to allow the plugin method to work on the page > >Test plan: >1) View the patch diff and note that the data attributes have been added correctly >2) View the patch diff and note that the <a> tag has been moved below the setting of the img_title template variable >3) View the patch diff and note that the CoverImagePlugins variable has been set correctly (compare to the intranet file detail.tt for reference if needed) >4) Confirm that no changes have been made to any elements beyond adding the data attributes >--- > .../bootstrap/en/modules/opac-shelves.tt | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 143491b555c..0d3137ee663 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -3,6 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE AdditionalContents %] >+[% USE KohaPlugins %] > [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] > [% SET LoginEnabled = ( Koha.Preference('opacuserlogin') == 1 ) %] >@@ -16,6 +17,7 @@ > [% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled %] > [% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %] > [% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %] >+[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %] > > [% BLOCK delete_shelf %] > <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="deleteshelf[% shelf.shelfnumber | html %]" class="d-inline"> >@@ -384,12 +386,12 @@ > [% END %] > <td> > <div class="coverimages"> >- <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]"> >- [% IF ( itemsloo.title ) %] >- [% img_title = itemsloo.title %] >- [% ELSE %] >- [% img_title = itemsloo.biblionumber %] >- [% END %] >+ [% IF ( itemsloo.title ) %] >+ [% img_title = itemsloo.title %] >+ [% ELSE %] >+ [% img_title = itemsloo.biblionumber %] >+ [% END %] >+ <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber | html %]" data-isbn="[% itemsloo.normalized_isbn | html %]" data-title="[% img_title | html %]"> > > [% IF ( OPACLocalCoverImages ) %] > <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span> >@@ -812,6 +814,7 @@ > > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >+[% CoverImagePlugins | $raw %] > [% IF OpenLibraryCovers || OpenLibrarySearch %] > [% Asset.js("js/openlibrary.js") | $raw %] > [% END %] >-- >2.39.3 (Apple Git-146)
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 38422
:
174401
|
175412