[Koha-patches] [PATCH] Bug 12089 - Remove use of dt_add_type_uk_date() - Members

Owen Leonard oleonard at myacpl.org
Tue Apr 15 21:12:56 CEST 2014


This patch removes use of dt_add_type_uk_date() from the circulation
history page and updates the sorting configuration according to
current guidelines.

The patch also makes corrections for HTML validity.

To test, open the circulation history page for a patron with a history
of checkouts. Confirm that the date, title, checkout date, due date, and
return date columns sort correctly.
---
 .../prog/en/modules/members/readingrec.tt          |   44 +++++++++-----------
 1 file changed, 20 insertions(+), 24 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
index 29fe1af..5460ea0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
@@ -8,23 +8,12 @@
 //<![CDATA[
 
  $(document).ready(function() {
-    [% IF (dateformat == 'metric') %]
-        dt_add_type_uk_date();
-    [% END %]
     $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
         "sPaginationType": "four_button",
         "aaSorting": [],
-        "aoColumns": [
-            null,
-            { "sType": "anti-the" },
-            null,
-            null,
-            null,
-            null,
-            null,
-            null,
-            null,
-            { "sType": "title-string" }
+        "aoColumnDefs": [
+            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
+            { "sType": "title-string", "aTargets" : [ "title-string" ] }
         ]
     }));
  });
@@ -55,21 +44,24 @@
 
 <table id="table_readingrec">
 <thead>
-    <th>Date</th>
-	<th>Title</th>
+    <tr>
+    <th class="title-string">Date</th>
+    <th class="anti-the">Title</th>
 	<th>Author</th>
     <th>Call no.</th>
 	<th>Barcode</th>
     <th>Number of renewals</th>
-	<th>Checked out on</th>
+    <th class="title-string">Checked out on</th>
 	<th>Checked out from</th>
-    <th>Date due</th>
-    <th>Return date</th>
+    <th class="title-string">Date due</th>
+    <th class="title-string">Return date</th>
+    </tr>
 </thead>
+<tbody>
 [% FOREACH issue IN loop_reading %]
     [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
         <td>
-            [% issue.issuestimestamp | $KohaDates %]
+            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
         </td>
         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
 
@@ -88,21 +80,25 @@
             <td>
         [% issue.renewals %]</td>
             <td>
-        [% issue.issuedate | $KohaDates %]</td>
+                <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
             <td>
         [% issue.issuingbranch %]</td>
 			<td>[% IF issue.date_due %]
-                    [% issue.date_due | $KohaDates %]
-                [% ELSE %] [% END %]</td>
+                    <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
+                [% ELSE %]
+                    <span title="0000-00-00"></span>
+                [% END %]
+            </td>
             <td>
                 [% IF  issue.returndate %]
                     <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
                 [% ELSE %]
-                    <span title="Checked Out"><small>Checked Out</small></span>
+                    <span title="Checked Out"><small>Checked out</small></span>
                 [% END %]
             </td>
 </tr>
 [% END %]
+</tbody>
 </table>
 [% END %]
 </div>
-- 
1.7.9.5


More information about the Koha-patches mailing list