Bugzilla – Attachment 87016 Details for
Bug 11969
Show patrons star rating on their reading history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11969: Show patrons star rating on their reading history
Bug-11969-Show-patrons-star-rating-on-their-readin.patch (text/plain), 35.05 KB, created by
Owen Leonard
on 2019-03-26 13:57:02 UTC
(
hide
)
Description:
Bug 11969: Show patrons star rating on their reading history
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-03-26 13:57:02 UTC
Size:
35.05 KB
patch
obsolete
>From 285337eaea68d30de0770952f86f49dddc6a5ff2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 26 Mar 2019 13:51:47 +0000 >Subject: [PATCH] Bug 11969: Show patrons star rating on their reading history > >This patch adds display of a user's ratings to their reading history in >the OPAC. > >Also changed: Removed obsolete "border" attribute from the template, and >removed obsolete JavaScript include from opac-results.tt > >To test, apply the patch and rebuild the OPAC CSS. OpacStarRatings >should be set to all (results and details). > > - Log in to the OPAC as a user with a reading history and titles in > that history which have ratings. > - Under the "your reading history" tab, your ratings should show under > rated titles with the date of the rating. > - Test also with OpacStarRatings set to a value other than "all." >--- > .../bootstrap/en/modules/opac-readingrecord.tt | 462 +++++++++++---------- > .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 1 - > opac/opac-readingrecord.pl | 9 +- > 3 files changed, 248 insertions(+), 224 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index d03d5185..8ad27d4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -1,222 +1,240 @@ >-[% USE raw %] >-[% USE Koha %] >-[% USE KohaDates %] >-[% INCLUDE 'doc-head-open.inc' %] >-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your checkout history</title> >-[% INCLUDE 'doc-head-close.inc' %] >-[% BLOCK cssinclude %] >- <style>ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a { padding:0.6em 1em; }</style> >-[% END %] >-</head> >-[% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %] >-[% INCLUDE 'masthead.inc' %] >-[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] >-[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] >- >-[% IF Koha.Preference('AmazonAssocTag') %] >- [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >-[% ELSE %] >- [% AmazonAssocTag = '' %] >-[% END %] >- >-<div class="main"> >- <ul class="breadcrumb"> >- <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >- <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li> >- <li><a href="#">Your checkout history</a></li> >- </ul> >- >- <div class="container-fluid"> >- <div class="row-fluid"> >- <div class="span2"> >- <div id="navigation"> >- [% INCLUDE 'navigation.inc' IsPatronPage=1 %] >- </div> >- </div> >- <div class="span10"> >- <div id="userreadingrecord"> >- <h3>Checkout history</h3> >- >- [% IF READING_RECORD.size == 0 %] >- You have never borrowed anything from this library. >- [% ELSE %] >- <div id="opac-user-readingrec"> >- <div class="resultscontrol resort"> >- <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get"> >- [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %] >- <select name="order" id="order"> >- [% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %] >- [% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %] >- [% IF ( orderbyauthor ) %]<option value="author" selected="selected">Order by author</option>[% ELSE %]<option value="author">Order by author</option>[% END %] >- </select> >- <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" /> >- </form> >- </div> >- >- [% IF limit %] >- <p> >- Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&order=title[% END %]">Show all items</a> >- </p> >- [% ELSE %] >- <p> >- Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&order=title[% END %]">Show last 50 items</a> >- </p> >- [% END %] >- >- [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %] >- <div id="tabs" class="toptabs"> >- <ul> >- <li><a href="#tabs-container" id="tab_all">All</a></li> >- <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li> >- <li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li> >- </ul> >- [% END %] >- <div id="tabs-container" style="overflow:hidden"> >- <table id="readingrec" class="table table-bordered table-striped"> >- <thead> >- <tr> >- <th style="display:none;">Type</th> >- <th class="nosort"></th> >- <th class="anti-the">Title</th> >- <th>Item type</th> >- <th>Call no.</th> >- <th class="title-string">Date</th> >- [% IF ( OPACMySummaryHTML ) %] >- <th>Links</th> >- [% END %] >- </tr> >- </thead> >- <tbody> >- [% FOREACH issue IN READING_RECORD %] >- <tr> >- <td style="display:none;"> >- [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' %] >- [% ELSE %][% issuetype = 'standard_checkout' %] >- [% END %] >- [% issuetype | html %] >- </td> >- <td> >- [% IF ( AdlibrisEnabled && issue.normalized_isbn ) %] >- [% IF issue.BiblioDefaultViewmarc %] >- <a href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]"> >- [% ELSIF issue.BiblioDefaultViewisbd %] >- <a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]"> >- [% ELSE %] >- <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]"> >- [% END %] >- <img src="[% AdlibrisURL | html %]?isbn=[% issue.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" /></a> >- [% END %] >- [% IF OPACAmazonCoverImages %] >- [% IF issue.normalized_isbn %] >- <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >- [% END %] >- >- [% IF GoogleJackets %] >- [% IF issue.normalized_isbn %] >- <div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >- [% END %] >- >- [% IF BakerTaylorEnabled %] >- [% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %] >- [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >- [% ELSE %] >- <span class="no-image">No cover image available</span> >- [% END %] >- [% END %] >- >- [% IF SyndeticsEnabled && SyndeticsCoverImages %] >- <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% issue.normalized_upc | html %]&oclc=[% issue.normalized_oclc | html %]" alt="" class="item-thumbnail" /> >- [% END %] >- </td> >- <td> >- [% IF issue.BiblioDefaultViewmarc %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >- [% ELSIF issue.BiblioDefaultViewisbd %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >- [% END %] >- <span class="item-details">[% issue.author | html %]</span> >- </td> >- <td> >- [% UNLESS ( noItemTypeImages ) %] >- [% IF ( issue.imageurl ) %] >- <img src="[% issue.imageurl | html %]" alt="" /> >- [% END %] >- [% END %] >- <span class="tdlabel">Item type:</span> >- [% issue.translated_description | html %]</td> >- <td> >- <span class="tdlabel">Call number:</span> >- [% issue.itemcallnumber | html %] >- </td> >- <td> >- [% IF issue.returndate %] >- <span class="tdlabel">Check-in date:</span> >- <span title="[% issue.returndate | html %]">[% issue.returndate | $KohaDates %]</span> >- [% ELSE %] >- <span title="Checked out"><em>(Checked out)</em></span> >- [% END %] >- </td> >- [% IF OPACMySummaryHTML %] >- <td>[% issue.MySummaryHTML | $raw %]</td> >- [% END %] >- </tr> >- [% END # / FOREACH issue %] >- </tbody> >- </table> >- </div> <!-- / .tabs-container --> >- [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %] >- </div> <!-- /#tabs --> >- [% END %] >- </div> <!-- / .opac-user-readingrec --> >- [% END # / IF READING_RECORD.size %] >- </div> <!-- / .userreadingrecord --> >- </div> <!-- / .span10 --> >- </div> <!-- / .row-fluid --> >- </div> <!-- / .container-fluid --> >-</div> <!-- / .main --> >- >-[% INCLUDE 'opac-bottom.inc' %] >-[% BLOCK jsinclude %] >-[% INCLUDE 'datatables.inc' %] >-<script> >-//<![CDATA[ >- $(document).ready(function(){ >- [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] >- $('#sortsubmit').hide(); >- $('#order').change(function() { >- $('#sortform').submit(); >- }); >- >- var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sPaginationType": "four_button", >- "columnDefs": [ >- { "targets": [ "nosort" ],"sortable": false,"searchable": false }, >- { "type": "anti-the", "targets" : [ "anti-the" ] }, >- { "type": "title-string", "targets" : [ "title-string" ] } >- ] >- })); >- var tabs = $("#tabs").tabs({ >- select: function(e, ui) { >- var id = $(ui.tab).attr("id"); >- if ( id == "tab_checkout" ) { >- table.fnFilter("standard_checkout", 0); >- } else if ( id == "tab_onsite_checkout" ) { >- table.fnFilter("onsite_checkout", 0); >- } else { // all >- table.fnFilter('', 0); >- } >- } >- }); >- }); >-//]]> >-</script> >-[% END %] >+[% USE raw %] >+[% USE Koha %] >+[% USE KohaDates %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Your checkout history</title> >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %] >+ <style>ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a { padding:0.6em 1em; }</style> >+[% END %] >+</head> >+[% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %] >+[% INCLUDE 'masthead.inc' %] >+[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] >+[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] >+ >+[% IF Koha.Preference('AmazonAssocTag') %] >+ [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >+[% ELSE %] >+ [% AmazonAssocTag = '' %] >+[% END %] >+ >+<div class="main"> >+ <ul class="breadcrumb"> >+ <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >+ <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">›</span></li> >+ <li><a href="#">Your checkout history</a></li> >+ </ul> >+ >+ <div class="container-fluid"> >+ <div class="row-fluid"> >+ <div class="span2"> >+ <div id="navigation"> >+ [% INCLUDE 'navigation.inc' IsPatronPage=1 %] >+ </div> >+ </div> >+ <div class="span10"> >+ <div id="userreadingrecord"> >+ <h3>Checkout history</h3> >+ >+ [% IF READING_RECORD.size == 0 %] >+ You have never borrowed anything from this library. >+ [% ELSE %] >+ <div id="opac-user-readingrec"> >+ <div class="resultscontrol resort"> >+ <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get"> >+ [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %] >+ <select name="order" id="order"> >+ [% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %] >+ [% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %] >+ [% IF ( orderbyauthor ) %]<option value="author" selected="selected">Order by author</option>[% ELSE %]<option value="author">Order by author</option>[% END %] >+ </select> >+ <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" /> >+ </form> >+ </div> >+ >+ [% IF limit %] >+ <p> >+ Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&order=title[% END %]">Show all items</a> >+ </p> >+ [% ELSE %] >+ <p> >+ Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&order=title[% END %]">Show last 50 items</a> >+ </p> >+ [% END %] >+ >+ [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %] >+ <div id="tabs" class="toptabs"> >+ <ul> >+ <li><a href="#tabs-container" id="tab_all">All</a></li> >+ <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li> >+ <li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li> >+ </ul> >+ [% END %] >+ <div id="tabs-container" style="overflow:hidden"> >+ <table id="readingrec" class="table table-bordered table-striped"> >+ <thead> >+ <tr> >+ <th style="display:none;">Type</th> >+ <th class="nosort"></th> >+ <th class="anti-the">Title</th> >+ <th>Item type</th> >+ <th>Call no.</th> >+ <th class="title-string">Date</th> >+ [% IF ( OPACMySummaryHTML ) %] >+ <th>Links</th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH issue IN READING_RECORD %] >+ <tr> >+ <td style="display:none;"> >+ [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' %] >+ [% ELSE %][% issuetype = 'standard_checkout' %] >+ [% END %] >+ [% issuetype | html %] >+ </td> >+ <td> >+ [% IF ( AdlibrisEnabled && issue.normalized_isbn ) %] >+ [% IF issue.BiblioDefaultViewmarc %] >+ <a href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]"> >+ [% ELSIF issue.BiblioDefaultViewisbd %] >+ <a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]"> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]"> >+ [% END %] >+ <img src="[% AdlibrisURL | html %]?isbn=[% issue.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" /></a> >+ [% END %] >+ [% IF OPACAmazonCoverImages %] >+ [% IF issue.normalized_isbn %] >+ <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] >+ >+ [% IF GoogleJackets %] >+ [% IF issue.normalized_isbn %] >+ <div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] >+ >+ [% IF BakerTaylorEnabled %] >+ [% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %] >+ [% IF ( bt_id ) %] >+ <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] >+ >+ [% IF SyndeticsEnabled && SyndeticsCoverImages %] >+ <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% issue.normalized_upc | html %]&oclc=[% issue.normalized_oclc | html %]" alt="" class="item-thumbnail" /> >+ [% END %] >+ </td> >+ <td> >+ [% IF issue.BiblioDefaultViewmarc %] >+ <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >+ [% ELSIF issue.BiblioDefaultViewisbd %] >+ <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >+ [% ELSE %] >+ <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >+ [% END %] >+ <p class="results-summary item-details">[% issue.author | html %]</p> >+ >+ [% IF ( Koha.Preference( 'OpacStarRatings' ) == 'all' && issue.my_rating ) %] >+ <div class="results_summary ratings"> >+ <div class="br-wrapper br-theme-fontawesome-stars"> >+ <div class="br-widget br-readonly"> >+ [% FOREACH i IN [ 1 2 3 4 5 ] %] >+ [% IF issue.my_rating.rating_value == i %] >+ <a href="#" class="br-selected br-current"></a> >+ [% ELSIF issue.my_rating.rating_value > i %] >+ <a href="#" class="br-selected"></a> >+ [% ELSE %] >+ <a href="#"></a> >+ [% END %] >+ [% END %] >+ </div> >+ </div> >+ Rated on [% issue.my_rating.timestamp | $KohaDates %] >+ </div> <!-- / .results_summary --> >+ [% END # / IF OpacStarRatings %] >+ >+ </td> >+ <td> >+ [% UNLESS ( noItemTypeImages ) %] >+ [% IF ( issue.imageurl ) %] >+ <img src="[% issue.imageurl | html %]" alt="" /> >+ [% END %] >+ [% END %] >+ <span class="tdlabel">Item type:</span> >+ [% issue.translated_description | html %]</td> >+ <td> >+ <span class="tdlabel">Call number:</span> >+ [% issue.itemcallnumber | html %] >+ </td> >+ <td> >+ [% IF issue.returndate %] >+ <span class="tdlabel">Check-in date:</span> >+ <span title="[% issue.returndate | html %]">[% issue.returndate | $KohaDates %]</span> >+ [% ELSE %] >+ <span title="Checked out"><em>(Checked out)</em></span> >+ [% END %] >+ </td> >+ [% IF OPACMySummaryHTML %] >+ <td>[% issue.MySummaryHTML | $raw %]</td> >+ [% END %] >+ </tr> >+ [% END # / FOREACH issue %] >+ </tbody> >+ </table> >+ </div> <!-- / .tabs-container --> >+ [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %] >+ </div> <!-- /#tabs --> >+ [% END %] >+ </div> <!-- / .opac-user-readingrec --> >+ [% END # / IF READING_RECORD.size %] >+ </div> <!-- / .userreadingrecord --> >+ </div> <!-- / .span10 --> >+ </div> <!-- / .row-fluid --> >+ </div> <!-- / .container-fluid --> >+</div> <!-- / .main --> >+ >+[% INCLUDE 'opac-bottom.inc' %] >+[% BLOCK jsinclude %] >+[% INCLUDE 'datatables.inc' %] >+<script> >+ $(document).ready(function(){ >+ [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] >+ $('#sortsubmit').hide(); >+ $('#order').change(function() { >+ $('#sortform').submit(); >+ }); >+ >+ var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ "columnDefs": [ >+ { "targets": [ "nosort" ],"sortable": false,"searchable": false }, >+ { "type": "anti-the", "targets" : [ "anti-the" ] }, >+ { "type": "title-string", "targets" : [ "title-string" ] } >+ ] >+ })); >+ var tabs = $("#tabs").tabs({ >+ select: function(e, ui) { >+ var id = $(ui.tab).attr("id"); >+ if ( id == "tab_checkout" ) { >+ table.fnFilter("standard_checkout", 0); >+ } else if ( id == "tab_onsite_checkout" ) { >+ table.fnFilter("onsite_checkout", 0); >+ } else { // all >+ table.fnFilter('', 0); >+ } >+ } >+ }); >+ }); >+</script> >+[% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 501ceb2..d019195 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -613,7 +613,6 @@ > [% IF ( LibraryThingForLibrariesID ) %] > <script src="https://ltfl.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID | html %]&systype=koha"></script> > [% END %] >-[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") | $raw %][% END %] > [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %] > [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %] > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 49348ad..c01409a 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -33,6 +33,7 @@ use C4::Charset qw(StripNonXmlChars); > use Koha::Patrons; > > use Koha::ItemTypes; >+use Koha::Ratings; > > my $query = new CGI; > >@@ -121,6 +122,12 @@ foreach my $issue ( @{$issues} ) { > : $my_summary_html =~ s/{BIBLIONUMBER}//g; > $issue->{MySummaryHTML} = $my_summary_html; > } >+ # Star ratings >+ if ( C4::Context->preference('OpacStarRatings') eq 'all' ) { >+ my $ratings = Koha::Ratings->search({ biblionumber => $issue->{biblionumber} }); >+ $issue->{ratings} = $ratings; >+ $issue->{my_rating} = $borrowernumber ? $ratings->search({ borrowernumber => $borrowernumber })->next : undef; >+ } > } > > if (C4::Context->preference('BakerTaylorEnabled')) { >@@ -140,7 +147,7 @@ BEGIN { > } > } > >-for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above >+for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above > C4::Context->preference($_) or next; > $template->param($_=>1); > $template->param(JacketImages=>1); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11969
:
82749
|
85354
|
86047
|
87016
|
87636
|
87666