Bug 9916: (follow-up) restore default sort order for OPAC "most popular" page
authorGalen Charlton <gmc@esilibrary.com>
Mon, 19 Aug 2013 14:39:24 +0000 (14:39 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 19 Aug 2013 14:39:24 +0000 (14:39 +0000)
Set the primary default sort order to descending number of checkouts,
matching the situation prior to the introduction of DataTables. This
patch also sets the default secondary sort to ascending title.

To test:

[1] Ensure that OpacTopissue is ON.
[2] Go to the OPAC "most popular" page.
[3] Verify that the items are sorted in order of descending
    checkout count.  If two items have the same number of
    checkouts, verify that they are sorted in ascending
    title order.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tt

index 6482168..a850c9b 100644 (file)
@@ -9,6 +9,7 @@
             "aoColumnDefs": [
               [% IF ( opacuserlogin ) %]{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }[% END %]
             ],
+            "aaSorting": [ [2, "desc"], [0, "asc"] ],
             "aoColumns": [
                 { "sType": "anti-the" },
                 null,