X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=a8fd016b95d9fadb7be113804b21a24a83b52d25;hb=e202b2580cf05e71059efb3c70893585d82f5857;hp=120abbbfee125c473832b66de1d444e8407ba10d;hpb=d77cc42a2fd0ae059128043822ef127199e55ed2;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index 120abbb..a8fd016 100644 --- a/templates/factory/list +++ b/templates/factory/list @@ -6,22 +6,30 @@

Listing of all [% classmetadata.plural %]

[% END %] [% INCLUDE navbar %] - +[% INCLUDE search_form %]
- +
[% FOR col = classmetadata.columns.list; NEXT IF col == "id"; ""; END %] + [% SET count = 0; FOR item = objects;
"; SET additional = "?order=" _ col; - SET additional = additional _ "&page=" _ pager.current_page + SET additional = additional _ "&page=" _ pager.current_page IF pager; - SET additional = additional _ "&o2=desc" + SET additional = additional _ "&o2=desc" IF col == request.query.order and request.query.o2 != "desc"; link(classmetadata.table, "list", additional, classmetadata.colnames.$col); + IF col == request.query.order; + IF request.query.o2 != "desc"; + "↓"; + ELSE; + "↑"; + END; + END; "Actions