]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/view
Here are the templates!
[maypole.git] / templates / factory / view
diff --git a/templates/factory/view b/templates/factory/view
new file mode 100644 (file)
index 0000000..48dec99
--- /dev/null
@@ -0,0 +1,26 @@
+[% MACRO button(obj, action) BLOCK; %]
+
+<TD>
+<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/[%action%]/[%obj.id%]">
+    <INPUT TYPE="submit" NAME="[%action%]" VALUE="[%action%]">
+</FORM>
+</TD>
+[% END %]
+
+[% INCLUDE header %]
+
+[% FOR item = objects %]
+<h2> [% item.name %]</h2>
+
+[% FOR col = classmetadata.columns.list;
+    NEXT IF col == "id";
+    "<P>";
+    classmetadata.colnames.$col; ":";
+    " "; item.$col;"</p>";
+     END;
+    button(item, "edit");
+    button(item, "delete");
+    "</tr>";
+END;
+%]
+