X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fmacros;h=2442dd5d32b11bfb8b3273a3189f049127e4b9e3;hb=77fb5cc34c9a87077dc65548f0d890b366e78c61;hp=edae5c1a61647b0c5dacd3a173823c3e783d5229;hpb=435d1e9d0c97ce1e6af8a5396c8e159cf0cf2e8b;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index edae5c1..2442dd5 100644 --- a/templates/factory/macros +++ b/templates/factory/macros @@ -13,9 +13,9 @@ catenating the base URL, table, command, and any arguments. #%] [% MACRO link(table, command, additional, label) BLOCK; - ''; + ''; label; - ""; + ""; END; %] @@ -31,7 +31,6 @@ command for that object. Otherwise, it just displays the data. #%] [% - MACRO maybe_link_view(object) BLOCK; IF object.table; # It's an object, i.e. a has-a link(object.table, "view", object.id, object); @@ -53,7 +52,7 @@ for some. #%] [% MACRO display_line(item) BLOCK; - FOR col = classmetadata.columns; + FOR col = classmetadata.columns; NEXT IF col == "id"; ""; IF col == "url"; @@ -64,7 +63,7 @@ for some. maybe_link_view(item.$col); END; ""; - END; + END; button(item, "edit"); button(item, "delete"); END %] @@ -78,11 +77,11 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] - -
- -
- + +
+ +
+ [% END %] [%# @@ -99,12 +98,12 @@ brewery) calls the accesor, and displays a list of the results. [% MACRO view_related(object) BLOCK; FOR accessor = classmetadata.related_accessors.list; - "

"; accessor | ucfirst; "

\n"; - ""; END; END;