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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 lines)
Lines 207-213 $.widget.bridge('uitooltip', $.ui.tooltip); Link Here
207
    [% END %]
207
    [% END %]
208
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
208
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
209
        var NO_OL_JACKET = _("No cover image available");
209
        var NO_OL_JACKET = _("No cover image available");
210
        var OL_PREVIEW = _("Preview");
211
    [% END %]
210
    [% END %]
212
    [% IF (query_desc) %]
211
    [% IF (query_desc) %]
213
        var query_desc = "[% query_desc | html %]";
212
        var query_desc = "[% query_desc | html %]";
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/openlibrary-readapi.inc (-1 / +1 lines)
Lines 1-4 Link Here
1
[%# Input params: bib - search result biblio record %]
1
[%# Input params: bib - search result biblio record %]
2
[% IF OpenLibrarySearch && ( bib.normalized_isbn || bib.lccn || bib.normalized_oclc ) %]
2
[% IF OpenLibrarySearch && ( bib.normalized_isbn || bib.lccn || bib.normalized_oclc ) %]
3
    <div class="ol_readapi_book" isbn="[% bib.normalized_isbn | html %]" lccn="[% bib.lccn | html %]" oclc="[% bib.normalized_oclc | html %]">Open Library: </div>
3
    <div class="results_summary ol_readapi_book" isbn="[% bib.normalized_isbn | html %]" lccn="[% bib.lccn | html %]" oclc="[% bib.normalized_oclc | html %]" style="display:none"><span class="label">Found in Open Library:</span> </div>
4
[% END %]
4
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-3 / +3 lines)
Lines 418-423 Link Here
418
                        [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %]
418
                        [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %]
419
                    [% END # / IF SyndeticsEnabled%]
419
                    [% END # / IF SyndeticsEnabled%]
420
420
421
                    [%# Following on one line due to translation issues %]
422
                    [% INCLUDE "openlibrary-readapi.inc" bib = { normalized_isbn => normalized_isbn,lccn => lccn, normalized_oclc => normalized_oclc } %]
423
421
                    [% IF ( OpacStarRatings != 'disable' ) %]
424
                    [% IF ( OpacStarRatings != 'disable' ) %]
422
                        <form method="post" action="/cgi-bin/koha/opac-ratings.pl">
425
                        <form method="post" action="/cgi-bin/koha/opac-ratings.pl">
423
                            <div class="results_summary ratings">
426
                            <div class="results_summary ratings">
Lines 1043-1051 Link Here
1043
                    </div>
1046
                    </div>
1044
                [% END # / IF Babeltheque %]
1047
                [% END # / IF Babeltheque %]
1045
1048
1046
                [%# Following on one line due to translation issues %]
1047
                [% INCLUDE "openlibrary-readapi.inc" bib = { normalized_isbn => normalized_isbn,lccn => lccn, normalized_oclc => normalized_oclc } %]
1048
1049
            </div> <!-- /.col-lg-10 -->
1049
            </div> <!-- /.col-lg-10 -->
1050
1050
1051
            <div class="col-lg-3">
1051
            <div class="col-lg-3">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-2 / +3 lines)
Lines 547-552 Link Here
547
                                                    </span>
547
                                                    </span>
548
                                                [% END %]
548
                                                [% END %]
549
549
550
                                                [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
551
550
                                                [% IF ( OpacStarRatings == 'all' ) %]
552
                                                [% IF ( OpacStarRatings == 'all' ) %]
551
                                                    <div class="results_summary ratings">
553
                                                    <div class="results_summary ratings">
552
                                                        [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
554
                                                        [% SET rating_avg = SEARCH_RESULT.ratings.get_avg_rating() %]
Lines 573-582 Link Here
573
                                                    </div> <!-- / .results_summary -->
575
                                                    </div> <!-- / .results_summary -->
574
                                                [% END # / IF OpacStarRatings %]
576
                                                [% END # / IF OpacStarRatings %]
575
577
576
                                                    [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
578
                                                [% INCLUDE 'title-actions-menu.inc' items=SEARCH_RESULT %]
577
579
578
                                                </div>
580
                                                </div>
579
                                                [% INCLUDE "openlibrary-readapi.inc" bib = SEARCH_RESULT %]
580
581
581
                                            </td>
582
                                            </td>
582
                                        </tr>
583
                                        </tr>
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js (-7 / +7 lines)
Lines 48-54 KOHA.OpenLibrary = new function() { Link Here
48
                    if (is_opacdetail) {
48
                    if (is_opacdetail) {
49
                        img.src = book.cover.medium;
49
                        img.src = book.cover.medium;
50
                        $(this).empty().append(img);
50
                        $(this).empty().append(img);
51
                        $(this).append('<div class="results_summary">' + '<a href="' + book.url + '">' + OL_PREVIEW + '</a></div>');
52
                    } else {
51
                    } else {
53
                        img.src = book.cover.medium;
52
                        img.src = book.cover.medium;
54
                        img.height = '110';
53
                        img.height = '110';
Lines 150-160 function create_query() { Link Here
150
function make_read_button(bookdata) {
149
function make_read_button(bookdata) {
151
    buttons = {
150
    buttons = {
152
        'full access':
151
        'full access':
153
        "http://openlibrary.org/images/button-read-open-library.png",
152
        "https://openlibrary.org/images/button-read-open-library.png",
154
        'lendable':
153
        'lendable':
155
        "http://openlibrary.org/images/button-borrow-open-library.png",
154
        "https://openlibrary.org/images/button-borrow-open-library.png",
156
        'checked out':
155
        'checked out':
157
        "http://openlibrary.org/images/button-checked-out-open-library.png"
156
        "https://openlibrary.org/images/button-checked-out-open-library.png"
158
    };
157
    };
159
    if (bookdata.items.length == 0) {
158
    if (bookdata.items.length == 0) {
160
        return false;
159
        return false;
Lines 163-171 function make_read_button(bookdata) { Link Here
163
    if (!(first.status in buttons)) {
162
    if (!(first.status in buttons)) {
164
        return false;
163
        return false;
165
    }
164
    }
166
    result = '<a href="' + first.itemURL + '">' +
165
    result = '<a target="_blank" href="' + first.itemURL + '">' +
167
      '<img class="' + ol_button_classname +
166
      '<img class="' + ol_button_classname +
168
      '" src="' + buttons[first.status] + '"/></a>';
167
      '" src="' + buttons[first.status] + '"/></a>';
168
    console.log( result );
169
    return result;
169
    return result;
170
}
170
}
171
171
Lines 179-186 function default_decorate_el_fn(el, bookdata) { Link Here
179
    }
179
    }
180
    if (decoration) {
180
    if (decoration) {
181
        el.innerHTML += decoration;
181
        el.innerHTML += decoration;
182
        el.style.display = 'block'
182
    } else {
183
    } else {
183
        el.style.visibility = 'hidden';
184
        el.style.display = 'none';
184
    }
185
    }
185
}
186
}
186
187
187
- 

Return to bug 26148