X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fview;h=29b817e4378d4eba48313173ae8615d8ade874e7;hb=1970b15356f27bd73d99f6d8160088c616cea5cb;hp=0ea412e2291831ecef58891ce43c3f22bd8ac0c2;hpb=afc350467fbb2ecbb88d824f4b36d6440552a0c0;p=maypole.git diff --git a/templates/factory/view b/templates/factory/view index 0ea412e..29b817e 100644 --- a/templates/factory/view +++ b/templates/factory/view @@ -7,20 +7,21 @@ C and displays the object's properties in a table. =cut -%#] +#%] [% PROCESS macros %] [% INCLUDE header %] [% FOR item = objects %] -

[% item.name %]

+[% SET string = item.stringify_column %] +

[% item.$string %]

[% INCLUDE navbar %] - + [% FOR col = classmetadata.columns.list; - NEXT IF col == "id" OR col == "name"; + NEXT IF col == "id" OR col == string; NEXT UNLESS item.$col; %] @@ -31,7 +32,7 @@ C and displays the object's properties in a table. It gets the displayable form of a column's name from the hash returned from the C method: -%#] +#%] @@ -48,7 +49,7 @@ from the C method: #One interesting macro used in this template is C: maybe_link_view(item.$col); -%] +%] [%#
Name [% item.name %]
[% classmetadata.colnames.$string %] [% item.$string %]
[% classmetadata.colnames.$col; %]