X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=206066f3eb533ef081f814be066cc9459fc69504;hb=b90c6e146c423746001d304953b6b136acc666db;hp=d52d3e887075252ce886923e1de6cf05e47f15a3;hpb=7afc363f8b7cd7b710d4ee4199976165363bcfab;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index d52d3e8..206066f 100644 --- a/templates/factory/list +++ b/templates/factory/list @@ -16,7 +16,13 @@ [% 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 %] @@ -30,5 +36,7 @@ FOR item = objects; ""; END %] + +[% INCLUDE pager; %] [% INCLUDE addnew; %]