]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/templates/factory/macros
AsForm bug fixes -- to_cgi args, to_enum_select , search_inputs adds blank field...
[maypole.git] / lib / Maypole / templates / factory / macros
index cbf58bb21902fd0b1f80a907190363aa184ecf1b..53f6952dcc82809f33fedab92425d7cfd319e5b7 100644 (file)
@@ -56,15 +56,20 @@ for some.
 [% MACRO display_line(item) BLOCK;
     FOR col = classmetadata.list_columns;
        NEXT IF col == "id" OR col == classmetadata.table _ "_id";
+       col_obj = item.find_column(col);
         "<td>";
         IF col == "url" AND item.url;
             '<a href="'; item.url | html ; '"> '; item.url; '</a>';
         ELSIF col == classmetadata.stringify_column;
             maybe_link_view(item);
-        ELSE;
-            accessor = item.accessor_name(col);
+               ELSIF col_obj; # its a real column
+            accessor = item.accessor_name_for(col_obj) ||
+                                  item.accessor_name(col_obj); # deprecated in cdbi
             maybe_link_view(item.$accessor);
+        ELSE; 
+            item.$col;
         END;
+
         "</td>";
     END;
     '<td class="actions">';