From: Simon Cozens Date: Fri, 2 Apr 2004 11:53:41 +0000 (+0000) Subject: Use table instead of moniker. X-Git-Tag: 2.10~255 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=722950186d52d36e3a4e4df93f026183c7b5a602;p=maypole.git Use table instead of moniker. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@107 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/templates/factory/addnew b/templates/factory/addnew index 56e794b..cdf21a6 100644 --- a/templates/factory/addnew +++ b/templates/factory/addnew @@ -11,9 +11,8 @@ table. #%]

Add a new [%classmetadata.moniker%]

-
+ - [% FOR col = classmetadata.columns; NEXT IF col == "id"; diff --git a/templates/factory/edit b/templates/factory/edit index 0de9f79..90e8760 100644 --- a/templates/factory/edit +++ b/templates/factory/edit @@ -13,7 +13,7 @@ form similar to L but with the current values filled in. [% FOR item = objects; %]

Edit [% item.name %]

- + [% FOR col = classmetadata.columns; NEXT IF col == "id"; diff --git a/templates/factory/list b/templates/factory/list index f1290ef..9971028 100644 --- a/templates/factory/list +++ b/templates/factory/list @@ -17,13 +17,11 @@ [% FOR col = classmetadata.columns.list; NEXT IF col == "id"; "
"; END %] diff --git a/templates/factory/navbar b/templates/factory/navbar index b2dac72..40050d3 100644 --- a/templates/factory/navbar +++ b/templates/factory/navbar @@ -12,10 +12,10 @@ accessible, with a link to the list page for each one.
"; - ''; - 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); "