]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/macros
oops stray <p>
[maypole.git] / templates / factory / macros
index 2442dd5d32b11bfb8b3273a3189f049127e4b9e3..06f57735b99709da092c3d9a411c4185574b6393 100644 (file)
@@ -55,8 +55,8 @@ for some.
     FOR col = classmetadata.columns;
         NEXT IF col == "id";
         "<td>";
-        IF col == "url";
-            "<A HREF="; item.url; "> "; item.url; "</A>";
+        IF col == "url" AND item.url;
+            '<a href="'; item.url; '"> '; item.url; '</a>';
         ELSIF col == item.stringify_column;
             maybe_link_view(item);
         ELSE;
@@ -64,8 +64,10 @@ for some.
         END;
         "</td>";
     END;
+    "<td>";
     button(item, "edit");
     button(item, "delete");
+    "</td>";
 END %]
 [%#
 
@@ -77,11 +79,8 @@ This is a generic button, which performs an action on an object.
 
 #%]
 [% MACRO button(obj, action) BLOCK; %]
-<td>
-<form method=post action="[% base %]/[% obj.table %]/[% action %]/[% obj.id %]">
-    <input type=submit name=[% action %] value=[% action %] />
-</form>
-</td>
+<a class="action" href="[% base %]/[% obj.table %]/[% action %]/[% obj.id %]">
+    [% action %]</a>
 [% END %]
 [%#