]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/list
fixed titles
[maypole.git] / templates / factory / list
index 843f9a4d50b603bfced8da3c999ab0cc763eb22b..b8f4fb8774925bfd5f24268a81ff4bf3a24bb1f2 100644 (file)
@@ -1,16 +1,16 @@
 [% PROCESS macros %]
 [% INCLUDE header %]
+[% INCLUDE title %]
 [% IF search %]
-    <h2>Search results</h2>
+    <div id="title">Search results</div>
 [% ELSE %]
-    <h2>Listing of all [% classmetadata.plural %]</h2>
+    <div id="title">Listing of all [% classmetadata.plural %]</div>
 [% END %]
 [% INCLUDE navbar %]
-[% INCLUDE search_form %]
 <div class="list">
     <table id="matrix" width="100%" >
         <tr>
-            [% FOR col = classmetadata.columns.list;
+            [% FOR col = classmetadata.list_columns.list;
                 NEXT IF col == "id";
                 "<th>"; 
                 SET additional = "?order=" _ col;
                 IF col == request.query.order and request.query.o2 != "desc";
                 link(classmetadata.table, "list", additional,
                     classmetadata.colnames.$col);
+                IF col == request.query.order;
+                    IF request.query.o2 != "desc";
+                        "&darr;";
+                    ELSE;
+                        "&uarr;";
+                    END;
+                END;
                 "</th>";
             END %]
-           <th>Actions</th>
+           <th id="actionth">Actions</th>
         </tr>
         [%  SET count = 0;
         FOR item = objects;
@@ -34,7 +41,9 @@
             "</tr>";
         END %]
     </table>
+
 [% INCLUDE pager %]
 [% INCLUDE addnew %]
+[% INCLUDE search_form %]
 </div>
 [% INCLUDE footer %]