X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2FMaypole%2Ftemplates%2Ffactory%2Fmacros;h=53f6952dcc82809f33fedab92425d7cfd319e5b7;hb=f94c2679992bf0db0b360a0a475b3e646466aee0;hp=59d6c925358a9cfa57a27f981a21ed927ab4f339;hpb=48c86c6ba8c5db11ea6906e3237db1322f8dc5e0;p=maypole.git diff --git a/lib/Maypole/templates/factory/macros b/lib/Maypole/templates/factory/macros index 59d6c92..53f6952 100644 --- a/lib/Maypole/templates/factory/macros +++ b/lib/Maypole/templates/factory/macros @@ -16,7 +16,7 @@ MACRO link(table, command, additional, label) BLOCK; SET lnk = base _ "/" _ table _ "/" _ command _ "/" _ additional; lnk = lnk | uri | html; ''; - label; + label | html; ""; END; %] @@ -37,7 +37,7 @@ MACRO maybe_link_view(object) BLOCK; IF object.isa('Maypole::Model::Base'); link(object.table, "view", object.id.join('/'), object); ELSE; - object; + object | html ; END; END; %] @@ -55,16 +55,21 @@ 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"; + col_obj = item.find_column(col); "
[% classmetadata.colnames.$string %] | -[% item.$string %] | +[% item.$string | html %] | [% classmetadata.colnames.$col; %] | [% IF col == "url" && item.url; # Possibly too much magic. - ' '; item.url; ''; + ' '; item.url; ''; ELSE; maybe_link_view(item.$col); END; %] |