[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Details for: [% title | html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield | html %][% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-[% IF ( bidi ) %]
- [% BLOCK cssinclude %][% Asset.css("css/right-to-left.css") | $raw %][% END %]
-[% END %]
-[% IF ( OpacStarRatings != 'disable' ) %]
- [% BLOCK cssinclude %][% Asset.css("css/jquery.rating.css") | $raw %][% END %]
-[% END %]
-[% INCLUDE greybox.inc %]
[% Asset.css("lib/emoji-picker/css/emoji.css") | $raw %]
</head>
+[% BLOCK cssinclude %][% END %]
[% INCLUDE 'bodytag.inc' bodyid='opac-detail' bodyclass='scrollto' %]
[% INCLUDE 'masthead.inc' %]
[% SET rating_avg = ratings.get_avg_rating() %]
[% rating_avg_int = BLOCK %][% rating_avg | format("%.0f") %][% END %]
- [% FOREACH i IN [ 1 2 3 4 5 ] %]
- [% IF rating_avg_int == i && borrowernumber %]
- <input class="auto-submit-star" type="radio" name="rating" value="[% i | html %]" checked="checked" />
- [% ELSIF rating_avg_int == i %]
- <input class="auto-submit-star" type="radio" name="rating" value="[% i | html %]" checked="checked" disabled="disabled" />
- [% ELSIF borrowernumber %]
- <input class="auto-submit-star" type="radio" name="rating" value="[% i | html %]" />
- [% ELSE %]
- <input class="auto-submit-star" type="radio" name="rating" value="[% i | html %]" disabled="disabled" />
- [% END %]
+
+ [% IF ( borrowernumber ) %]
+ <select id="star_rating" name="rating" data-rating-enabled="1" autocomplete="off">
+ [% ELSE %]
+ <select id="star_rating" name="rating" data-rating-enabled="0" disabled="disabled" autocomplete="off">
[% END %]
+ [% IF ( rating_avg_int == 0 ) %]
+ <option value="" selected="selected"></option>
+ [% END %]
+ [% FOREACH i IN [ 1 2 3 4 5 ] %]
+ [% IF rating_avg_int == i %]
+ <option value="[% i | html %]" selected="selected">[% i | html %]</option>
+ [% ELSE %]
+ <option value="[% i | html %]">[% i | html %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ <img id="rating-loading" style="display:none" src="[% interface | html %]/[% theme | html %]/images/spinner-small.gif" alt="" />
<!-- define some hidden vars for ratings -->
[% UNLESS ( rating_readonly ) %] <input name="rate_button" type="submit" value="Rate me" />[% END %]
[% IF my_rating %]
- <span id="rating_value_text">your rating: [% my_rating.rating_value | html %], </span>
+ <span id="rating_value_text">Your rating: [% my_rating.rating_value | html %].</span>
+ <span id="cancel_rating_text"><a href="#"><i class="fa fa-remove"></i> Cancel rating</a>.</span>
[% ELSE %]
<span id="rating_value_text"></span>
+ <span id="cancel_rating_text" style="display:none;"><a href="#"><i class="fa fa-remove"></i> Cancel rating</a>.</span>
[% END %]
- <span id="rating_text">average rating: [% rating_avg | html %] ([% ratings.count | html %] votes)</span>
+ <span id="rating_text">Average rating: [% rating_avg | html %] ([% ratings.count | html %] votes)</span>
</div>
</form>
[% END # / IF OpacStarRatings != 'disable' %]
[% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
<a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
[% ELSE %]
- [% MARCNOTE.marcnote FILTER html_line_break | html %]
+ [% MARCNOTE.marcnote | html | html_line_break %]
[% END %]
</p>
[% END %]
[% IF ( subscription.closed ) %]
<p class="subscription_closed">This subscription is closed.</p>
[% END %]
+ [% IF ( subscription.location ) %]
+ <p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location, 1 ) | html %]
+ [% END %]
[% IF ( subscription.callnumber ) %]
<p class="subscription_callnumber">Call number: [% subscription.callnumber | html %]</p>
[% END %]
[% IF ( subscription.subscriptionnotes ) %]
- <p class="subscription_notes">[% subscription.subscriptionnotes FILTER html_line_break | html %] </p>
+ <p class="subscription_notes">[% subscription.subscriptionnotes | html | html_line_break %] </p>
[% END %]
<p class="subscription_dates">Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p>
[% IF ( subscription.letter ) %]<span class="email_notifications">
[% END %]
</span>[% END %]
[% IF ( subscription.missinglist ) %]
- <p class="subscription_missing">Missing issues: [% subscription.missinglist | html %] </p>
+ <p class="subscription_missing">Missing issues: [% subscription.missinglist | html | html_line_break %] </p>
[% END %]
[% IF ( subscription.opacnote ) %]
- <p class="subscription_opacnote">[% subscription.opacnote FILTER html_line_break | html %]</p>
+ <p class="subscription_opacnote">[% subscription.opacnote | html | html_line_break %]</p>
[% END %]
[% IF ( subscription.latestserials ) %]
<p class="subscription_latestissues"> The [% subscription.opacdisplaycount | html %] latest issues for this subscription:</p>
[% FOREACH latestserial IN subscription.latestserials %]
<tr>
<td class="serialseq">[% latestserial.serialseq | html %]</td>
- <td class="publisheddate">[% latestserial.publisheddate | html %]</td>
- <td class="planneddate">[% latestserial.planneddate | html %]</td>
+ <td class="publisheddate"><span title="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</span></td>
+ <td class="planneddate"><span title="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</span></td>
<td class="serial_status">
[% IF (latestserial.status1 ) %]<span>Expected</span>[% END %]
[% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %]
[% END %]
</li>
[%# busc is already URI encoded %]
- <li class="back_results"><a href="opac-search.pl?[% busc | uri %]" title="Back to the results search list">Back to results</a></li>
+ <li class="back_results"><a href="opac-search.pl?[% busc | $raw %]" title="Back to the results search list">Back to results</a></li>
<li class="right_results">
[% IF ( nextBiblionumber ) %]
<a href="opac-detail.pl?biblionumber=[% nextBiblionumber | uri %][% IF ( query_desc && OpacHighlightedWords ) %]&query_desc=[% query_desc |uri %][% END %]" title="See: [% IF ( nextTitle ) %][% nextTitle | html %][% ELSE %]next biblio[% END %]">Next <i class="fa fa-angle-double-right"></i></a>
<div><a id="facebook" href="http://www.facebook.com/sharer.php?u=[% current_url |url %]&t=[% title |url %]" title="Share on Facebook">Facebook</a></div>
<div><a id="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=[% current_url |url %]&title=[% title |url %]" title="Share on LinkedIn">LinkedIn</a></div>
<div><a id="email" href="mailto:?subject=[% title |url %]&body=[% title |url %]%20([% current_url |url %])" title="Share by email">Email</a></div>
- <div><div class="g-plusone" data-size="small" data-count="false"></div></div>
<div><a id="twitter" href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="[% title |url %]" data-lang="[% lang | html %]">Tweet</a></div>
</div>
[% END %]
[% END %]
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
- <td class="shelving_location">[% ITEM_RESULT.location_description | html %]</td>
+ <td class="shelving_location"><span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span></td>
[% END %]
<td class="call_no" property="sku">
[% END %]
[% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber | html %]</td>[% END %]
<td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
- [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | html %]</td>[% END %]
- <td class="date_due"><span title="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 | html %]</span></td>
+ [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes | $raw %]</td>[% END %]
+ <td class="date_due"><span title="[% ITEM_RESULT.datedue | html %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</span></td>
<td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode | html %]</td>
[% IF holds_count.defined || show_priority %]
<td class="holds_count">
[% r.course.course_name | html %]
<!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
[% IF r.course.section %] [% r.course.section | html %] [% END %]
- [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
+ [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term, 1 ) | html %] [% END %]
</a>
</p>
[% END %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
+[% INCLUDE greybox.inc %]
[% IF ( SocialNetworks ) %]
- <script src="https://apis.google.com/js/plusone.js">
- //<![CDATA[
- {lang: '[% lang | html %]'}
- //]]>
- </script>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
[% END %]
-[% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") | $raw %][% END %]
+[% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %][% END %]
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
{ "targets": [ -1 ], "sortable": false, "searchable": false },
{ "type": "title-string", "targets" : [ "title-string" ] }
],
- "bKohaColumnsUseNames": true
+ "bKohaColumnsUseNames": true,
+ "autoWidth": false
}, columns_settings);
KohaTable("#otherholdingst", {
{ "targets": [ -1 ], "sortable": false, "searchable": false },
{ "type": "title-string", "targets" : [ "title-string" ] }
],
- "bKohaColumnsUseNames": true
+ "bKohaColumnsUseNames": true,
+ "autoWidth": false
}, columns_settings);
var serial_column_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
KohaTable("#subscriptionst", {
dom: '<"clearfix">t',
+ "sorting": [[ 1, "desc" ]],
"columnDefs": [
{ "type": "title-string", "targets" : [ "title-string" ] }
],
+ "autoWidth": false,
"bKohaColumnsUseNames": true
}, serial_column_settings);
$('input[name="rate_button"]').remove();
- $(function () {
- $(".auto-submit-star").rating({
- cancel: _("Cancel rating"),
- callback: function (value, link) {
-
- // if the new value equals the old value, dont execute callback...
- // just do nothing!
- if ($("#rating_value").attr("value") != value) {
-
- $(function () {
-
- $.post("/cgi-bin/koha/opac-ratings-ajax.pl", {
+ var rating_enabled = ( $("#star_rating").data("rating-enabled") == "1" ) ? false : true;
+ $('#star_rating').barrating({
+ theme: 'fontawesome-stars',
+ showSelectedRating: false,
+ allowEmpty: true,
+ deselectable: false,
+ readonly: rating_enabled,
+ onSelect: function(value, text) {
+ $("#rating-loading").show();
+ $.post("/cgi-bin/koha/opac-ratings-ajax.pl", {
rating_old_value: $("#rating_value").attr("value"),
borrowernumber: "[% borrowernumber | html %]",
biblionumber: "[% biblio.biblionumber | html %]",
rating_value: value,
auth_error: value
- }, function (data) {
-
- if (data.auth_status != 'ok') {
- window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again."));
- } else {
- $("#rating_value").val(data.rating_value);
-
- if (data.rating_value) {
- $("#rating_value_text").text(_("your rating: %s, ").format(data.rating_value));
- } else {
- $("#rating_value_text").text('');
- }
-
- $("#rating_text").text(_("average rating: %s (%s votes)").format(data.rating_avg, data.rating_total));
-
- }
- }, "json");
- });
- };
+ }, function (data) {
+ $("#rating_value").val(data.rating_value);
+ if (data.rating_value) {
+ $("#rating_value_text").text(_("Your rating: %s, ").format(data.rating_value));
+ $("#cancel_rating_text").show();
+ } else {
+ $("#rating_value_text").text('');
+ $("#cancel_rating_text").hide();
+ }
+ $("#rating_text").text(_("Average rating: %s (%s votes)").format(data.rating_avg, data.rating_total));
+ $("#rating-loading").hide();
+ }, "json");
}
- });
});
- // -----------------------------------------------------
+
+ $("#cancel_rating_text a").on("click", function(e){
+ e.preventDefault();
+ $("#star_rating").barrating("set", "");
+ });
+
[% END # / IF ( OpacStarRatings != 'disable' )%]
[% IF ( IDreamBooksReviews || IDreamBooksReadometer ) %]
}
}
[% END # / IF IDreamBooksReviews || IDreamBooksReadometer %]
-
-//]]>
</script>
[% IF OPACPopupAuthorsSearch %]