Bugzilla – Attachment 94236 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 reviews
Bug-22445-Custom-cover-images---opac-reviews.patch (text/plain), 2.27 KB, created by
Jonathan Druart
on 2019-10-16 07:17:38 UTC
(
hide
)
Description:
Bug 22445: Custom cover images - opac reviews
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-10-16 07:17:38 UTC
Size:
2.27 KB
patch
obsolete
>From 101087ddcfc27ba1551b511da8a3b3e8b8c50cbb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Feb 2019 18:55:38 -0300 >Subject: [PATCH] Bug 22445: Custom cover images - opac reviews > >Test plan: >- enable OpacShowRecentComments >- make a comment (OPAC) >- approve it (staff) >- click 'Recent comments' (OPAC) >=> You should see the custom cover > >Sponsored-by: Orex Digital > >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt | 5 +++++ > opac/opac-showreviews.pl | 2 ++ > 2 files changed, 7 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >index 2d2df6f15d..6d0c9babd1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >@@ -150,6 +150,11 @@ > <span class="no-image">No cover image available</span> > [% END %] > [% END %] >+ >+ [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] >+ <a href="[% review.biblio_object.custom_cover_image_url | url %]"><img alt="Cover image" src="[% review.biblio_object.custom_cover_image_url | url %]" /></a> >+ [% END %] >+ > </td> > </tr> > [% END # / FOREACH review %] >diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl >index 8635dd7822..09363cc1a5 100755 >--- a/opac/opac-showreviews.pl >+++ b/opac/opac-showreviews.pl >@@ -109,6 +109,8 @@ for my $result (@$reviews){ > $result->{notes} = $biblioitem->notes; > $result->{timestamp} = $biblioitem->timestamp; > >+ $result->{biblio_object} = $biblio; # TODO Use this variable directly in the template >+ > my $patron = Koha::Patrons->find( $result->{borrowernumber} ); > if ( $patron ) { > $result->{borrtitle} = $patron->title; >-- >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