Bug 12089: Remove use of dt_add_type_uk_date() - Members
authorOwen Leonard <oleonard@myacpl.org>
Tue, 15 Apr 2014 19:09:30 +0000 (15:09 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 28 Apr 2014 18:37:20 +0000 (18:37 +0000)
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.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt

index 29fe1af..5460ea0 100644 (file)
@@ -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" ] }
         ]
     }));
  });
 
 <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>
 
             <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 %]&nbsp;[% 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>