Bug 21376: Add ability to date sorting in items table on catalogue detail
authorJosef Moravec <josef.moravec@gmail.com>
Wed, 19 Sep 2018 06:05:12 +0000 (06:05 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 1 Oct 2018 13:56:36 +0000 (13:56 +0000)
Changes in this patch (page catalogue/detail):
- enable sorting by date in items table

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index ce1c863..fa6431a 100644 (file)
                 [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
                 <th>Call number</th>
                 <th>Status</th>
-                <th>Last seen</th>
+                <th class="title-string">Last seen</th>
                 <th>Barcode</th>
                 [% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %]
                 [% IF ( itemdata_uri ) %]<th>URL</th>[% END %]
                         [% END %]
 
                     </td>
-                    <td class="datelastseen">[% item.datelastseen | $KohaDates %]</td>
+                    <td class="datelastseen"><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | html %]&amp;itemnumber=[% item.itemnumber | html %]&amp;biblionumber=[% item.biblionumber | html %]&amp;bi=[% item.biblioitemnumber | html %]#item[% item.itemnumber | html %]">[% item.barcode | html %]</a></td>
                     [% IF ( volinfo ) %]
                         <td class="enumchron">
                     'bPaginate': false,
                     'bAutoWidth': false,
                     "aoColumnDefs": [
-                        { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
+                        { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
+                        { "sType": "title-string", "aTargets" : [ "title-string" ] }
                     ]
                 };
                 var table = KohaTable(id, dt_parameters, null, 'with_filters');