X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fmacros;h=0aeea7623b8b9f16c60a1c9c1b691f6db241fda6;hb=0ac4811fdd89ce1736ddc797b13527f482298130;hp=7e3284c3861196d45be137e0e57b1765ef9a40a3;hpb=ca325e68ce3620b52a3c8c9ed437ed79c5d1a744;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index 7e3284c..0aeea76 100644 --- a/templates/factory/macros +++ b/templates/factory/macros @@ -31,9 +31,10 @@ command for that object. Otherwise, it just displays the data. #%] [% + MACRO maybe_link_view(object) BLOCK; - IF object.moniker; # It's an object, i.e. a has-a - link(object.moniker, "view", object.id, object); + IF object.table; # It's an object, i.e. a has-a + link(object.table, "view", object.id, object); ELSE; object; END; @@ -57,7 +58,7 @@ for some. ""; IF col == "url"; " "; item.url; ""; - ELSIF col == "name"; + ELSIF col == item.stringify_column; maybe_link_view(item); ELSE; maybe_link_view(item.$col); @@ -78,7 +79,7 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] -
+