X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fview;h=cf7822e5498298cdb27516bb58b57218340331b7;hb=4b6fca4879b54b12587eca6d76d865817fe5e34d;hp=c00046c7606416d57fc1255e2da186b3d50b583e;hpb=77fb5cc34c9a87077dc65548f0d890b366e78c61;p=maypole.git diff --git a/templates/factory/view b/templates/factory/view index c00046c..cf7822e 100644 --- a/templates/factory/view +++ b/templates/factory/view @@ -14,7 +14,7 @@ C and displays the object's properties in a table. [% SET string = item.stringify_column %]

[% item.$string %]

[% INCLUDE navbar %] - +
@@ -32,10 +32,10 @@ from the C method: #%] - +
[% classmetadata.colnames.$string %] [% item.$string %]
[% classmetadata.colnames.$col; %][% classmetadata.colnames.$col; %] - [% IF col == "url"; # Possibly too much magic. - " "; item.url; ""; + [% IF col == "url" && item.url; # Possibly too much magic. + ' '; item.url; ''; ELSE; maybe_link_view(item.$col); END; %] @@ -65,9 +65,11 @@ a list of has-many accessors. Next it calls each of those accessors, and displays the results in a table. #%] +[% view_related(item); %] + [% - view_related(item); button(item, "edit"); button(item, "delete"); %] [% END; %] +[% INCLUDE footer %]