X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Flist_macros;fp=templates%2Ffactory%2Flist_macros;h=0a889965d31a7b7d84b88f02793a7d4919541a81;hb=0ad4ba7aa71b7dda17f0b07ccc9d8f0ad3424b82;hp=0000000000000000000000000000000000000000;hpb=21e0e0c44d23d0d1f0612e4d009c83d010bfb50c;p=maypole.git diff --git a/templates/factory/list_macros b/templates/factory/list_macros new file mode 100644 index 0000000..0a88996 --- /dev/null +++ b/templates/factory/list_macros @@ -0,0 +1,22 @@ +[% MACRO display_line(item) BLOCK; + FOR col = classmetadata.columns; + NEXT IF col == "id"; + ""; + "" IF item.$col.moniker; # it's an object + item.$col; + "" IF item.$col.moniker; + ""; + END; + button(item, "edit"); + button(item, "delete"); +END %] +[% MACRO button(obj, action) BLOCK; %] + + +
+ +
+ +[% END %] +