]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/view
Zero search fix and sweet new templates, wheee...
[maypole.git] / templates / factory / view
index 6736da61c4f9fc825bcda2f9feeb6740a7171a46..19117b5e060836a5884b4e2977af5d4f72cdf653 100644 (file)
@@ -12,7 +12,7 @@ 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">
         <tr>
@@ -34,8 +34,8 @@ from the C<column_names> method:
             <tr>
                 <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 %]