Subject: | Macro errors in templates |
In the templates/factory/macros file there are two bugs. For the first,
all urls appear to be escaped for uri characters, and the second stops
non-primary key column data from showing in the listing. Patch below:
--- /tmp/Maypole-2.10/templates/factory/macros 2005-07-18
19:43:26.000000000 +1000
+++ macros 2008-11-25 20:25:34.000000000 +1100
@@ -14,7 +14,7 @@
[%
MACRO link(table, command, additional, label) BLOCK;
SET lnk = base _ "/" _ table _ "/" _ command _ "/" _ additional;
- lnk = lnk | uri | html;
+ lnk = lnk | html;
'<a href="' _ lnk _ '">';
label;
"</a>";
@@ -54,7 +54,7 @@
#%]
[% MACRO display_line(item) BLOCK;
- FOR col = classmetadata.list_columns;
+ FOR col = classmetadata.columns.list;
NEXT IF col == "id";
"<td>";
IF col == "url" AND item.url;
@@ -62,8 +62,7 @@
ELSIF col == classmetadata.stringify_column;
maybe_link_view(item);
ELSE;
- accessor = item.accessor_name(col);
- maybe_link_view(item.$accessor);
+ maybe_link_view(item.$col);
END;
"</td>";
END;