X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fmacros;h=4a90e1771f4f1ae9e2c60cb20a2ee009dfaca165;hb=ce6a9545f5fd2fde3490b7172193d31a8ceece2f;hp=ddd9ffbb10f47cfdb1dd945f9c62dc5f8c843c03;hpb=0dad0b61598776d7eab84a8c9f25bd3d85bc1198;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index ddd9ffb..4a90e17 100644 --- a/templates/factory/macros +++ b/templates/factory/macros @@ -34,8 +34,8 @@ 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); + IF object.isa('Maypole::Model::Base'); + link(object.table, "view", object.id.join('/'), object); ELSE; object; END; @@ -81,8 +81,8 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] -
-
+
+
[% END %] [%#