Bugzilla – Attachment 32746 Details for
Bug 11982
Show local cover images in the biblio details page in the intranet.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11982 - Show local cover image in the intranet biblio details page
PASSED-QA-Bug-11982---Show-local-cover-image-in-th.patch (text/plain), 5.89 KB, created by
Katrin Fischer
on 2014-10-25 20:35:00 UTC
(
hide
)
Description:
[PASSED QA] Bug 11982 - Show local cover image in the intranet biblio details page
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-10-25 20:35:00 UTC
Size:
5.89 KB
patch
obsolete
>From 6480f0bb900241160e0ebd30381b8039d7c95ccf Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= <frederick.capovilla@libeo.com> >Date: Fri, 21 Mar 2014 11:39:13 -0400 >Subject: [PATCH] [PASSED QA] Bug 11982 - Show local cover image in the > intranet biblio details page > >Also, fix useless "No cover image" block when using Amazon and local >cover images at the same time. > >http://bugs.koha-community.org/show_bug.cgi?id=11982 >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/catalogue/detail.tt | 34 +++++++++++++++++++--- > koha-tmpl/opac-tmpl/ccsr/en/js/localcovers.js | 1 + > koha-tmpl/opac-tmpl/prog/en/js/localcovers.js | 1 + > 3 files changed, 32 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e10d95f..e3ca17a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -175,6 +175,9 @@ function verify_images() { > [% IF ( LocalCoverImages && ! localimages.0 ) %] > showNoImageMessage(); > [% END %] >+ [% IF LocalCoverImages %] >+ KOHA.LocalCover.GetCoverFromBibnumber(true); >+ [% END %] > }); > > [% IF ( AmazonCoverImages ) %]$(window).load(function() { >@@ -366,8 +369,18 @@ function verify_images() { > <span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span> > [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %] > >- [% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg"> >- <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a>[% END %] >+ [% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] >+ </div><div class="yui-u" id="bookcoverimg"> >+ [% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] >+ [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> >+ <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> >+ [% IF ( using_https ) %] >+ <img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> >+ [% ELSE %] >+ <img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> >+ [% END %] >+ </a></div>[% END %][% END %] >+ [% END %] > [% ELSE %] > > <h3>[% title |html %]</h3> >@@ -430,8 +443,21 @@ function verify_images() { > </ul> > </div> > >-[% IF ( AmazonCoverImages ) %]<div class="yui-u" id="bookcoverimg"> >-<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a></div>[% END %] >+ [% IF ( ( AmazonEnabled && AmazonCoverImages ) || LocalCoverImages ) %] >+ <div class="yui-u" id="bookcoverimg"> >+ [% IF ( LocalCoverImages ) %]<div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>[% END %] >+ [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]<div id="bookcoverimg"> >+ <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"> >+ [% IF ( using_https ) %] >+ <img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> >+ [% ELSE %] >+ <img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /> >+ [% END %] >+ </a> >+ </div> >+ [% END %][% END %] >+ </div> >+ [% END %] > > <div class="yui-u" style="margin-top: 1em;"> > <ul> >diff --git a/koha-tmpl/opac-tmpl/ccsr/en/js/localcovers.js b/koha-tmpl/opac-tmpl/ccsr/en/js/localcovers.js >index f2808ef..93f2b3a 100644 >--- a/koha-tmpl/opac-tmpl/ccsr/en/js/localcovers.js >+++ b/koha-tmpl/opac-tmpl/ccsr/en/js/localcovers.js >@@ -23,6 +23,7 @@ KOHA.LocalCover = { > var message = document.createElement("span"); > $(message).attr("class","no-image"); > $(message).html(NO_LOCAL_JACKET); >+ $(mydiv).parent().find('.no-image').remove(); > $(mydiv).append(message); > var img = $("<img />").attr('src', > '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) >diff --git a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >index 7bd7ae2..e9d2f9e 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >+++ b/koha-tmpl/opac-tmpl/prog/en/js/localcovers.js >@@ -23,6 +23,7 @@ KOHA.LocalCover = { > var message = document.createElement("span"); > $(message).attr("class","no-image"); > $(message).html(NO_LOCAL_JACKET); >+ $(mydiv).parent().find('.no-image').remove(); > $(mydiv).append(message); > var img = $("<img />").attr('src', > '/cgi-bin/koha/opac-image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) >-- >1.9.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 11982
:
26514
|
26515
|
30625
|
30626
|
30627
|
30689
|
30690
|
32636
|
32637
|
32638
|
32746
|
32747
|
32748
|
34813
|
34815
|
34816
|
36626
|
36627
|
36852
|
36853
|
36854
|
114729