diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-10-31 16:20:39 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-10-31 16:20:39 -0400 |
commit | 54f27bb821a39868a7dd79acbf22bb0c05bfb9bd (patch) | |
tree | 32ac69f3801e51a01b15876fd02a12de138e2113 /webui_templates/paginate.tmpl | |
parent | f187e7b9532ff6ad17091800161b19799f53f9cd (diff) | |
download | third_party-cobbler-54f27bb821a39868a7dd79acbf22bb0c05bfb9bd.tar.gz third_party-cobbler-54f27bb821a39868a7dd79acbf22bb0c05bfb9bd.tar.xz third_party-cobbler-54f27bb821a39868a7dd79acbf22bb0c05bfb9bd.zip |
Pagination WUI code is now shared between the templates.
Diffstat (limited to 'webui_templates/paginate.tmpl')
-rw-r--r-- | webui_templates/paginate.tmpl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/webui_templates/paginate.tmpl b/webui_templates/paginate.tmpl new file mode 100644 index 0000000..497e06d --- /dev/null +++ b/webui_templates/paginate.tmpl @@ -0,0 +1,29 @@ + ## USAGE: # set global what="system" + ## # include "/path/to/this/file" + + Page: + #if $page != 0 + #set $previous_page = $page - 1 + <A HREF="${base_url}/${what}_list?page=${previous_page}&limit=${results_per_page}"><</A> + #else + [ + #end if + + #for $this_page in range(0,$pages+1) + #if $this_page != $page + <A HREF="${base_url}/${what}_list?page=${this_page}&limit=${results_per_page}">${this_page}</A> + #else + ${this_page} + #end if + #end for + + #if $page != $pages + #set $next_page = $page + 1 + <A HREF="${base_url}/${what}_list?page=${next_page}&limit=${results_per_page}">></A> + #else + ] + #end if + + <br/> + <br/> + |