[%
IF pager AND pager.first_page != pager.last_page;
%]
-<p align=center>Pages:
+<p class="pager">Pages:
[%
+ UNLESS pager_action;
+ SET pager_action = request.action;
+ END;
+
SET begin_page = pager.current_page - 10;
IF begin_page < 1;
SET begin_page = pager.first_page;
END;
FOREACH num = [begin_page .. end_page];
IF num == pager.current_page;
- "["; num; "] ";
+ "<span class='current-page'>"; num; "</span>";
ELSE;
- SET label = "[" _ num _ "]";
+ SET label = num;
SET args = "?page=" _ num;
- SET action = "list";
+ SET args = args _ "&order=" _ request.params.order
+ IF request.params.order;
+ SET args = args _ "&o2=desc"
+ IF request.params.o2 == "desc";
FOR col = classmetadata.columns.list;
- IF request.query.$col;
- SET args = args _ "&" _ col _ "=" _ request.query.$col;
+ IF request.params.$col;
+ SET args = args _ "&" _ col _ "=" _ request.params.$col;
SET action = "search";
END;
END;
- link(classmetadata.table, action, args, label);
+ link(classmetadata.table, pager_action, args, label);
END;
END;
%]