]> git.decadent.org.uk Git - maypole.git/blobdiff - templates/factory/list
no more fun!!! :(
[maypole.git] / templates / factory / list
index 120abbbfee125c473832b66de1d444e8407ba10d..beade40e3a5184f998c71096b375d78ba537ab68 100644 (file)
@@ -1,27 +1,30 @@
 [% PROCESS macros %]
 [% INCLUDE header %]
-[% IF search %]
-    <h2>Search results</h2>
-[% ELSE %]
-    <h2>Listing of all [% classmetadata.plural %]</h2>
-[% END %]
+[% INCLUDE title %]
 [% INCLUDE navbar %]
-<div class="search">[% INCLUDE search_form %]</div>
 <div class="list">
-    <table id="matrix" width="100%">
+    <table id="matrix" width="100%" >
         <tr>
             [% FOR col = classmetadata.columns.list;
                 NEXT IF col == "id";
                 "<th>"; 
                 SET additional = "?order=" _ col;
-                SET additional = additional _ "&page=" _ pager.current_page
+                SET additional = additional _ "&amp;page=" _ pager.current_page
                     IF pager;
-                SET additional = additional _ "&o2=desc" 
+                SET additional = additional _ "&amp;o2=desc" 
                 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 id="actionth">Actions</th>
         </tr>
         [%  SET count = 0;
         FOR item = objects;
@@ -33,7 +36,9 @@
             "</tr>";
         END %]
     </table>
+
 [% INCLUDE pager %]
 [% INCLUDE addnew %]
+[% INCLUDE search_form %]
 </div>
 [% INCLUDE footer %]