]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/templates/factory/macros
teejay's template updates
[maypole.git] / lib / Maypole / templates / factory / macros
index 59d6c925358a9cfa57a27f981a21ed927ab4f339..a102c736a523dd78677661140fec7d0400892ca3 100644 (file)
@@ -55,7 +55,7 @@ for some.
 #%]
 [% MACRO display_line(item) BLOCK;
     FOR col = classmetadata.list_columns;
-        NEXT IF col == "id";
+       NEXT IF col == "id" OR col == classmetadata.table _ "_id";
         "<td>";
         IF col == "url" AND item.url;
             '<a href="'; item.url; '"> '; item.url; '</a>';
@@ -128,7 +128,7 @@ This takes an object and and displays its properties in a table.
 
 #%]
 [% MACRO view_item(item) BLOCK; %]
-    [% SET string = classmetadata.stringifycolumn %]
+    [% SET string = classmetadata.stringify_column %]
     <div id="title"> [% item.$string %]</div>
     [% INCLUDE navbar %]
     <table class="view">
@@ -137,7 +137,7 @@ This takes an object and and displays its properties in a table.
             <td>[% item.$string %]</td>
         </tr>
         [% FOR col = classmetadata.columns.list;
-            NEXT IF col == "id" OR col == string;
+            NEXT IF col == "id" OR col == string OR col == classmetadata.table _ "_id";;
             NEXT UNLESS item.$col;
         %]
 [%#