Bug 15196: Default sorting of patron lists
authorAleisha <aleishaamohia@hotmail.com>
Sun, 20 Mar 2016 23:47:30 +0000 (23:47 +0000)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 23 Mar 2016 22:59:42 +0000 (22:59 +0000)
This patch sorts users by surname.
Also string fix -> Firstname to First name in column heading

To test:
1) Go to a patron list
2) Confirm it is sorted by surname
3) Add a patron that will need to slot in the middle somewhere
4) Confirm the data table sorts it correctly
5) Confirm column heading change

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt

index 814c635..c0fb966 100644 (file)
@@ -14,6 +14,7 @@ $(document).ready(function() {
     $('#patrons_to_add_fieldset').hide();
 
         $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
+            "order": [[ 3, "asc" ]],
             "aoColumns": [
                 null,null,null,null,null,null,null,{ "sType": "title-string" },null
             ],
@@ -113,7 +114,7 @@ $(document).ready(function() {
                     <tr>
                         <th>&nbsp;</th>
                         <th>Card</th>
-                        <th>Firstname</th>
+                        <th>First name</th>
                         <th>Surname</th>
                         <th>Address</th>
                         <th>Category</th>