|
Lines 34-39
Link Here
|
| 34 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
34 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
| 35 |
[% Asset.css("lib/verovio/midiplayer.css") | $raw %] |
35 |
[% Asset.css("lib/verovio/midiplayer.css") | $raw %] |
| 36 |
[% END %] |
36 |
[% END %] |
|
|
37 |
[% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %] |
| 37 |
</head> |
38 |
</head> |
| 38 |
[% BLOCK cssinclude %][% END %] |
39 |
[% BLOCK cssinclude %][% END %] |
| 39 |
[% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] |
40 |
[% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] |
|
Lines 56-122
Link Here
|
| 56 |
<div class="col-lg-9"> |
57 |
<div class="col-lg-9"> |
| 57 |
<div id="catalogue_detail_biblio" class="maincontent" data-biblionumber="[% biblio.biblionumber | html %]"> |
58 |
<div id="catalogue_detail_biblio" class="maincontent" data-biblionumber="[% biblio.biblionumber | html %]"> |
| 58 |
|
59 |
|
| 59 |
<div id="bookcover"> |
60 |
<div class="bookcover"> |
| 60 |
[% IF ( biblio.title ) %] |
|
|
| 61 |
[% img_title = biblio.title %] |
| 62 |
[% ELSE %] |
| 63 |
[% img_title = biblio.biblionumber %] |
| 64 |
[% END %] |
| 65 |
|
61 |
|
| 66 |
[% IF ( OPACLocalCoverImages ) %] |
62 |
<div id="biblio-cover-slider" class="cover-slider"> |
| 67 |
<div title="[% img_title | html %]" class="[% biblio.biblionumber | html %]" id="local-thumbnail-preview"></div> |
63 |
[% IF ( OPACLocalCoverImages ) %] |
| 68 |
[% END %] |
64 |
[% IF localimages.count %] |
| 69 |
|
65 |
[% FOREACH image IN localimages %] |
| 70 |
[% IF ( OPACAmazonCoverImages ) %] |
66 |
<div class="cover-image local-coverimg"> |
| 71 |
[% IF ( OPACURLOpenInNewWindow ) %] |
67 |
<a href="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
| 72 |
<a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link" target="_blank" rel="noreferrer"> |
68 |
<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 %]" /> |
| 73 |
[% ELSE %] |
69 |
</a> |
| 74 |
<a href="http://www.amazon[% AmazonTld | uri %]/dp/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]"> |
70 |
<div class="hint">Local cover image</div> |
|
|
71 |
</div> |
| 72 |
[% END %] |
| 73 |
[% END %] |
| 75 |
[% END %] |
74 |
[% END %] |
| 76 |
<img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | html %].01.MZZZZZZZ.jpg" alt="Cover image" /></a> |
|
|
| 77 |
[% END %] |
| 78 |
|
75 |
|
| 79 |
[% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] |
76 |
[% IF ( OPACAmazonCoverImages && normalized_isbn) %] |
| 80 |
[% IF ( content_identifier_exists ) %] |
77 |
<div class="cover-image" id="amazon-bookcoverimg"> |
| 81 |
<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" /> |
78 |
<a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image"> |
| 82 |
[% ELSE %] |
79 |
<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"/> |
| 83 |
<span class="no-image">No cover image available</span> |
80 |
</a> |
|
|
81 |
<div class="hint">Image from Amazon.com</div> |
| 82 |
</div> |
| 84 |
[% END %] |
83 |
[% END %] |
| 85 |
[% END %] |
|
|
| 86 |
|
84 |
|
| 87 |
[% IF ( GoogleJackets ) %] |
85 |
[% IF ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') && normalized_isbn ) %] |
| 88 |
<div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="gbs-thumbnail-preview"></div> |
86 |
[% coce_id = normalized_ean || normalized_isbn %] |
| 89 |
[% END %] |
87 |
<div class="cover-image" id="coce-coverimg"> |
| 90 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
88 |
[% IF ( coce_id ) %] |
| 91 |
[% coce_id = normalized_ean || normalized_isbn | html %] |
89 |
<a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a> |
| 92 |
<div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview"></div> |
90 |
[% END %] |
| 93 |
[% END %] |
91 |
<div class="hint">Image from Coce</div> |
| 94 |
[% IF OpenLibraryCovers %] |
92 |
</div> |
| 95 |
<div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="openlibrary-thumbnail-preview"></div> |
|
|
| 96 |
[% END %] |
| 97 |
[% bt_id = ( normalized_upc || normalized_isbn ) %] |
| 98 |
[% IF ( BakerTaylorEnabled && bt_id ) %] |
| 99 |
[% IF BakerTaylorBookstoreURL %] |
| 100 |
[% IF ( OPACURLOpenInNewWindow ) %] |
| 101 |
<a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]" target="_blank" rel="noreferrer"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> |
| 102 |
[% ELSE %] |
| 103 |
<a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> |
| 104 |
[% END %] |
| 105 |
[% ELSE %] |
| 106 |
<img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> |
| 107 |
[% END %] |
93 |
[% END %] |
| 108 |
[% END %] |
94 |
|
| 109 |
[% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] |
95 |
[% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] |
| 110 |
[% SET custom_cover_image_url = biblio.custom_cover_image_url %] |
96 |
[% SET custom_cover_image_url = biblio.custom_cover_image_url %] |
| 111 |
[% IF custom_cover_image_url %] |
97 |
[% IF custom_cover_image_url %] |
| 112 |
[% IF ( OPACURLOpenInNewWindow ) %] |
98 |
<div class="cover-image" id="custom-coverimg"> |
| 113 |
<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> |
99 |
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image"> |
| 114 |
[% ELSE %] |
100 |
<img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" /> |
| 115 |
<a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a> |
101 |
</a> |
|
|
102 |
<div class="hint">Custom cover image</div> |
| 103 |
</div> |
| 116 |
[% END %] |
104 |
[% END %] |
| 117 |
[% END %] |
105 |
[% END %] |
| 118 |
[% END %] |
106 |
</div> <!-- /.cover-slider --> |
| 119 |
</div><!-- / #bookcover --> |
107 |
|
|
|
108 |
</div><!-- / .bookcover --> |
| 120 |
|
109 |
|
| 121 |
<abbr class="unapi-id" title="koha:biblionumber:[% biblio.biblionumber | html %]"><!-- unAPI --></abbr> |
110 |
<abbr class="unapi-id" title="koha:biblionumber:[% biblio.biblionumber | html %]"><!-- unAPI --></abbr> |
| 122 |
[% IF ( ocoins ) # COinS / Openurl %] |
111 |
[% IF ( ocoins ) # COinS / Openurl %] |
|
Lines 868-874
Link Here
|
| 868 |
<div id="images"> |
857 |
<div id="images"> |
| 869 |
<p>Click on an image to view it in the image viewer</p> |
858 |
<p>Click on an image to view it in the image viewer</p> |
| 870 |
[% FOREACH image IN localimages %] |
859 |
[% FOREACH image IN localimages %] |
| 871 |
<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> |
860 |
<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblio.biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
|
|
861 |
<img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" /> |
| 862 |
</a> |
| 872 |
[% END %] |
863 |
[% END %] |
| 873 |
</div><!-- / #images --> |
864 |
</div><!-- / #images --> |
| 874 |
[% END # / IF OPACLocalCoverImages && localimages.size %] |
865 |
[% END # / IF OPACLocalCoverImages && localimages.size %] |
|
Lines 1116-1124
Link Here
|
| 1116 |
|
1107 |
|
| 1117 |
[% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] |
1108 |
[% IF Koha.Preference('OPACLocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] |
| 1118 |
<td class="cover"> |
1109 |
<td class="cover"> |
| 1119 |
[% FOR image IN ITEM_RESULT.cover_images %] |
1110 |
<div class="bookcover"> |
| 1120 |
<div title="[% ITEM_RESULT.itemnumber | html %]" data-imagenumber="[% image.imagenumber | html %]" data-biblionumber="[% ITEM_RESULT.biblionumber | html %]" class="local-thumbnail-preview"></div> |
1111 |
<div class="cover-slider"> |
| 1121 |
[% END %] |
1112 |
[% FOR image IN ITEM_RESULT.cover_images %] |
|
|
1113 |
<div class="cover-image local-coverimg"> |
| 1114 |
<a href="/cgi-bin/koha/opac-image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> |
| 1115 |
<img src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" /> |
| 1116 |
</a> |
| 1117 |
</div> |
| 1118 |
[% END %] |
| 1119 |
</div> |
| 1120 |
</div> |
| 1122 |
</td> |
1121 |
</td> |
| 1123 |
[% END %] |
1122 |
[% END %] |
| 1124 |
|
1123 |
|
|
Lines 1300-1305
Link Here
|
| 1300 |
[% Asset.js("lib/kjua/kjua.min.js") | $raw %] |
1299 |
[% Asset.js("lib/kjua/kjua.min.js") | $raw %] |
| 1301 |
[% END %] |
1300 |
[% END %] |
| 1302 |
|
1301 |
|
|
|
1302 |
[% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %] |
| 1303 |
|
| 1303 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
1304 |
[% IF ( Koha.Preference('OPACShowMusicalInscripts') ) %] |
| 1304 |
<script> |
1305 |
<script> |
| 1305 |
var interface = "[% interface | html %]"; |
1306 |
var interface = "[% interface | html %]"; |
|
Lines 1474-1495
Link Here
|
| 1474 |
$("#highlight_toggle_off").show().click(function() {highlightOff(); return false;}); |
1475 |
$("#highlight_toggle_off").show().click(function() {highlightOff(); return false;}); |
| 1475 |
[% END %] |
1476 |
[% END %] |
| 1476 |
[% END %] |
1477 |
[% END %] |
| 1477 |
[% IF ( GoogleJackets ) %] |
1478 |
|
| 1478 |
KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]); |
|
|
| 1479 |
[% END %] |
| 1480 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
1479 |
[% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %] |
| 1481 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]); |
1480 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]); |
| 1482 |
[% END %] |
1481 |
[% END %] |
| 1483 |
|
1482 |
|
| 1484 |
[% IF OpenLibraryCovers %] |
1483 |
function verify_images() { |
| 1485 |
KOHA.OpenLibrary.GetCoverFromIsbn(); |
1484 |
// Loop over each container in the template which contains covers |
| 1486 |
[% END %] |
1485 |
$(".cover-slider").each(function(){ |
| 1487 |
[% IF OPACLocalCoverImages %] |
1486 |
var lightbox_descriptions = []; |
| 1488 |
KOHA.LocalCover.GetCoverFromBibnumber(true); |
1487 |
$(this).find(".cover-image").each( function( index ){ |
| 1489 |
[% IF itemloop_has_images OR oheritemloop_has_images %] |
1488 |
var div = $(this); |
| 1490 |
KOHA.LocalCover.GetCoverFromItemnumber(true); |
1489 |
// Find the image in the container |
| 1491 |
[% END %] |
1490 |
var img = div.find("img")[0]; |
| 1492 |
[% END %] |
1491 |
if( $(img).length > 0 ){ |
|
|
1492 |
var description = ""; |
| 1493 |
if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){ |
| 1494 |
// No image loaded in the container. Remove the slide |
| 1495 |
div.remove(); |
| 1496 |
} else { |
| 1497 |
// All slides start hidden. If this is the first one, show it. |
| 1498 |
if( index == 0 ){ |
| 1499 |
div.show(); |
| 1500 |
} |
| 1501 |
// Check if Amazon image is present |
| 1502 |
if ( div.attr("id") == "amazon-bookcoverimg" ) { |
| 1503 |
w = img.width; |
| 1504 |
h = img.height; |
| 1505 |
if ((w == 1) || (h == 1)) { |
| 1506 |
// Amazon returned single-pixel placeholder |
| 1507 |
// Remove the container |
| 1508 |
div.remove(); |
| 1509 |
} else { |
| 1510 |
lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link'))); |
| 1511 |
} |
| 1512 |
} else if( div.attr("id") == "custom-coverimg" ){ |
| 1513 |
if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) { |
| 1514 |
// No image was loaded via the CustomCoverImages system preference |
| 1515 |
// Remove the container |
| 1516 |
div.remove(); |
| 1517 |
} else { |
| 1518 |
lightbox_descriptions.push("Custom cover image"); |
| 1519 |
} |
| 1520 |
} else if( div.attr("id") == "coce-coverimg" ){ |
| 1521 |
// Identify which service's image is being loaded by Coce |
| 1522 |
var coce_description; |
| 1523 |
if( $(img).attr("src").indexOf('amazon.com') >= 0 ){ |
| 1524 |
coce_description = ("Coce image from Amazon.com"); |
| 1525 |
} else if( $(img).attr("src").indexOf('google.com') >= 0 ){ |
| 1526 |
coce_description = _("Coce image from Google Books"); |
| 1527 |
} else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){ |
| 1528 |
coce_description = _("Coce image from Open Library"); |
| 1529 |
} |
| 1530 |
div.find(".hint").html(coce_description); |
| 1531 |
lightbox_descriptions.push(coce_description); |
| 1532 |
} else if ( div.attr("id") == "adlibris-coverimg" ){ |
| 1533 |
lightbox_descriptions.push(_("Image from Adlibris (<a href='%s'>see the original image</a>)").format($(img).data('link'))); |
| 1534 |
} else if ( div.attr("class") == "cover-image local-coverimg" ) { |
| 1535 |
lightbox_descriptions.push(_("Local cover image")); |
| 1536 |
} else { |
| 1537 |
console.log("Source of the image cannot be guessed.") |
| 1538 |
} |
| 1539 |
} |
| 1540 |
} |
| 1541 |
}); |
| 1542 |
|
| 1543 |
// Lightbox for cover images |
| 1544 |
Chocolat(this.querySelectorAll('.cover-image a'), { |
| 1545 |
description: function(){ |
| 1546 |
return lightbox_descriptions[this.settings.currentImageIndex]; |
| 1547 |
} |
| 1548 |
}); |
| 1549 |
|
| 1550 |
}); |
| 1551 |
|
| 1552 |
$(".cover-slider").each(function(){ |
| 1553 |
var coverSlide = this; |
| 1554 |
var coverImages = $(this).find(".cover-image"); |
| 1555 |
if( coverImages.length > 1 ){ |
| 1556 |
coverImages.each(function( index ){ |
| 1557 |
// If more that one image is present, add a navigation link |
| 1558 |
// for activating the slide |
| 1559 |
var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>"); |
| 1560 |
if( index == 0 ){ |
| 1561 |
// Set the first navigation link as active |
| 1562 |
$(covernav).addClass("nav-active"); |
| 1563 |
} |
| 1564 |
$(covernav).html("<i class=\"fa fa-circle\"></i>"); |
| 1565 |
$(coverSlide).append( covernav ); |
| 1566 |
}); |
| 1567 |
} |
| 1568 |
|
| 1569 |
if( $(coverSlide).find(".cover-image:visible").length < 1 ){ |
| 1570 |
$(coverSlide).remove(); |
| 1571 |
} else { |
| 1572 |
$(coverSlide).addClass("cover-slides"); |
| 1573 |
} |
| 1574 |
}); |
| 1575 |
|
| 1576 |
$(".cover-slider").on("click",".cover-nav", function(e){ |
| 1577 |
e.preventDefault(); |
| 1578 |
var cover_slider = $(this).parent(); |
| 1579 |
// Adding click handler for cover image navigation links |
| 1580 |
var num = $(this).data("num"); |
| 1581 |
$(cover_slider).find(".cover-nav").removeClass("nav-active"); |
| 1582 |
$(this).addClass("nav-active"); |
| 1583 |
$(cover_slider).find(".cover-image").hide(); |
| 1584 |
$(cover_slider).find(".cover-image").eq( num ).show(); |
| 1585 |
}); |
| 1586 |
|
| 1587 |
$("#editions img").each(function(i){ |
| 1588 |
if ( this.src.indexOf('amazon.com') >= 0 ) { |
| 1589 |
w = this.width; |
| 1590 |
h = this.height; |
| 1591 |
if ((w == 1) || (h == 1)) { |
| 1592 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 1593 |
} else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) { |
| 1594 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 1595 |
} |
| 1596 |
} |
| 1597 |
}); |
| 1598 |
} |
| 1599 |
|
| 1600 |
$(window).load(function() { |
| 1601 |
verify_images(); |
| 1602 |
}); |
| 1493 |
[% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] |
1603 |
[% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] |
| 1494 |
novSelect.loadContentForQuery( |
1604 |
novSelect.loadContentForQuery( |
| 1495 |
{ |
1605 |
{ |