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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-4 / +4 lines)
Lines 1635-1641 Link Here
1635
                isbn = isbn.replace(/-/, '');
1635
                isbn = isbn.replace(/-/, '');
1636
1636
1637
                [% IF ( IDreamBooksReadometer ) %]
1637
                [% IF ( IDreamBooksReadometer ) %]
1638
                    $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+' by '+json.book.author+'" title="Rating based on reviews of '+json.book.title+'"></a>');
1638
                    $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+_(" by ")+json.book.author+'" title="'+_("Rating based on reviews of ")+json.book.title+'"></a>');
1639
                [% END %]
1639
                [% END %]
1640
1640
1641
                [% IF ( IDreamBooksReviews ) %]
1641
                [% IF ( IDreamBooksReviews ) %]
Lines 1644-1654 Link Here
1644
1644
1645
                    //append happy-sad cloud review
1645
                    //append happy-sad cloud review
1646
1646
1647
                    $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>rating based on reviews at iDreamBooks.com</a></span>");
1647
                    $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>"+_("rating based on reviews at iDreamBooks.com")+"</a></span>");
1648
1648
1649
                    //insert data into Book reviews tab
1649
                    //insert data into Book reviews tab
1650
                    $.each(json.book.critic_reviews, function(){
1650
                    $.each(json.book.critic_reviews, function(){
1651
                            $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>Review date: "+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>Review result: "+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='iDreamBooks.com rating' title='"+this.pos_or_neg+"' /></a></div></div>");
1651
                            $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>"+_("Review date: ")+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>"+_("Review result: ")+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='"+_("iDreamBooks.com rating")+"' title='"+this.pos_or_neg+"' /></a></div></div>");
1652
                            });
1652
                            });
1653
                    $("#seemoreidb").attr('href', json.book.detail_link);
1653
                    $("#seemoreidb").attr('href', json.book.detail_link);
1654
                    $("#tab_idb_critic_reviews").show();
1654
                    $("#tab_idb_critic_reviews").show();
Lines 1751-1757 Link Here
1751
                if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
1751
                if (arrPagination[i] == undefined || arrPagination[i].url == "") continue;
1752
                var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
1752
                var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"")  + " title='" + _("Go to detail") + "' />");
1753
                var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
1753
                var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>";
1754
                if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
1754
                if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author;
1755
                li.html(html);
1755
                li.html(html);
1756
                if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD");
1756
                if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD");
1757
                ul.append(li);
1757
                ul.append(li);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-3 / +2 lines)
Lines 716-722 $(document).ready(function(){ Link Here
716
                    json = 'json = '+xdr.responseText; // the string now looks like..  json = { ... };
716
                    json = 'json = '+xdr.responseText; // the string now looks like..  json = { ... };
717
                    eval(json); // json is now a regular JSON object
717
                    eval(json); // json is now a regular JSON object
718
                    if(json.total_results > 0 && json.book.rating > 0){
718
                    if(json.total_results > 0 && json.book.rating > 0){
719
                        $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%");
719
                        $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%");
720
                        $(element).show();
720
                        $(element).show();
721
                    } else {
721
                    } else {
722
                        $(element).remove();
722
                        $(element).remove();
Lines 726-732 $(document).ready(function(){ Link Here
726
            } else {
726
            } else {
727
                $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){
727
                $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){
728
                    if(json.total_results > 0 && json.book.rating > 0){
728
                    if(json.total_results > 0 && json.book.rating > 0){
729
                        $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%");
729
                        $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%");
730
                        $(element).show();
730
                        $(element).show();
731
                    } else {
731
                    } else {
732
                        $(element).remove();
732
                        $(element).remove();
733
- 

Return to bug 11467