From dd3b09bd8e1879c4c2f43e729f324f9dcbd1c803 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 12 Nov 2014 11:40:14 -0500 Subject: [PATCH] [PASSED QA] Bug 13234 [Follow-up] Make on-site checkouts visible in OPAC This follow-up makes a few changes to the template: 1. The "show all" / "show 50" links have been modified to show the current state. 2. The tabs are only shown if the OnSiteCheckouts preference is turned on. 3. The DataTables configuration has been modified so that title sorting ignores articles, sorting on the the first column is disabled, and sorting by date works regardless of your dateformat preference. 4. Some indentation has been corrected and markup comments added. To test the opacreadinghistory preference must be enabled. Log in to the OPAC as a patron who has some on-site checkouts as well as regular checkouts. With OnSiteCheckouts enabled, view the reading history page and confirm that the tabs work correctly. Test the table sorting controls. With OnSiteCheckouts disabled, confirm that the tabs do not appear. Test the "Show all items"/"Show last 50 items" links and confirm that the behavior is correct. Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Works as described, passes tests and QA script. Good addition to the new on-site feature. Note: It would be nice to show the 'on-site' note also in the liste of checkouts on the summary page! --- .../bootstrap/en/modules/opac-readingrecord.tt | 184 +++++++++++---------- 1 file changed, 99 insertions(+), 85 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 9a57af8..6a65000 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -31,7 +31,7 @@ [% IF READING_RECORD.size == 0 %] You have never borrowed anything from this library. [% ELSE %] -
+
[% UNLESS ( limit ) %][% END %] @@ -44,115 +44,124 @@
[% IF limit %] - Show all items +

+ Showing last 50 items. Show all items +

[% ELSE %] - Showing last 50 items +

+ Showing all items. Show last 50 items +

[% END %] + [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %]
+ [% END %]
- - + + - + [% IF ( OPACMySummaryHTML ) %] [% END %] - [% FOREACH issue IN READING_RECORD %] - - - + + - - - - - [% IF OPACMySummaryHTML %] - - [% END %] - - [% END %] - -
TypeTitleTitle Item type Call no.DateDateLinks
- [% IF issue.onsite_checkout %] - onsite - [% ELSE %] - checkout - [% END %] - - [% IF OPACAmazonCoverImages %] - [% IF issue.normalized_isbn %] - - [% ELSE %] - No cover image available - [% END %] - [% END %] + [% FOREACH issue IN READING_RECORD %] +
+ [% IF issue.onsite_checkout %] + onsite + [% ELSE %] + checkout + [% END %] + + [% IF OPACAmazonCoverImages %] + [% IF issue.normalized_isbn %] + + [% ELSE %] + No cover image available + [% END %] + [% END %] - [% IF GoogleJackets %] - [% IF issue.normalized_isbn %] -
- [% ELSE %] - No cover image available - [% END %] - [% END %] + [% IF GoogleJackets %] + [% IF issue.normalized_isbn %] +
+ [% ELSE %] + No cover image available + [% END %] + [% END %] - [% IF BakerTaylorEnabled %] - [% IF issue.normalized_isbn %] - See Baker & Taylor - [% ELSE %] - No cover image available - [% END %] - [% END %] + [% IF BakerTaylorEnabled %] + [% IF issue.normalized_isbn %] + See Baker & Taylor + [% ELSE %] + No cover image available + [% END %] + [% END %] - [% IF SyndeticsEnabled && SyndeticsCoverImages %] - [% IF using_https %] - - [% ELSE %] - - [% END %] - [% END %] -
- [% IF issue.BiblioDefaultViewmarc %] - [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] - [% ELSIF issue.BiblioDefaultViewisbd %] - [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] - [% ELSE %] - [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] - [% END %] - [% issue.author %] - - [% UNLESS ( noItemTypeImages ) %] - [% IF ( issue.imageurl ) %] - - [% END %] - [% END %] - Item type: - [% issue.description %] - Call number: - [% issue.itemcallnumber %] - - [% IF issue.returndate %] - Check-in date: - [% issue.returndate | $KohaDates %] - [% ELSE %] - (Checked out) - [% END %] - [% issue.MySummaryHTML %]
-
-
- [% END %] + [% IF SyndeticsEnabled && SyndeticsCoverImages %] + [% IF using_https %] + + [% ELSE %] + + [% END %] + [% END %] + + + [% IF issue.BiblioDefaultViewmarc %] + [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] + [% ELSIF issue.BiblioDefaultViewisbd %] + [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] + [% ELSE %] + [% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %] + [% END %] + [% issue.author %] + + + [% UNLESS ( noItemTypeImages ) %] + [% IF ( issue.imageurl ) %] + + [% END %] + [% END %] + Item type: + [% issue.description %] + + Call number: + [% issue.itemcallnumber %] + + + [% IF issue.returndate %] + Check-in date: + [% issue.returndate | $KohaDates %] + [% ELSE %] + (Checked out) + [% END %] + + [% IF OPACMySummaryHTML %] + [% issue.MySummaryHTML %] + [% END %] + + [% END # / FOREACH issue %] + + +
+ [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %] +
+ [% END %] + + [% END # / IF READING_RECORD.size %] @@ -173,6 +182,11 @@ var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { "sPaginationType": "four_button", + "aoColumnDefs": [ + { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false }, + { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, + { "sType": "title-string", "aTargets" : [ "title-string" ] } + ] })); var tabs = $("#tabs").tabs({ select: function(e, ui) { -- 1.9.1