View | Details | Raw Unified | Return to bug 28180
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (+13 lines)
Lines 93-98 Link Here
93
                                [% END %]
93
                                [% END %]
94
                            [% END %]
94
                            [% END %]
95
95
96
                            [% IF ( GoogleJackets ) %]
97
                                <div class="cover-image" id="googlejacket-coverimg">
98
                                    <div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="gbs-thumbnail-preview" data-use-data-link="1"></div>
99
                                    <div class="hint">Image from Google Jackets</div>
100
                                </div>
101
                            [% END %]
102
96
                            [% IF ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') && normalized_isbn ) %]
103
                            [% IF ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') && normalized_isbn ) %]
97
                                [% coce_id = normalized_ean || normalized_isbn %]
104
                                [% coce_id = normalized_ean || normalized_isbn %]
98
                                <div class="cover-image" id="coce-coverimg">
105
                                <div class="cover-image" id="coce-coverimg">
Lines 1487-1492 Link Here
1487
                [% END %]
1494
                [% END %]
1488
            [% END %]
1495
            [% END %]
1489
1496
1497
            [% IF ( GoogleJackets ) %]
1498
                KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]);
1499
            [% END %]
1500
1490
            [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1501
            [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1491
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1502
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1492
            [% END %]
1503
            [% END %]
Lines 1530-1535 Link Here
1530
                                }
1541
                                }
1531
                            } else if( div.attr("id") == "syndetics-coverimg" ){
1542
                            } else if( div.attr("id") == "syndetics-coverimg" ){
1532
                                lightbox_descriptions.push("Image from Syndetics")
1543
                                lightbox_descriptions.push("Image from Syndetics")
1544
                            } else if( div.attr("id") == "googlejacket-coverimg" ){
1545
                                lightbox_descriptions.push(_("Image from Google Jacket (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1533
                            } else if( div.attr("id") == "coce-coverimg" ){
1546
                            } else if( div.attr("id") == "coce-coverimg" ){
1534
                                // Identify which service's image is being loaded by Coce
1547
                                // Identify which service's image is being loaded by Coce
1535
                                var coce_description;
1548
                                var coce_description;
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/google-jackets.js (-16 / +23 lines)
Lines 46-67 KOHA.Google = { Link Here
46
         for (id in booksInfo) {
46
         for (id in booksInfo) {
47
             var book = booksInfo[id];
47
             var book = booksInfo[id];
48
             $("[id^=gbs-thumbnail]."+book.bib_key).each(function() {
48
             $("[id^=gbs-thumbnail]."+book.bib_key).each(function() {
49
                 var a = document.createElement("a");
50
                 a.href = book.info_url;
51
                 if (typeof(book.thumbnail_url) != "undefined") {
49
                 if (typeof(book.thumbnail_url) != "undefined") {
52
                     var img = document.createElement("img");
50
                     if ( $(this).data('use-data-link') ) {
53
                     img.src = book.thumbnail_url;
51
                         var a = document.createElement("a");
54
                     $(this).empty().append(img);
52
                         a.href = book.thumbnail_url;
55
                     var re = /^gbs-thumbnail-preview/;
53
                         var img = document.createElement("img");
56
                     if ( re.exec($(this).attr("id")) ) {
54
                         img.src = book.thumbnail_url;
57
                         $(this).append(
55
                         img.setAttribute('data-link', book.info_url);
58
                             '<div class="google-books-preview">' +
56
                         a.append(img)
59
                             '<a '+target+'href="' +
57
                         $(this).empty().append(a);
60
                             book.info_url +
58
                     } else {
61
                             '"><img src="' +
59
                         var img = document.createElement("img");
62
                             'https://books.google.com/intl/en/googlebooks/images/gbs_preview_sticker1.gif' +
60
                         img.src = book.thumbnail_url;
63
                             '"></a></div>'
61
                         $(this).empty().append(img);
64
                             );
62
                         var re = /^gbs-thumbnail-preview/;
63
                         if ( re.exec($(this).attr("id")) ) {
64
                             $(this).append(
65
                                 '<div class="google-books-preview">' +
66
                                 '<a '+target+'href="' +
67
                                 book.info_url +
68
                                 '"><img src="' +
69
                                 'https://books.google.com/intl/en/googlebooks/images/gbs_preview_sticker1.gif' +
70
                                 '"></a></div>'
71
                                 );
72
                         }
65
                     }
73
                     }
66
                 } else {
74
                 } else {
67
                     var message = document.createElement("span");
75
                     var message = document.createElement("span");
68
- 

Return to bug 28180