X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=9f7fe0e03e418df5e531566b3f67e143439925a8;hb=094460849c1f2c4ec4ca0a153da2f5039eeedd40;hp=f1290efb1b9dd57607cf07f085984b28252dc114;hpb=7232f39368bec26e484089f9f81ab6b6dc94e9eb;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index f1290ef..9f7fe0e 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 %] @@ -42,3 +40,4 @@ END %] [% INCLUDE pager; %] [% INCLUDE addnew; %] +[% INCLUDE footer %]