5 <div id="title">Search results</div>
7 <div id="title">Listing of all [% classmetadata.plural %]</div>
13 [% FOR col = classmetadata.list_columns.list;
14 NEXT IF col == "id" OR col == classmetadata.table _ "_id";
16 SET additional = "?order=" _ col;
17 SET additional = additional _ "&page=" _ pager.current_page
19 SET additional = additional _ "&o2=desc"
20 IF col == request.params.order and request.params.o2 != "desc";
22 FOR name = classmetadata.columns.list;
23 IF request.query.$name;
25 additional _ "&" _ name _ "=" _
27 SET action = "search";
30 USE model_obj = Class request.model_class;
31 IF model_obj.find_column(col);
32 link(classmetadata.table, action, additional,
33 classmetadata.colnames.$col);
34 IF col == request.params.order;
35 IF request.params.o2 != "desc";
42 classmetadata.colnames.$col || col FILTER ucfirst;
46 <th id="actionth">Actions</th>
50 SET count = count + 1;
52 ' class="alternate"' IF count % 2;
61 [% INCLUDE search_form %]