Bugzilla – Attachment 173590 Details for
Bug 37916
Plugin search and install regression
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36154: Display images coming from plugin
Bug-36154-Display-images-coming-from-plugin.patch (text/plain), 12.01 KB, created by
Hammat wele
on 2024-10-28 20:41:26 UTC
(
hide
)
Description:
Bug 36154: Display images coming from plugin
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2024-10-28 20:41:26 UTC
Size:
12.01 KB
patch
obsolete
>From b7b847e846a8d975e215a6bd116ee0ef7e91ed51 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 26 Jun 2024 15:03:30 +0000 >Subject: [PATCH] Bug 36154: Display images coming from plugin > >this patch makes the summary page(opac-user), the list pages (opac-shelves.pl, shelves.pl), the Checkout history page (opac-readingrecord.pl) and shelfbrowser to be able to display images coming from plugin. > >https://bugs.koha-community.org/show_bug.cgi?id=37916 >--- > .../bootstrap/en/includes/shelfbrowser.inc | 6 ++++-- > .../bootstrap/en/modules/opac-readingrecord.tt | 5 ++++- > .../bootstrap/en/modules/opac-shelves.tt | 5 ++++- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 15 +++++++++------ > 4 files changed, 21 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >index 78c6139142..63964192d5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc >@@ -28,10 +28,12 @@ > [% img_title = item.biblionumber %] > [% END %] > >- [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %] >+ [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) || CoverImagePlugins ) %] > <a class="shelfbrowser_cover" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser"> > [% IF ( OPACLocalCoverImages ) %] >- <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"></div> >+ <div title="[% img_title | html %]" class="[% item.biblionumber | html %] thumbnail-shelfbrowser" id="local-thumbnail-shelf-[% item.biblionumber | html %]"> >+ <img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=[% item.biblionumber | uri %]" alt="Local cover image" /> >+ </div> > [% END %] > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( item.browser_normalized_isbn ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 34aebe1983..3a80f1c29d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -5,8 +5,10 @@ > [% USE AdditionalContents %] > [% USE Asset %] > [% USE Price %] >+[% 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 CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Your checkout history › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -139,7 +141,7 @@ > [% END %] > [% issuetype | html %] > </td> >- <td> >+ <td data-biblionumber="[% biblio.biblionumber | html %]"> > [% SET normalized_isbn = biblio.normalized_isbn %] > [% IF OPACAmazonCoverImages %] > [% IF normalized_isbn %] >@@ -227,6 +229,7 @@ > [% BLOCK jsinclude %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] >+[% CoverImagePlugins | $raw %] > <script> > $(document).ready(function(){ > [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] >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 d012228a31..5492217922 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"> >@@ -391,7 +393,7 @@ > [% img_title = itemsloo.biblionumber %] > [% END %] > >- [% IF ( OPACLocalCoverImages ) %] >+ [% IF ( OPACLocalCoverImages && itemsloo.biblio_object.cover_images.count > 0 ) %] > <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span> > [% END %] > >@@ -815,6 +817,7 @@ > [% IF OpenLibraryCovers || OpenLibrarySearch %] > [% Asset.js("js/openlibrary.js") | $raw %] > [% END %] >+[% CoverImagePlugins | $raw %] > <script> > const loggedinusername = [% ( loggedinusername ) ? 1 : 0 | html %]; > const opacbookbag = [% ( opacbookbag ) ? 1 : 0 | html %]; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index b6780c18f5..fce7d71666 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -7,9 +7,11 @@ > [% USE Price %] > [% USE AuthorisedValues %] > [% 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 OpacMySummaryNote = AdditionalContents.get( location => "OpacMySummaryNote", lang => lang, library => branchcode ) %] >+[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %] > > [% SET borrower_club_enrollments = logged_in_user.get_club_enrollments %] > [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1) %] <!-- 1 => OPAC --> >@@ -331,7 +333,7 @@ > <caption>[% issues_count | html %] Item(s) checked out</caption> > <thead> > <tr> >- [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %] >+ [% IF ( JacketImages || CoverImagePlugins ) %]<th class="nosort"> </th>[% END %] > <th class="all anti-the">Title</th> > <th>Author</th> > <th class="psort">Due</th> >@@ -361,8 +363,8 @@ > <tbody> > [% FOREACH ISSUE IN ISSUES %] > [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %] >- [% IF ( JacketImages ) %] >- <td class="jacketcell"> >+ [% IF ( JacketImages || CoverImagePlugins ) %] >+ <td class="jacketcell" data-biblionumber="[% ISSUE.biblionumber | html %]"> > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( ISSUE.normalized_isbn ) %] > <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% ISSUE.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail"/></a> >@@ -719,7 +721,7 @@ > <!-- OVERDUES TABLE ROWS --> > <thead> > <tr> >- [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %] >+ [% IF ( JacketImages || CoverImagePlugins ) %]<th class="nosort"> </th>[% END %] > <th class="all anti-the">Title</th> > [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %] > [% IF ( show_barcode ) %]<th>Barcode</th>[% END %] >@@ -737,8 +739,8 @@ > <tbody> > [% FOREACH OVERDUE IN OVERDUES %] > <tr> >- [% IF ( JacketImages ) %] >- <td class="jacketcell"> >+ [% IF ( JacketImages || CoverImagePlugins ) %] >+ <td class="jacketcell" data-biblionumber="[% OVERDUE.biblionumber | html %]"> > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( OVERDUE.normalized_isbn ) %] > <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% OVERDUE.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail" /></a> >@@ -1090,6 +1092,7 @@ > [% Asset.js("js/form-submit.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >+ [% CoverImagePlugins | $raw %] > <script> > var AR_CAPTION_COUNT = _("(%s total)"); > >-- >2.34.1
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 37916
:
171457
|
171462
|
171470
|
173589
|
173590
|
173591