Jacinta Richardson wrote:
> I've gone back in time and grabbed the templates from Maypole 2.10. These
> seem
> to work, although I've spotted at least one bug.
Here's another, this time in the display_line macro:
classmetadata.list_columns should be classmetadata.columns.list
and
ELSE;
accessor = item.accessor_name(col);
maybe_link_view(item.$accessor);
END;
should be instead:
ELSE;
maybe_link_view(item.$col);
END;
yielding:
[% MACRO display_line(item) BLOCK;
FOR col = classmetadata.columns.list;
NEXT IF col == "id";
"<td>";
IF col == "url" AND item.url;
'<a href="'; item.url; '"> '; item.url; '</a>';
ELSIF col == classmetadata.stringify_column;
maybe_link_view(item);
ELSE;
maybe_link_view(item.$col);
END;
"</td>";
END;
'<td class="actions">';
button(item, "edit");
button(item, "delete");
"</td>";
END %]
Without these changes, when listing items (beers, breweries etc) the non primary
key display fields are left empty.
I've given up on getting beers to work with hand-pumps. There seems to be
something missing that links beers to pubs and it's not relevant to my current
challenge.
J
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | [EMAIL PROTECTED] |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users