Bugzilla – Attachment 179892 Details for
Bug 36154
Add the ability for some pages to be able to use images coming from plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36154: Showing LocalCoverImages and CustomCoverImages in the list page in staff interface
Bug-36154-Showing-LocalCoverImages-and-CustomCover.patch (text/plain), 4.95 KB, created by
Shi Yao Wang
on 2025-03-28 20:43:35 UTC
(
hide
)
Description:
Bug 36154: Showing LocalCoverImages and CustomCoverImages in the list page in staff interface
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2025-03-28 20:43:35 UTC
Size:
4.95 KB
patch
obsolete
>From 5c3580922476c04f43cdd1591f1a65e0706b5351 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 26 Jun 2024 12:32:13 +0000 >Subject: [PATCH] Bug 36154: Showing LocalCoverImages and CustomCoverImages in > the list page in staff interface >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test > >1. Log in to the staff interface >2. Make sure the system preference LocalCoverImages has «Show» value >3. Create a new list > 4.1. Click on «More» menu then click on «List» and click on «New List» >4. Search for a record and add a local image to it >5. Add the record to the list created on step 4.1 >6. Check the list > ----> The image is not displayed >7. Apply the patch >8. Check the list again > ----> the image is now display in a new column named «Cover» >9. Put the system preference LocalCoverImages to «Don't show» and CustomCoverImages to « Show » and add an image url to CustomCoverImagesURL (https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/481px-Cat03.jpg) >10. Check the list again >----> the image in CustomCoverImagesURL is display in the column named «Cover» > >https://bugs.koha-community.org/show_bug.cgi?id=37916 >--- > .../prog/en/modules/virtualshelves/shelves.tt | 21 +++++++++++++++++++ > virtualshelves/shelves.pl | 1 + > 2 files changed, 22 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index ed1323169c..ea5265cbfd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -5,8 +5,10 @@ > [% USE KohaDates %] > [% USE AuthorisedValues %] > [% USE Branches %] >+[% USE KohaPlugins %] > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] >+[% SET CoverImagePlugins = KohaPlugins.get_plugins_intranet_cover_images %] > [% INCLUDE 'doc-head-open.inc' %] > <title > >[% FILTER collapse %] >@@ -295,6 +297,9 @@ > [% UNLESS ( item_level_itypes ) %] > <th>Item type</th> > [% END %] >+ [% IF ( CoverImagePlugins || LocalCoverImages || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL'))) %] >+ <th>Cover</th> >+ [% END %] > [% SET sort_class = 'dt-orderable-asc dt-orderable-desc' %] > [% IF sortfield == 'title' %] > [% sort_class = sort_class _ " dt-ordering-" _ direction %] >@@ -356,6 +361,22 @@ > <span class="itypetext">[% itemsloo.description | html %]</span> > </td> > [% END %] >+ [% IF LocalCoverImages && itemsloo.biblio_object.cover_images.count > 0 %] >+ <td> >+ <span title="[% img_title | html %]" class="[% itemsloo.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span> >+ <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=[% itemsloo.biblionumber | uri %]" alt="Local cover image" /> >+ </td> >+ [% ELSIF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') && (custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url) %] >+ <td> >+ [% IF custom_cover_image_url %] >+ <a class="custom_cover_image" href="[% PROCESS biblio_a_href biblionumber => itemsloo.biblionumber %]"> >+ <img alt="Custom cover image" src="[% custom_cover_image_url | url %]" /></a> >+ [% END %] >+ </td> >+ [% ELSE %] >+ <td> >+ </td> >+ [% END %] > <td> > [% IF ( itemsloo.XSLTBloc ) %] > [% itemsloo.XSLTBloc | $raw %] >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index f51f7d064b..3d39fa628c 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -367,6 +367,7 @@ if ( $op eq 'view' ) { > # Getting items infos for location display > my $items = $biblio->items; > $this_item->{'ITEM_RESULTS'} = $items; >+ $this_item->{biblio_object} = $biblio; > $this_item->{biblionumber} = $biblionumber; > push @items, $this_item; > } >-- >2.43.0
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 36154
:
163744
|
168157
|
168158
|
168925
|
170295
|
170296
|
170297
|
173593
|
173594
|
173595
|
175490
|
175491
|
175492
|
179892
|
179893
|
179894
|
181290
|
181291
|
181292