X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fopac-tmpl%2Fbootstrap%2Fen%2Fmodules%2Fopac-detail.tt;h=f450d0e94fb2638b1477c97b5f4eb6160ffe945c;hb=b29493265b3ae9f660eee2d4b911da036d100b0d;hp=28a3686376936fd7c218a0a028894fd8cfa0847c;hpb=aeb86b69ebc40e03ee9b56c0c9d99287db140559;p=koha.git diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 28a3686376..f450d0e94f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1,9 +1,15 @@ +[% USE Math %] [% USE Koha %] [% USE KohaDates %] [% USE Branches %] [% USE AuthorisedValues %] [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %] [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %] +[% IF Koha.Preference('AmazonAssocTag') %] + [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] +[% ELSE %] + [% AmazonAssocTag = '' %] +[% END %] [% ShowCourseReservesHeader = 0 %] [% IF Koha.Preference( 'UseCourseReserves' ) == 1 %] @@ -23,7 +29,8 @@ [% ELSE %] [% SET protocol = "http://" %] [% END %] -[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %] +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %] [% INCLUDE 'doc-head-close.inc' %] [% IF ( bidi ) %] [% BLOCK cssinclude %][% END %] @@ -31,6 +38,7 @@ [% IF ( OpacStarRatings != 'disable' ) %] [% BLOCK cssinclude %][% END %] [% END %] +[% INCLUDE greybox.inc %] [% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %] [% INCLUDE 'masthead.inc' %] @@ -38,7 +46,7 @@
@@ -48,19 +56,15 @@
[% IF ( OPACLocalCoverImages ) %] -
+
[% END %] [% IF ( OPACAmazonCoverImages ) %] - [% IF ( OPACurlOpenInNewWindow ) %] - + [% IF ( OPACURLOpenInNewWindow ) %] + [% ELSE %] - + [% END %] - [% IF ( using_https ) %] Cover image - [% ELSE %] - Cover image - [% END %] [% END %] [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] @@ -79,27 +83,36 @@ [% IF ( GoogleJackets ) %]
[% END %] + [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] + [% coce_id = normalized_ean || normalized_isbn %] +
+ [% END %] [% IF OpenLibraryCovers %]
[% END %] - [% IF ( BakerTaylorEnabled && normalized_isbn ) %] - [% IF ( OPACurlOpenInNewWindow ) %] - See Baker & Taylor + [% bt_id = ( normalized_upc || normalized_isbn ) %] + [% IF ( BakerTaylorEnabled && bt_id ) %] + [% IF BakerTaylorBookstoreURL %] + [% IF ( OPACURLOpenInNewWindow ) %] + See Baker & Taylor + [% ELSE %] + See Baker & Taylor + [% END %] [% ELSE %] - See Baker & Taylor + See Baker & Taylor [% END %] [% END %]
- + [% IF ( ocoins ) # COinS / Openurl %] [% END %]
- Normal view - MARC view - [% IF ( ISBD ) %]ISBD view[% END %] + Normal view + MARC view + [% IF ( ISBD ) %]ISBD view[% END %]
[% IF ( OPACXSLTDetailsDisplay ) %] [% XSLTBloc %] @@ -176,6 +189,9 @@ [% IF (MARCAUTHOR.authoritylink) %] [% END %] + [% IF IDREF and MARCAUTHOR.unimarc3 %] + IdRef + [% END %] [% UNLESS ( loop.last ) %]|[% END %] [% END # /FOREACH MARCAUTHORS %]
@@ -227,8 +243,8 @@ [% IF ( collectiontitle ) %] Collection: [% collectiontitle %] - [% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %] - [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %] + [% IF ( collectionissn ) %] [% ', ISSN ' _ collectionissn %][% END %] + [% IF ( collectionvolume ) %] [% ' ; ' _ collectionvolume %] [% END %] [% END %] @@ -287,9 +303,9 @@ [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% SUBFIELD.separator %] [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] - [% SUBFIELD.value %] + [% SUBFIELD.value %] [% ELSE %] - [% SUBFIELD.value %] + [% SUBFIELD.value %] [% END %] [% END %] [% IF (MARCSUBJCT.authoritylink) %] @@ -325,11 +341,11 @@ [% FOREACH MARCurl IN MARCURLS %]
  • [% IF ( MARCurl.part ) %][% MARCurl.part %]
    [% END %] - [% IF ( OPACurlOpenInNewWindow ) %] + [% IF ( OPACURLOpenInNewWindow ) %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - + [% ELSE %] - + [% END %] [% ELSE %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] @@ -338,7 +354,6 @@ [% END %] [% END %] - [% MARCurl.linktext %] [% IF ( MARCurl.notes ) %]
  • -
    @@ -780,43 +796,53 @@ [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %] [% END # / IF SyndeticsEnabled %] - [% IF ( NovelistSelectProfile && NovelistSelectView == 'tab') %] -
    -
    + [% IF ( NovelistSelectProfile && NovelistSelectView == 'tab' && (normalized_isbn || normalized_upc) ) %] +
    +
    [% END # / IF NovelistSelectProfile && NovelistSelectView == 'tab' %] [% IF ( subscriptionsnumber ) %]

    This is a serial

    -

    There are [% subscriptionsnumber %] subscription(s) associated with this title.

    +

    There are [% subscriptionsnumber %] subscription(s) associated with this title.

    [% FOREACH subscription IN subscriptions %] - [% IF ( subscription.branchname ) %] -

    At library: [% subscription.branchname %]

    + [% IF ( subscription.branchcode ) %] +

    At library: [% Branches.GetName( subscription.branchcode ) %]

    [% ELSE %] [% IF ( subscription.branchcode ) %]

    At library: [% subscription.branchcode %]

    [% END %] [% END %] [% IF ( subscription.closed ) %] -

    This subscription is closed.

    +

    This subscription is closed.

    + [% END %] + [% IF ( subscription.callnumber ) %] +

    Call number: [% subscription.callnumber %]

    [% END %] - [% IF ( subscription.callnumber ) %]

    Call number: [% subscription.callnumber %]

    [% END %]
    [% IF ( subscription.subscriptionnotes ) %] -

    [% subscription.subscriptionnotes FILTER html_line_break %]

    +

    [% subscription.subscriptionnotes FILTER html_line_break %]

    [% END %] -

    Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]

    +

    Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]

    + [% IF ( subscription.letter ) %][% END %] [% IF ( subscription.missinglist ) %] -

    Missing issues: [% subscription.missinglist %]

    +

    Missing issues: [% subscription.missinglist %]

    [% END %] [% IF ( subscription.opacnote ) %] -

    [% subscription.opacnote FILTER html_line_break %]

    - [% END %] - [% IF ( subscription.callnumber ) %] -

    Call number: [% subscription.callnumber %]

    +

    [% subscription.opacnote FILTER html_line_break %]

    [% END %] [% IF ( subscription.latestserials ) %] -

    The [% subscription.opacdisplaycount %] latest issues for this subscription:

    +

    The [% subscription.opacdisplaycount %] latest issues for this subscription:

    @@ -829,25 +855,18 @@ @@ -855,7 +874,7 @@
    Issue #[% latestserial.serialseq %] [% latestserial.planneddate %] - [% IF ( latestserial.status1 ) %] - Awaited - [% ELSE %] - [% IF ( latestserial.status2 ) %] - Arrived - [% ELSE %] - [% IF ( latestserial.status3 ) %] - Late - [% ELSE %] - [% IF ( latestserial.status4 ) %] - Missing - [% ELSE %] - [% IF ( latestserial.status5 ) %] - Not issued - [% END %] - [% END %] - [% END %] - [% END %] - [% END %] + [% IF (latestserial.status1 ) %]Expected[% END %] + [% IF (latestserial.status2 ) %]Arrived[% END %] + [% IF (latestserial.status3 ) %]Late[% END %] + [% IF (latestserial.status4 ) %]Missing[% END %] + [% IF (latestserial.status41 ) %]Missing (never received)[% END %] + [% IF (latestserial.status42 ) %]Missing (sold out)[% END %] + [% IF (latestserial.status43 ) %]Missing (damaged)[% END %] + [% IF (latestserial.status44 ) %]Missing (lost)[% END %] + [% IF (latestserial.status5 ) %]Not issued[% END %] + [% IF (latestserial.status6 ) %]Delete[% END %] + [% IF (latestserial.status7 ) %]Claimed[% END %] + [% IF (latestserial.status8 ) %]Stopped[% END %] [% latestserial.notes %]
    [% END # / IF subscription.latestserials %] [% END # / FOREACH subscriptions %] -

    More details

    +

    More details

    [% END # IF subscriptionsnumber %] @@ -885,12 +904,16 @@
    [% IF ( reviews ) %] [% FOREACH review IN reviews %] - [% IF ( review.your_comment ) %] + [% IF review.borrowernumber == borrowernumber %]
    [% IF ( review.avatarurl ) %] [% END %] -
    Your comment
    + [% IF review.approved %] +
    Your comment
    + [% ELSE %] +
    Your comment (preview, pending approval)
    + [% END %] [% review.datereviewed | $KohaDates %]

    [% FILTER html_break %] @@ -927,7 +950,7 @@ [% END %]

    - [% END # / IF review.your_comment %] + [% END %] [% END # / FOREACH reviews %] [% ELSE %]

    There are no comments for this item.

    @@ -935,8 +958,8 @@ [% IF ( loggedinusername ) %] [% UNLESS ( loggedincommenter ) %] -
    - Post or edit your comments on this item. + [% END %] [% ELSE %] @@ -953,7 +976,7 @@ [% IF ( OPACAmazonCoverImages ) %] - + [% END %] [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] @@ -973,12 +996,12 @@ [% XISBN.description %] [% END %] [% XISBN.title |html %] - [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %] - [% IF ( XISBN.copyrightdate ) %] ©[% XISBN.copyrightdate %][% END %] + [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %] + [% IF ( XISBN.copyrightdate ) %] ©[% XISBN.copyrightdate %][% END %] [% IF ( XISBN.publishercode ) %]

    [% XISBN.publishercode |html %] [% IF ( XISBN.place ) %]([% XISBN.place %])[% END %] - [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear %][% END %] + [% IF ( XISBN.publicationyear ) %][% ', ' _ XISBN.publicationyear %][% END %] [% IF ( XISBN.pages ) %][% XISBN.pages %] [% XISBN.illus %] [% XISBN.size %][% END %]

    [% END %] @@ -991,14 +1014,15 @@ [% IF ( HTML5MediaEnabled ) %]
    -

    - <[% HTML5MediaParent %] controls preload=none> - [% FOREACH HTML5MediaSet IN HTML5MediaSets %] - <[% HTML5MediaSet.child %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] /> - [% END %] - [[% HTML5MediaParent %] tag not supported by your browser.] - -

    + [% FOREACH HTML5MediaSet IN HTML5MediaSets %] +

    + [% SET ctrl_preload = ' controls preload=none' #translatability %] + <[% HTML5MediaParent _ ctrl_preload %] > + <[% HTML5MediaSet.child _ 'src="' _ HTML5MediaSet.srcblock _'"' _ HTML5MediaSet.typeblock %] /> + [[% HTML5MediaParent %] tag not supported by your browser.] + +

    + [% END %]
    [% END # / IF HTML5MediaEnabled %] @@ -1007,7 +1031,7 @@

    Click on an image to view it in the image viewer

    [% FOREACH image IN localimages %] [% IF image %] - + [% END %] [% END %]
    @@ -1021,10 +1045,10 @@ [% END %]
    - [% IF ( NovelistSelectProfile && NovelistSelectView == 'below' ) %] + [% IF ( NovelistSelectProfile && NovelistSelectView == 'below' && ( normalized_isbn || normalized_upc ) ) %]

    Novelist Select

    -
    +
    [% END %] @@ -1042,7 +1066,11 @@
    [% END # / IF Babeltheque %] - + + [%# Following on one line due to translation issues %] + [% INCLUDE "openlibrary-readapi.inc" bib = { normalized_isbn => normalized_isbn,lccn => lccn, normalized_oclc => normalized_oclc } %] + +
    @@ -1090,10 +1118,10 @@ [% INCLUDE 'opac-detail-sidebar.inc' %] - [% IF ( NovelistSelectProfile && NovelistSelectView == 'right') %] + [% IF ( NovelistSelectProfile && NovelistSelectView == 'right' && ( normalized_isbn || normalized_upc ) ) %]

    Novelist Select

    -
    +
    [% END %] @@ -1107,12 +1135,12 @@ [% IF ( SocialNetworks ) %] [% END %]
    @@ -1132,7 +1160,7 @@ [% END %] [% END %] - [% IF ( NovelistSelectProfile ) %] + [% IF ( NovelistSelectProfile && normalized_isbn ) %] [% END %] @@ -1163,16 +1191,16 @@ [% IF ( itemdata_ccode ) %]Collection[% END %] Call number [% IF ( itemdata_enumchron ) %]Vol info[% END %] - [% IF ( itemdata_uri ) %]url[% END %] + [% IF ( itemdata_uri ) %]URL[% END %] [% IF ( itemdata_copynumber ) %]Copy number[% END %] Status [% IF ( itemdata_itemnotes ) %]Notes[% END %] Date due [% IF ( OPACShowBarcode ) %]Barcode[% END %] [% IF holds_count.defined %] - Item holds + Item holds [% ELSIF show_priority %] - Item hold queue priority + Item hold queue priority [% END %] [% IF ( ShowCourseReservesHeader ) %]Course reserves[% END %] @@ -1260,15 +1288,39 @@ [% END %] [% IF ( itemdata_enumchron ) %] - [% ITEM_RESULT.enumchron %] + + [% IF ITEM_RESULT.enumchron && ITEM_RESULT.serialseq %] + [% ITEM_RESULT.enumchron %] + [% IF ( ITEM_RESULT.serialseq && ITEM_RESULT.enumchron!=ITEM_RESULT.serialseq ) %] + -- + [% ITEM_RESULT.serialseq %] + [% END %] + [% ELSIF ITEM_RESULT.enumchron %] + [% ITEM_RESULT.enumchron %] + [% ELSIF ITEM_RESULT.serialseq %] + [% ITEM_RESULT.serialseq %] + [% END %] + [% IF ( ITEM_RESULT.publisheddate ) %] + ([% ITEM_RESULT.publisheddate | $KohaDates %]) + [% END %] + [% END %] [% IF ( itemdata_uri ) %] [% IF ITEM_RESULT.uri %] [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - Link to resource + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + Link to resource + [% ELSE %] + Link to resource + [% END %] + [% ELSE %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% ITEM_RESULT.uri %] + [% ELSE %] [% ITEM_RESULT.uri %] + [% END %] [% END %] [% END %] @@ -1283,9 +1335,9 @@ [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %] [% IF ITEM_RESULT.priority %] [% IF holds_count.defined %] - (priority [% ITEM_RESULT.priority %]) + (priority [% ITEM_RESULT.priority %]) [% ELSE %] - [% ITEM_RESULT.priority %] + [% ITEM_RESULT.priority %] [% END %] [% END %] @@ -1294,14 +1346,16 @@ [% IF ITEM_RESULT.course_reserves %] [% FOREACH r IN ITEM_RESULT.course_reserves %] -

    - - [% r.course.course_name %] - - [% IF r.course.section %] [% r.course.section %] [% END %] - [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %] - -

    + [% IF r.course.enabled == 'yes' %] +

    + + [% r.course.course_name %] + + [% IF r.course.section %] [% r.course.section %] [% END %] + [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %] + +

    + [% END %] [% END %] [% END %] @@ -1354,13 +1408,15 @@ function highlightOn() { var x; for (x in q_array) { - q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); - q_array[x] = q_array[x].toLowerCase(); - var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); - if( $.inArray(q_array[x], myStopwords) == -1 ) { - $(".title").highlight(q_array[x]); - $(".author").highlight(q_array[x]); - $(".results_summary").highlight(q_array[x]); + if ( q_array[x].length > 0 ) { + q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); + q_array[x] = q_array[x].toLowerCase(); + var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); + if( $.inArray(q_array[x], myStopwords) == -1 ) { + $(".title").highlight(q_array[x]); + $(".author").highlight(q_array[x]); + $(".results_summary").highlight(q_array[x]); + } } } $(".highlight_toggle").toggle(); @@ -1409,11 +1465,24 @@ }); [% END %] + [%# Note that there is no way atm to target a column with its class name to set it as the default sort order %] + [% IF Koha.Preference('OpacLocationBranchToDisplay') == 'home' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes + OR Koha.Preference('OpacLocationBranchToDisplay') == 'holding' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes + OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND NOT item_level_itypes + OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes %] + var default_order_index = 1; + [% ELSIF Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes %] + var default_order_index = 2; + [% ELSE %] + var default_order_index = 0; + [% END %] $(".holdingst").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumns": [ [% IF ( item_level_itypes ) %]null,[% END %] - null, - [% IF ( OpacLocationBranchToDisplay == 'both' ) %]null,[% END %] + [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]null,[% END %] + [% UNLESS ( singleBranchMode ) %] + [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]null,[% END %] + [% END %] [% IF ( itemdata_ccode ) %]null,[% END %] null, [% IF ( itemdata_enumchron ) %]null,[% END %] @@ -1429,25 +1498,43 @@ null, [% END %] [% IF ( ShowCourseReservesHeader ) %]null,[% END %] - ] + ], + "aaSorting": [[ default_order_index, 'asc' ]] })); [% IF ( query_desc ) %][% IF ( OpacHighlightedWords ) %]var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') |html %]"; q_array = query_desc.split(" "); + q_array = q_array.filter(function(n){ return n }); // Remove empty strings highlightOn(); $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ; return false;}); $("#highlight_toggle_off").show().click(function() {highlightOff(); return false;});[% END %][% END %] [% IF ( GoogleJackets ) %] KOHA.Google.GetCoverFromIsbn([% covernewwindow %]); [% END %] + [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] + KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]); + [% END %] + [% IF OpenLibraryCovers %] KOHA.OpenLibrary.GetCoverFromIsbn(); [% END %] [% IF OPACLocalCoverImages %] KOHA.LocalCover.GetCoverFromBibnumber(true); [% END %] - [% IF ( NovelistSelectProfile ) %] - novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){}); + [% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] + novSelect.loadContentForQuery( + { + ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]', + ISBN : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]', + version : '2.1' + }, + '[% NovelistSelectProfile %]', + '[% NovelistSelectPassword %]', + function(d){ + if ( d.length > 0 ){ //If no content + $(".NovelistSelect").show(); + } + }); [% END %] [% IF ( OpacBrowseResults && busc ) %] @@ -1497,6 +1584,9 @@ [% IF ( GoogleJackets ) %] KOHA.Google.GetCoverFromIsbn([% covernewwindow %]); [% END %] + [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] + KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]); + [% END %] [% IF OpenLibraryCovers %] KOHA.OpenLibrary.GetCoverFromIsbn(); [% END %] @@ -1520,6 +1610,9 @@ [% IF ( GoogleJackets ) %] KOHA.Google.GetCoverFromIsbn([% covernewwindow %]); [% END %] + [% IF ( Koha.Preference('Coce') && Koha.Preference('CoceProviders') ) %] + KOHA.coce.getURL('[% Koha.Preference('CoceHost') %]', '[% Koha.Preference('CoceProviders') %]',[% covernewwindow %]); + [% END %] [% IF OpenLibraryCovers %] KOHA.OpenLibrary.GetCoverFromIsbn(); [% END %] @@ -1552,7 +1645,7 @@ $.post("/cgi-bin/koha/opac-ratings-ajax.pl", { rating_old_value: $("#rating_value").attr("value"), borrowernumber: "[% borrowernumber %]", - biblionumber: "[% biblionumber %]", + biblionumber: "[% biblionumber | html %]", rating_value: value, auth_error: value }, function (data) { @@ -1568,7 +1661,7 @@ $("#rating_value_text").text(''); } - $("#rating_text").text(_("average rating: ") + data.rating_avg_int + " (" + data.rating_total + ' ' + _("votes") + ")"); + $("#rating_text").text(_("average rating: ") + data.rating_avg + " (" + data.rating_total + ' ' + _("votes") + ")"); } }, "json"); @@ -1589,7 +1682,7 @@ if ($.browser.msie && parseInt($.browser.version, 10) >= 8 && window.XDomainRequest) { // Use Microsoft XDR for IE version 8 or above var xdr = new XDomainRequest(); - xdr.open("get", "http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); + xdr.open("get", "https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e"); xdr.onload = function() { json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... }; eval(json); // json is now a regular JSON object @@ -1597,7 +1690,7 @@ } xdr.send(); } else { - $.getJSON("http://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ + $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ parseIDBJSON(json); }); } @@ -1609,10 +1702,10 @@ function parseIDBJSON( json ) { if(json.total_results > 0 && json.book.rating > 0){ var isbn = $(".isbn:last").text().split(" ")[1]; - isbn = isbn.replace(/-/, ''); + isbn = isbn.replace(/\W+/g, ''); [% IF ( IDreamBooksReadometer ) %] - $(".title").append(''+json.book.title+' by '+json.book.author+''); + $(".title").append(''+json.book.title+_('); [% END %] [% IF ( IDreamBooksReviews ) %] @@ -1621,11 +1714,11 @@ //append happy-sad cloud review - $("#catalogue_detail_biblio").append(""+json.book.title+" by "+json.book.author+""+json.book.rating+"% rating based on reviews at iDreamBooks.com"); + $("#catalogue_detail_biblio").append(""+json.book.title+_(" by ")+json.book.author+""+json.book.rating+"% "+_("rating based on reviews at iDreamBooks.com")+""); //insert data into Book reviews tab $.each(json.book.critic_reviews, function(){ - $("#idb_review_snippets").append("
    "+this.source+"
    \"..."+this.snippet+"...\"
    Review date: "+this.review_date+"
    Review result: "+this.pos_or_neg+" iDreamBooks.com rating
    "); + $("#idb_review_snippets").append("
    "+this.source+"
    \"..."+this.snippet+"...\"
    "+_("Review date: ")+this.review_date+"
    "+_("Review result: ")+this.pos_or_neg+" "+_("iDreamBooks.com rating")+"
    "); }); $("#seemoreidb").attr('href', json.book.detail_link); $("#tab_idb_critic_reviews").show(); @@ -1728,7 +1821,7 @@ if (arrPagination[i] == undefined || arrPagination[i].url == "") continue; var li = $("
  • "); var html = "" + i + "" + arrPagination[i].title + ""; - if (arrPagination[i].author) html += "
    by " + arrPagination[i].author; + if (arrPagination[i].author) html += "
    " + _("by") + " " + arrPagination[i].author; li.html(html); if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD"); ul.append(li);