X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=templates%2Ffactory%2Fmacros;h=06f57735b99709da092c3d9a411c4185574b6393;hb=4c0d8f0266ab4acd371955c3bf3cdc9c080ea1c9;hp=3d45a6fa65c36bae4d5a48db84e17722b41b38d2;hpb=4ab33d12a514e0531e16f3d2812b15258de258c5;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index 3d45a6f..06f5773 100644 --- a/templates/factory/macros +++ b/templates/factory/macros @@ -55,8 +55,8 @@ for some. FOR col = classmetadata.columns; NEXT IF col == "id"; ""; - IF col == "url"; - " "; item.url; ""; + IF col == "url" AND item.url; + ' '; item.url; ''; ELSIF col == item.stringify_column; maybe_link_view(item); ELSE; @@ -64,8 +64,10 @@ for some. END; ""; END; + ""; button(item, "edit"); button(item, "delete"); + ""; END %] [%# @@ -77,12 +79,8 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] - -
- -
- + + [% action %] [% END %] [%#