Bugzilla – Attachment 170295 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), 5.42 KB, created by
Hammat wele
on 2024-08-13 20:11:41 UTC
(
hide
)
Description:
Bug 36154: Showing LocalCoverImages and CustomCoverImages in the list page in staff interface
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2024-08-13 20:11:41 UTC
Size:
5.42 KB
patch
obsolete
>From 308093611306b192c4703f143b2ee4c4ae878a23 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» >--- > .../prog/en/modules/virtualshelves/shelves.tt | 22 +++++++++++++++++++ > virtualshelves/shelves.pl | 1 + > 2 files changed, 23 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 4a0d749579..2b3e21247a 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 %] > [% IF op == 'view' %] >@@ -287,6 +289,9 @@ > [% UNLESS ( item_level_itypes ) %] > <th>Item type</th> > [% END %] >+ [% IF ( CoverImagePlugins || LocalCoverImages || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL'))) %] >+ <th>Cover</th> >+ [% END %] > [% IF sortfield == 'title' %] > <th class="sorting_[% direction | html %]"> > [% ELSE %] >@@ -332,6 +337,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 %] >@@ -622,6 +643,7 @@ > [% IF op == 'view' %] > [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] > [% END %] >+ [% CoverImagePlugins | $raw %] > <script> > var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); > var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index e3e7a868e4..ac050b92b0 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -344,6 +344,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.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 36154
:
163744
|
168157
|
168158
|
168925
|
170295
|
170296
|
170297
|
173593
|
173594
|
173595
|
175490
|
175491
|
175492
|
179892
|
179893
|
179894
|
181290
|
181291
|
181292