X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=206066f3eb533ef081f814be066cc9459fc69504;hb=b717b7341c854837780913339fb625cbe19b5d67;hp=2a159648187e4d099715f8a39a57855febfd3e9a;hpb=5cccc5a89004f9c514e9d611b5e2a02e9aa28ece;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index 2a15964..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 %]