Bugzilla – Attachment 34815 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]
Bug 11982 - Show local cover image in the intranet biblio details page
Bug-11982---Show-local-cover-image-in-the-intranet.patch (text/plain), 6.05 KB, created by
simith.doliveira
on 2014-12-29 13:55:38 UTC
(
hide
)
Description:
Bug 11982 - Show local cover image in the intranet biblio details page
Filename:
MIME Type:
Creator:
simith.doliveira
Created:
2014-12-29 13:55:38 UTC
Size:
6.05 KB
patch
obsolete
>From 7b993a2b70926126ef441ec84064e245f017fbe5 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] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js | 1 + > .../prog/en/modules/catalogue/detail.tt | 34 +++++++++++++++++++--- > koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js | 1 + > 3 files changed, 32 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js b/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js >index f044f62..58e13cf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/localcovers.js >+++ b/koha-tmpl/intranet-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/catalogue/image.pl?thumbnail=1&biblionumber=' + $(mydiv).attr("class")) >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 ee5915e..c3ea895 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -184,6 +184,9 @@ function verify_images() { > $("#marcPreview").on("hidden", function(){ > $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >+ [% IF LocalCoverImages %] >+ KOHA.LocalCover.GetCoverFromBibnumber(true); >+ [% END %] > }); > > [% IF ( AmazonCoverImages ) %]$(window).load(function() { >@@ -373,8 +376,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 %]&viewas=html" title="MARC" class="previewMARC">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> >@@ -437,8 +450,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/bootstrap/js/localcovers.js b/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js >index 7bd7ae2..e9d2f9e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/localcovers.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/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