=head2 link
-This creates an <A HREF="... to a command in the Apache::MVC system by
+This creates an <A HREF="..."> to a command in the Apache::MVC system by
catenating the base URL, table, command, and any arguments.
#%]
[%
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;
#%]
[% MACRO button(obj, action) BLOCK; %]
-<form class="actionform" action="[% base %]/[% obj.table %]/[% action %]/[% obj.id %]" method="post">
+[% IF obj.is_public(action) %]
+<form class="actionform" action="[% base %]/[% obj.table %]/[% action %]/[% obj.id.join('/') %]" method="post">
<div class="field"><input class="actionbutton" type="submit" value="[% action %]" /></div></form>
[% END %]
+[% END %]
[%#
=head2 view_related