def pager(self): """ Generate and return a string consisting of just a simple pager: next and previous buttons. """ tmpl = PartialTemplate("partials/pager", self._request) tmpl.data.update(self._page_dict) tmpl.data.update(self._data) tmpl.data.update({"query": self._query_string}) return tmpl.render()
def paginate(self): """ Generate and return a string consisting of a full pagination module. Next, previous, first, last and page numbers. """ tmpl = PartialTemplate("partials/paginate", self._request) tmpl.data.update(self._page_dict) tmpl.data.update(self._data) tmpl.data.update({"query": self._query_string}) return tmpl.render()
def options(self): """ Generate and return a string consisting of two selects and an update/submit button to be used for the pagination options form. """ tmpl = PartialTemplate("partials/options", self._request) tmpl.data.update(self._page_dict) tmpl.data.update(self._data) tmpl.data.update({"query": self._query_string}) return tmpl.render()