X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=99710287b2f626b838dbcf0c7af41a6fed36f56b;hb=722950186d52d36e3a4e4df93f026183c7b5a602;hp=f1290efb1b9dd57607cf07f085984b28252dc114;hpb=22ed66cbefd7c1bae9c2710e88b080b811e98778;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index f1290ef..9971028 100644 --- a/templates/factory/list +++ b/templates/factory/list @@ -17,13 +17,11 @@ [% FOR col = classmetadata.columns.list; NEXT IF col == "id"; ""; - ''; - classmetadata.colnames.$col; - ''; + SET additional = "?order=" _ col; + SET additional = additional _ "page=" _ pager.current_page _ "&" IF pager; + SET additional = additional _ "&o2=desc" + IF col == request.query.order and request.query.o2 != "desc"; + link(classmetadata.table, "list", additional, classmetadata.colnames.$col); ""; END %]