Bugzilla – Attachment 163136 Details for
Bug 35558
Do not fetch local image if none exists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35558: Do not retrieve the local image if none exists - OPAC
Bug-35558-Do-not-retrieve-the-local-image-if-none-.patch (text/plain), 2.25 KB, created by
Jonathan Druart
on 2024-03-14 14:02:21 UTC
(
hide
)
Description:
Bug 35558: Do not retrieve the local image if none exists - OPAC
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-14 14:02:21 UTC
Size:
2.25 KB
patch
obsolete
>From 826e66c6da535d343b407e141cfd995a0916aeeb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 14 Mar 2024 15:01:39 +0100 >Subject: [PATCH] Bug 35558: Do not retrieve the local image if none exists - > OPAC > >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- > opac/opac-search.pl | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 043b1bbc69c..dbfdc6c3a0a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -350,7 +350,7 @@ > <div class="coverimages cover-slides itemtype_[% SEARCH_RESULT.itemtype | html %]" data-isbn="[% To.json(SEARCH_RESULT.normalized_isbn) | $raw %]" data-imgtitle="[% img_title | html %]"> > <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]"> > >- [% IF ( OPACLocalCoverImages ) %] >+ [% IF ( OPACLocalCoverImages && SEARCH_RESULT.has_local_cover_image ) %] > <span title="[% img_title | html %]" class="[% SEARCH_RESULT.biblionumber | html %]" id="local-thumbnail[% loop.count | html %]"></span> > [% END %] > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 16b69332ff3..540b693ace0 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -702,6 +702,10 @@ for (my $i=0;$i<@servers;$i++) { > > # BZ17530: 'Intelligent' guess if result can be article requested > $res->{artreqpossible} = ( $art_req_itypes->{ $res->{itemtype} // q{} } || $art_req_itypes->{ '*' } ) ? 1 : q{}; >+ >+ if ( C4::Context->preference('OPACLocalCoverImages') ) { >+ $res->{has_local_cover_image} = $res->{biblio_object}->cover_images->count; >+ } > } > > if ($results_hashref->{$server}->{"hits"}){ >-- >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 35558
:
159785
|
160059
|
163136
|
164295
|
164296