X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist;h=9f7fe0e03e418df5e531566b3f67e143439925a8;hb=1970b15356f27bd73d99f6d8160088c616cea5cb;hp=5bd6a10f628edb0d2a39d57a7ebf28829f1786ff;hpb=36b7502bb586953f62f56a2c6edd3b22c184702d;p=maypole.git diff --git a/templates/factory/list b/templates/factory/list index 5bd6a10..9f7fe0e 100644 --- a/templates/factory/list +++ b/templates/factory/list @@ -2,15 +2,27 @@ [% INCLUDE header %] +[% IF search %] +

Search results

+[% ELSE %]

Listing of all [% classmetadata.plural %]

+[% END %] [% INCLUDE navbar %] + +
[% FOR col = classmetadata.columns.list; NEXT IF col == "id"; - ""; + ""; END %] @@ -25,5 +37,7 @@ FOR item = objects; END %]
"; 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); + "
- +[% INCLUDE pager; %] [% INCLUDE addnew; %] +
+[% INCLUDE footer %]