]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/view
minor fix to CSS
[maypole.git] / templates / factory / view
index c00046c7606416d57fc1255e2da186b3d50b583e..19117b5e060836a5884b4e2977af5d4f72cdf653 100644 (file)
@@ -12,9 +12,9 @@ C<objects> and displays the object's properties in a table.
 [% INCLUDE header %]
 [% FOR item = objects %]
     [% SET string = item.stringify_column %]
-    <h2> [% item.$string %]</h2>
+    <div id="title"> [% item.$string %]</div>
     [% INCLUDE navbar %]
-    <table class=view>
+    <table class="view">
         <tr>
             <td class="field">[% classmetadata.colnames.$string %]</td>
             <td>[% item.$string %]</td>
@@ -32,10 +32,10 @@ from the C<column_names> method:
 
 #%]
             <tr>
-                <td class=field>[% classmetadata.colnames.$col; %]</td>
+                <td class="field">[% classmetadata.colnames.$col; %]</td>
                 <td>
-                    [% IF col == "url";  # Possibly too much magic.
-                        "<A HREF="; item.url; "> "; item.url; "</A>";
+                    [% IF col == "url" && item.url;  # Possibly too much magic.
+                        '<a href="'; item.url; '"> '; item.url; '</a>';
                     ELSE;
                         maybe_link_view(item.$col); 
                     END; %]
@@ -65,9 +65,12 @@ a list of has-many accessors. Next it calls each of those accessors, and
 displays the results in a table.
 
 #%]
+    <br /><a href="[%base%]/[%item.table%]/list">Back to listing</a>
+[% view_related(item); %]
+    
 [%
-    view_related(item);
     button(item, "edit");
     button(item, "delete");
 %]
 [% END; %]
+[% INCLUDE footer %]