Lines 36-41
Link Here
|
36 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
36 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
37 |
[% Asset.css("lib/verovio/midiplayer.css") | $raw %] |
37 |
[% Asset.css("lib/verovio/midiplayer.css") | $raw %] |
38 |
[% END %] |
38 |
[% END %] |
|
|
39 |
[% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %] |
39 |
</head> |
40 |
</head> |
40 |
[% BLOCK cssinclude %][% END %] |
41 |
[% BLOCK cssinclude %][% END %] |
41 |
[% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] |
42 |
[% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] |
Lines 58-128
Link Here
|
58 |
<div class="col-lg-9"> |
59 |
<div class="col-lg-9"> |
59 |
<div id="catalogue_detail_biblio" class="maincontent" data-biblionumber="[% biblio.biblionumber | html %]"> |
60 |
<div id="catalogue_detail_biblio" class="maincontent" data-biblionumber="[% biblio.biblionumber | html %]"> |
60 |
|
61 |
|
61 |
<div id="bookcover"> |
62 |
<div class="bookcover"> |
62 |
[% IF ( biblio.title ) %] |
|
|
63 |
[% img_title = biblio.title %] |
64 |
[% ELSE %] |
65 |
[% img_title = biblio.biblionumber %] |
66 |
[% END %] |
67 |
|
63 |
|
68 |
[% IF ( OPACLocalCoverImages ) %] |
64 |
<div id="biblio-cover-slider" class="cover-slider"> |
69 |
<div title="[% img_title | html %]" class="[% biblio.biblionumber | html %]" id="local-thumbnail-preview"></div> |
65 |
[% IF ( OPACLocalCoverImages ) %] |
70 |
[% END %] |
66 |
[% IF localimages.count %] |
71 |
|
67 |
[% FOREACH image IN localimages %] |
72 |
[% IF ( AdlibrisEnabled && normalized_isbn ) %] |
68 |
<div class="cover-image local-coverimg"> |
73 |
<a href="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]"><img src="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]" alt="Cover image" class="adlibris-cover-big" /></a> |
69 |
<a href="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
74 |
[% END %] |
70 |
<img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]" /> |
|
|
71 |
</a> |
72 |
<div class="hint">Local cover image</div> |
73 |
</div> |
74 |
[% END %] |
75 |
[% END %] |
76 |
[% END %] |
75 |
|
77 |
|
76 |
[% IF ( OPACAmazonCoverImages ) %] |
78 |
[% IF ( AdlibrisEnabled && normalized_isbn ) %] |
77 |
[% IF ( OPACURLOpenInNewWindow ) %] |
79 |
<div class="cover-image" id="adlibris-coverimg"> |
78 |
<a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link" target="_blank" rel="noreferrer"> |
80 |
<a href="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]" title="Addlibris cover image"> |
79 |
[% ELSE %] |
81 |
<img src="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]" class="adlibris-cover-big" alt="Adlibris cover image" /> |
80 |
<a href="http://www.amazon[% AmazonTld | uri %]/dp/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]"> |
82 |
</a> |
|
|
83 |
<div class="hint">Image from Adlibris</div> |
84 |
</div> |
81 |
[% END %] |
85 |
[% END %] |
82 |
<img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | html %].01.MZZZZZZZ.jpg" alt="Cover image" /></a> |
|
|
83 |
[% END %] |
84 |
|
86 |
|
85 |
[% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] |
87 |
[% IF ( OPACAmazonCoverImages && normalized_isbn) %] |
86 |
[% IF ( content_identifier_exists ) %] |
88 |
<div class="cover-image" id="amazon-bookcoverimg"> |
87 |
<img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% SyndeticsCoverImageSize | html %].GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% normalized_upc | html %]&oclc=[% normalized_oclc | html %]" alt="" class="thumbnail" /> |
89 |
<a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image"> |
88 |
[% ELSE %] |
90 |
<img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.MZZZZZZZ.jpg" alt="Amazon cover image" data-link="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"/> |
89 |
<span class="no-image">No cover image available</span> |
91 |
</a> |
|
|
92 |
<div class="hint">Image from Amazon.com</div> |
93 |
</div> |
90 |
[% END %] |
94 |
[% END %] |
91 |
[% END %] |
|
|
92 |
|
95 |
|
93 |
[% IF ( GoogleJackets ) %] |
96 |
[% IF ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') && normalized_isbn ) %] |
94 |
<div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="gbs-thumbnail-preview"></div> |
97 |
[% coce_id = normalized_ean || normalized_isbn %] |
95 |
[% END %] |
98 |
<div class="cover-image" id="coce-coverimg"> |
96 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
99 |
[% IF ( coce_id ) %] |
97 |
[% coce_id = normalized_ean || normalized_isbn | html %] |
100 |
<a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a> |
98 |
<div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview"></div> |
101 |
[% END %] |
99 |
[% END %] |
102 |
<div class="hint">Image from Coce</div> |
100 |
[% IF OpenLibraryCovers %] |
103 |
</div> |
101 |
<div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="openlibrary-thumbnail-preview"></div> |
|
|
102 |
[% END %] |
103 |
[% bt_id = ( normalized_upc || normalized_isbn ) %] |
104 |
[% IF ( BakerTaylorEnabled && bt_id ) %] |
105 |
[% IF BakerTaylorBookstoreURL %] |
106 |
[% IF ( OPACURLOpenInNewWindow ) %] |
107 |
<a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]" target="_blank" rel="noreferrer"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> |
108 |
[% ELSE %] |
109 |
<a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> |
110 |
[% END %] |
111 |
[% ELSE %] |
112 |
<img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> |
113 |
[% END %] |
104 |
[% END %] |
114 |
[% END %] |
105 |
|
115 |
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] |
106 |
[% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] |
116 |
[% SET custom_cover_image_url = biblio.custom_cover_image_url %] |
107 |
[% SET custom_cover_image_url = biblio.custom_cover_image_url %] |
117 |
[% IF custom_cover_image_url %] |
108 |
[% IF custom_cover_image_url %] |
118 |
[% IF ( OPACURLOpenInNewWindow ) %] |
109 |
<div class="cover-image" id="custom-coverimg"> |
119 |
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]" target="_blank" rel="noreferrer"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a> |
110 |
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image"> |
120 |
[% ELSE %] |
111 |
<img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" /> |
121 |
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a> |
112 |
</a> |
|
|
113 |
<div class="hint">Custom cover image</div> |
114 |
</div> |
122 |
[% END %] |
115 |
[% END %] |
123 |
[% END %] |
116 |
[% END %] |
124 |
[% END %] |
117 |
</div> <!-- /.cover-slider --> |
125 |
</div><!-- / #bookcover --> |
118 |
|
|
|
119 |
</div><!-- / .bookcover --> |
126 |
|
120 |
|
127 |
<abbr class="unapi-id" title="koha:biblionumber:[% biblio.biblionumber | html %]"><!-- unAPI --></abbr> |
121 |
<abbr class="unapi-id" title="koha:biblionumber:[% biblio.biblionumber | html %]"><!-- unAPI --></abbr> |
128 |
[% IF ( ocoins ) # COinS / Openurl %] |
122 |
[% IF ( ocoins ) # COinS / Openurl %] |
Lines 1020-1026
Link Here
|
1020 |
<div id="images"> |
1014 |
<div id="images"> |
1021 |
<p>Click on an image to view it in the image viewer</p> |
1015 |
<p>Click on an image to view it in the image viewer</p> |
1022 |
[% FOREACH image IN localimages %] |
1016 |
[% FOREACH image IN localimages %] |
1023 |
<a class="localimage" href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblio.biblionumber | html %]&imagenumber=[% image.imagenumber | html %]"><img alt="" src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | html %]" /></a> |
1017 |
<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblio.biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
|
|
1018 |
<img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" /> |
1019 |
</a> |
1024 |
[% END %] |
1020 |
[% END %] |
1025 |
</div><!-- / #images --> |
1021 |
</div><!-- / #images --> |
1026 |
[% END # / IF OPACLocalCoverImages && localimages.size %] |
1022 |
[% END # / IF OPACLocalCoverImages && localimages.size %] |
Lines 1271-1279
Link Here
|
1271 |
|
1267 |
|
1272 |
[% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] |
1268 |
[% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] |
1273 |
<td class="cover"> |
1269 |
<td class="cover"> |
1274 |
[% FOR image IN ITEM_RESULT.cover_images %] |
1270 |
<div class="bookcover"> |
1275 |
<div title="[% ITEM_RESULT.itemnumber | html %]" data-imagenumber="[% image.imagenumber | html %]" data-biblionumber="[% ITEM_RESULT.biblionumber | html %]" class="local-thumbnail-preview"></div> |
1271 |
<div class="cover-slider"> |
1276 |
[% END %] |
1272 |
[% FOR image IN ITEM_RESULT.cover_images %] |
|
|
1273 |
<div class="cover-image local-coverimg"> |
1274 |
<a href="/cgi-bin/koha/opac-image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
1275 |
<img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" /> |
1276 |
</a> |
1277 |
</div> |
1278 |
[% END %] |
1279 |
</div> |
1280 |
</div> |
1277 |
</td> |
1281 |
</td> |
1278 |
[% END %] |
1282 |
[% END %] |
1279 |
|
1283 |
|
Lines 1455-1460
Link Here
|
1455 |
[% Asset.js("lib/kjua/kjua.min.js") | $raw %] |
1459 |
[% Asset.js("lib/kjua/kjua.min.js") | $raw %] |
1456 |
[% END %] |
1460 |
[% END %] |
1457 |
|
1461 |
|
|
|
1462 |
[% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %] |
1463 |
|
1458 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
1464 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
1459 |
<script> |
1465 |
<script> |
1460 |
var interface = "[% interface | html %]"; |
1466 |
var interface = "[% interface | html %]"; |
Lines 1629-1650
Link Here
|
1629 |
$("#highlight_toggle_off").show().click(function() {highlightOff(); return false;}); |
1635 |
$("#highlight_toggle_off").show().click(function() {highlightOff(); return false;}); |
1630 |
[% END %] |
1636 |
[% END %] |
1631 |
[% END %] |
1637 |
[% END %] |
1632 |
[% IF ( GoogleJackets ) %] |
1638 |
|
1633 |
KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]); |
|
|
1634 |
[% END %] |
1635 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
1639 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
1636 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]); |
1640 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]); |
1637 |
[% END %] |
1641 |
[% END %] |
1638 |
|
1642 |
|
1639 |
[% IF OpenLibraryCovers %] |
1643 |
function verify_images() { |
1640 |
KOHA.OpenLibrary.GetCoverFromIsbn(); |
1644 |
// Loop over each container in the template which contains covers |
1641 |
[% END %] |
1645 |
$(".cover-slider").each(function(){ |
1642 |
[% IF OPACLocalCoverImages %] |
1646 |
var lightbox_descriptions = []; |
1643 |
KOHA.LocalCover.GetCoverFromBibnumber(true); |
1647 |
$(this).find(".cover-image").each( function( index ){ |
1644 |
[% IF itemloop_has_images OR oheritemloop_has_images %] |
1648 |
var div = $(this); |
1645 |
KOHA.LocalCover.GetCoverFromItemnumber(true); |
1649 |
// Find the image in the container |
1646 |
[% END %] |
1650 |
var img = div.find("img")[0]; |
1647 |
[% END %] |
1651 |
if( $(img).length > 0 ){ |
|
|
1652 |
var description = ""; |
1653 |
if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){ |
1654 |
// No image loaded in the container. Remove the slide |
1655 |
div.remove(); |
1656 |
} else { |
1657 |
// All slides start hidden. If this is the first one, show it. |
1658 |
if( index == 0 ){ |
1659 |
div.show(); |
1660 |
} |
1661 |
// Check if Amazon image is present |
1662 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
1663 |
w = img.width; |
1664 |
h = img.height; |
1665 |
if ((w == 1) || (h == 1)) { |
1666 |
// Amazon returned single-pixel placeholder |
1667 |
// Remove the container |
1668 |
div.remove(); |
1669 |
} else { |
1670 |
lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link'))); |
1671 |
} |
1672 |
} else if( div.attr("id") == "custom-coverimg" ){ |
1673 |
if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) { |
1674 |
// No image was loaded via the CustomCoverImages system preference |
1675 |
// Remove the container |
1676 |
div.remove(); |
1677 |
} else { |
1678 |
lightbox_descriptions.push("Custom cover image"); |
1679 |
} |
1680 |
} else if( div.attr("id") == "coce-coverimg" ){ |
1681 |
// Identify which service's image is being loaded by Coce |
1682 |
var coce_description; |
1683 |
if( $(img).attr("src").indexOf('amazon.com') >= 0 ){ |
1684 |
coce_description = ("Coce image from Amazon.com"); |
1685 |
} else if( $(img).attr("src").indexOf('google.com') >= 0 ){ |
1686 |
coce_description = _("Coce image from Google Books"); |
1687 |
} else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){ |
1688 |
coce_description = _("Coce image from Open Library"); |
1689 |
} |
1690 |
div.find(".hint").html(coce_description); |
1691 |
lightbox_descriptions.push(coce_description); |
1692 |
} else if ( div.attr("id") == "adlibris-coverimg" ){ |
1693 |
lightbox_descriptions.push(_("Image from Adlibris (<a href='%s'>see the original image</a>)").format($(img).data('link'))); |
1694 |
} else if ( div.attr("class") == "cover-image local-coverimg" ) { |
1695 |
lightbox_descriptions.push(_("Local cover image")); |
1696 |
} else { |
1697 |
console.log("Source of the image cannot be guessed.") |
1698 |
} |
1699 |
} |
1700 |
} |
1701 |
}); |
1702 |
|
1703 |
// Lightbox for cover images |
1704 |
Chocolat(this.querySelectorAll('.cover-image a'), { |
1705 |
description: function(){ |
1706 |
return lightbox_descriptions[this.settings.currentImageIndex]; |
1707 |
} |
1708 |
}); |
1709 |
|
1710 |
}); |
1711 |
|
1712 |
$(".cover-slider").each(function(){ |
1713 |
var coverSlide = this; |
1714 |
var coverImages = $(this).find(".cover-image"); |
1715 |
if( coverImages.length > 1 ){ |
1716 |
coverImages.each(function( index ){ |
1717 |
// If more that one image is present, add a navigation link |
1718 |
// for activating the slide |
1719 |
var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>"); |
1720 |
if( index == 0 ){ |
1721 |
// Set the first navigation link as active |
1722 |
$(covernav).addClass("nav-active"); |
1723 |
} |
1724 |
$(covernav).html("<i class=\"fa fa-circle\"></i>"); |
1725 |
$(coverSlide).append( covernav ); |
1726 |
}); |
1727 |
} |
1728 |
|
1729 |
if( $(coverSlide).find(".cover-image:visible").length < 1 ){ |
1730 |
$(coverSlide).remove(); |
1731 |
} else { |
1732 |
$(coverSlide).addClass("cover-slides"); |
1733 |
} |
1734 |
}); |
1735 |
|
1736 |
$(".cover-slider").on("click",".cover-nav", function(e){ |
1737 |
e.preventDefault(); |
1738 |
var cover_slider = $(this).parent(); |
1739 |
// Adding click handler for cover image navigation links |
1740 |
var num = $(this).data("num"); |
1741 |
$(cover_slider).find(".cover-nav").removeClass("nav-active"); |
1742 |
$(this).addClass("nav-active"); |
1743 |
$(cover_slider).find(".cover-image").hide(); |
1744 |
$(cover_slider).find(".cover-image").eq( num ).show(); |
1745 |
}); |
1746 |
|
1747 |
$("#editions img").each(function(i){ |
1748 |
if ( this.src.indexOf('amazon.com') >= 0 ) { |
1749 |
w = this.width; |
1750 |
h = this.height; |
1751 |
if ((w == 1) || (h == 1)) { |
1752 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
1753 |
} else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) { |
1754 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
1755 |
} |
1756 |
} |
1757 |
}); |
1758 |
} |
1759 |
|
1760 |
$(window).load(function() { |
1761 |
verify_images(); |
1762 |
}); |
1648 |
[% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] |
1763 |
[% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] |
1649 |
novSelect.loadContentForQuery( |
1764 |
novSelect.loadContentForQuery( |
1650 |
{ |
1765 |
{ |