]> git.decadent.org.uk Git - maypole.git/blob - templates/factory/list_macros
0a889965d31a7b7d84b88f02793a7d4919541a81
[maypole.git] / templates / factory / list_macros
1 [% MACRO display_line(item) BLOCK;
2      FOR col = classmetadata.columns;
3         NEXT IF col == "id";
4         "<td>";
5         "<A HREF='" _ base _ item.$col.moniker _ "/view/" _ 
6             item.$col.id _"'>" IF item.$col.moniker; # it's an object
7         item.$col;
8         "</A>" IF item.$col.moniker; 
9         "</td>";
10      END;
11     button(item, "edit");
12     button(item, "delete");
13 END %]
14 [% MACRO button(obj, action) BLOCK; %]
15
16 <TD>
17 <FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/[%action%]/[%obj.id%]">
18     <INPUT TYPE="submit" NAME="[%action%]" VALUE="[%action%]">
19 </FORM>
20 </TD>
21 [% END %]
22