summaryrefslogtreecommitdiffstats
path: root/webui_templates/paginate.tmpl
diff options
context:
space:
mode:
authorroot <root@mdehaan.rdu.redhat.com>2007-11-01 12:46:25 -0400
committerroot <root@mdehaan.rdu.redhat.com>2007-11-01 12:46:25 -0400
commit6630f94eb1c6122f761a87b0fcd879423cf3e624 (patch)
tree6ac5a4eb35513d405f60d5681cfa0cd41f83700b /webui_templates/paginate.tmpl
parent54f27bb821a39868a7dd79acbf22bb0c05bfb9bd (diff)
downloadthird_party-cobbler-6630f94eb1c6122f761a87b0fcd879423cf3e624.tar.gz
third_party-cobbler-6630f94eb1c6122f761a87b0fcd879423cf3e624.tar.xz
third_party-cobbler-6630f94eb1c6122f761a87b0fcd879423cf3e624.zip
Make pagination uses a shiny select box versus an ugly list of pages. TODO: show the start
and end object in the menus for easier navigation.
Diffstat (limited to 'webui_templates/paginate.tmpl')
-rw-r--r--webui_templates/paginate.tmpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/webui_templates/paginate.tmpl b/webui_templates/paginate.tmpl
index 497e06d..9d986f3 100644
--- a/webui_templates/paginate.tmpl
+++ b/webui_templates/paginate.tmpl
@@ -1,27 +1,29 @@
## USAGE: # set global what="system"
## # include "/path/to/this/file"
- Page:&nbsp;
#if $page != 0
#set $previous_page = $page - 1
<A HREF="${base_url}/${what}_list?page=${previous_page}&limit=${results_per_page}">&lt;</A>&nbsp;
#else
- [
+ &lt;
#end if
+ <select onchange="location = this.options[this.selectedIndex].value;">
#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>&nbsp;
+ #set doselect = " "
#else
- ${this_page}
+ #set doselect = " selected "
#end if
+ <option value="${base_url}/${what}_list?page=${this_page}&limit=${results_per_page}" ${doselect} >Page ${this_page}</option>
#end for
+ </select>
#if $page != $pages
#set $next_page = $page + 1
<A HREF="${base_url}/${what}_list?page=${next_page}&limit=${results_per_page}">&gt;</A>
#else
- ]
+ &gt;
#end if
<br/>