X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fmacros;h=4a90e1771f4f1ae9e2c60cb20a2ee009dfaca165;hb=ce6a9545f5fd2fde3490b7172193d31a8ceece2f;hp=357c32981ec708da0829db2b4de4e3c58d134d9e;hpb=5d49648fd96492e31cf7c6df507ae42e9cd1e42d;p=maypole.git diff --git a/templates/factory/macros b/templates/factory/macros index 357c329..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,7 +81,7 @@ This is a generic button, which performs an action on an object. #%] [% MACRO button(obj, action) BLOCK; %] -
+
[% END %] [%#