X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2Ftemplates%2Ffactory%2Fmacros;h=c96cb17db8d7818e23b0a04efbbf5273083bd8ce;hp=53f6952dcc82809f33fedab92425d7cfd319e5b7;hb=c3973978e1373a262d13da63c9e9ecfde4b72cc7;hpb=2a0564f48a17a688c114fac6384bb2a4dd34865b diff --git a/lib/Maypole/templates/factory/macros b/lib/Maypole/templates/factory/macros index 53f6952..c96cb17 100644 --- a/lib/Maypole/templates/factory/macros +++ b/lib/Maypole/templates/factory/macros @@ -138,7 +138,7 @@ This takes an object and and displays its properties in a table. [% INCLUDE navbar %] - + [% FOR col = classmetadata.columns.list; @@ -154,11 +154,18 @@ from the C method: #%] - +
[% classmetadata.colnames.$string %][% classmetadata.colnames.$string %] [% item.$string | html %]
[% classmetadata.colnames.$col; %][% classmetadata.colnames.$col || + col | ucfirst | replace('_',' '); %] [% IF col == "url" && item.url; # Possibly too much magic. ' '; item.url; ''; + ELSIF item.$col.size > 1; # has_many column + FOR thing IN item.$col; + maybe_link_view(thing);", "; + END; + ELSE; + maybe_link_view(item.$col); END; %] [%#