Bugzilla – Attachment 89984 Details for
Bug 22445
Ability to define a URL for custom cover images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22445: Custom cover images - opac user (checkout list)
Bug-22445-Custom-cover-images---opac-user-checkout.patch (text/plain), 3.12 KB, created by
Jonathan Druart
on 2019-05-23 02:41:01 UTC
(
hide
)
Description:
Bug 22445: Custom cover images - opac user (checkout list)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-23 02:41:01 UTC
Size:
3.12 KB
patch
obsolete
>From e4f151ab1faa7bfe4bcf416c78c6f27140658d11 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Feb 2019 19:06:06 -0300 >Subject: [PATCH] Bug 22445: Custom cover images - opac user (checkout list) > >Test plan: >- Check an item out to a patron >- At the OPAC loggin as this patron >On the checkout list you should see the cover image. > >Sponsored-by: Orex Digital >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++++ > opac/opac-user.pl | 7 ++++++- > 2 files changed, 10 insertions(+), 1 deletion(-) > >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 12aad6bbe0..d28a34a9fc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -241,6 +241,10 @@ > [% END %] > [% END %] > >+ [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] >+ <a href="[% ISSUE.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% ISSUE.biblio_object.custom_cover_image_url | url %]" /></a> >+ [% END %] >+ > [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] > <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% ISSUE.normalized_upc | html %]&oclc=[% ISSUE.normalized_oclc | html %]" alt="" class="item-thumbnail" /> > [% END %] >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 4ef0fb3c0b..1e2b40b66a 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -33,6 +33,7 @@ use C4::Biblio; > use C4::Items; > use C4::Letters; > use Koha::Account::Lines; >+use Koha::Biblios; > use Koha::Libraries; > use Koha::DateUtils; > use Koha::Holds; >@@ -253,6 +254,8 @@ if ( $pending_checkouts->count ) { # Useless test > $issue->{'imageurl'} = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} ); > $issue->{'description'} = $itemtypes->{$itemtype}->{'description'}; > } >+ >+ $issue->{biblio_object} = Koha::Biblios->find($issue->{biblionumber}); > push @issuedat, $issue; > $count++; > >@@ -309,7 +312,9 @@ if (C4::Context->preference('BakerTaylorEnabled')) { > if (C4::Context->preference("OPACAmazonCoverImages") or > C4::Context->preference("GoogleJackets") or > C4::Context->preference("BakerTaylorEnabled") or >- C4::Context->preference("SyndeticsCoverImages")) { >+ C4::Context->preference("SyndeticsCoverImages") or >+ ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') ) >+) { > $template->param(JacketImages=>1); > } > >-- >2.11.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 22445
:
85925
|
85926
|
85927
|
85928
|
85929
|
85930
|
85931
|
85932
|
85933
|
85934
|
85935
|
85936
|
85937
|
85938
|
86214
|
86726
|
86727
|
87434
|
89973
|
89974
|
89975
|
89976
|
89977
|
89978
|
89979
|
89980
|
89981
|
89982
|
89983
|
89984
|
89985
|
89986
|
89987
|
89988
|
89989
|
89996
|
89997
|
89998
|
89999
|
90000
|
90001
|
90002
|
90003
|
90004
|
90005
|
90006
|
90007
|
90009
|
90010
|
90011
|
90012
|
90013
|
94227
|
94228
|
94229
|
94230
|
94231
|
94232
|
94233
|
94234
|
94235
|
94236
|
94237
|
94238
|
94239
|
94240
|
94241
|
94242
|
94243
|
94244
|
94559
|
94560
|
94561
|
94562
|
94563
|
94564
|
94566
|
94567
|
94568
|
94569
|
94570
|
94571
|
94572
|
94573
|
94574
|
94575
|
94576
|
94577