#%]
<h3>Add a new [%classmetadata.moniker%]</h3>
-<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/do_edit/">
+<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.table%]/do_edit/">
<INPUT TYPE="hidden" NAME="action" VALUE="create">
- <INPUT TYPE="hidden" NAME="class" VALUE="[%classmetadata.name%]">
<TABLE class="view">
[% FOR col = classmetadata.columns;
NEXT IF col == "id";
[% FOR item = objects; %]
<h2> Edit [% item.name %]</h2>
-<FORM ACTION="[% base %]/[% classmetadata.moniker %]/do_edit/[% item.id %]" METHOD="post">
+<FORM ACTION="[% base %]/[% item.table %]/do_edit/[% item.id %]" METHOD="post">
[%
FOR col = classmetadata.columns;
NEXT IF col == "id";
[% FOR col = classmetadata.columns.list;
NEXT IF col == "id";
"<TH>";
- '<A HREF="'; base; classmetadata.moniker; "/list/?";
- "page=" _ pager.current_page _ "&" IF pager;
- "order="; col;
- "&o2=desc" IF col == request.query.order and request.query.o2 != "desc";
- '">';
- classmetadata.colnames.$col;
- '</A>';
+ 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);
"</TH>";
END %]
</TR>
<ul id="navlist">
[%
FOR table = config.display_tables;
- '<LI '; 'id="active"' IF table == classmetadata.moniker; '>';
+ '<LI '; 'id="active"' IF table == classmetadata.table; '>';
# Hack
- SET active = '" id="current' IF table == classmetadata.moniker;
+ SET active = '" id="current' IF table == classmetadata.table;
link(table, "list", active, table);
SET active = "";