X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fmacros;h=06f57735b99709da092c3d9a411c4185574b6393;hb=0831c7ff6a8e9d3fa97ec20fb5602ade9fd1ca09;hp=2442dd5d32b11bfb8b3273a3189f049127e4b9e3;hpb=77fb5cc34c9a87077dc65548f0d890b366e78c61;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index 2442dd5..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,11 +79,8 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] - -
- -
- + + [% action %] [% END %] [%#