Subject: | PATCH: document how to specify a default descending sort |
The attached patch documents how to specify a descending sort by default.
Mark
Subject: | default_sort.patch |
Thu Jun 8 14:10:07 EDT 2006 mark@summersault.com
* document how to specify a descending default sort.
diff -rN -u old-miami/perllib/HTML/ReportWriter/PagingAndSorting.pm new-miami/perllib/HTML/ReportWriter/PagingAndSorting.pm
--- old-miami/perllib/HTML/ReportWriter/PagingAndSorting.pm 2006-06-08 14:10:32.000000000 -0400
+++ new-miami/perllib/HTML/ReportWriter/PagingAndSorting.pm 2006-06-08 14:10:32.000000000 -0400
@@ -155,8 +155,13 @@
=item DEFAULT_SORT:
-Which column should be sorted by when the page is drawn for the first time. default: blank
-Note: If you specify a default column but no default direction, the sort defaults to ascending.
+Which column should be sorted by when the page is drawn for the first time. Use the version
+of the name provided as the C<get> param in the C<SORTABLE_COLUMNS> definition. Sorting is
+ascending by default. To specify a descending sort, use a syntax like this:
+
+ DEFAULT_SORT => 'date,DESC',
+
+No column is sorted on default.
=item CURRENT_PAGE: