Bug 8693 - Sort biblio checkout history by checkout date instead of patron name
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / issuehistory.tt
index bc2490f..8f473e5 100644 (file)
@@ -1,13 +1,25 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Catalog &rsaquo; Checkout History for [% title |html %]</title>
+<title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% title |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
+<link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
+<script type="text/javascript" id="js">
+$(document).ready(function() {
+    $("#table_issues").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "aaSorting": [[ 4, "desc" ]]
+        })
+    );
+}); </script>
+
 </head>
-<body>
+<body id="catalog_issuehistory" class="catalog">
 
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Checkout History for <i>[% title |html %]</i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Checkout history for <i>[% title |html %]</i></div>
 
 <div id="doc3" class="yui-t2">
 
@@ -21,7 +33,7 @@
 <div class="searchresults">
     [% IF ( issues ) %]
         <h4>Checked out [% total %] times</h4>
-        <table>
+        <table id="table_issues">
             <thead><tr>
             <th>Patron</th>
             <th>Barcode</th>
@@ -34,7 +46,7 @@
             <tbody>
         [% FOREACH issue IN issues %]
         [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %]</a></td>
+                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %]</a></td>
                 <td>[% IF ( issue.barcode ) %]
                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% issue.biblionumber %]&amp;itemnumber=[% issue.itemnumber %]">[% issue.barcode %]</a>
                     [% ELSE %]