diff options
author | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-08-04 17:53:48 (GMT) |
---|---|---|
committer | James Boisture <jboisture@jboisture-laptop.(none)> | 2010-08-04 17:53:48 (GMT) |
commit | dec3486e0056c0d5201de7e8f71c05de19efb972 (patch) | |
tree | 9cb5494b1b1ff81a17f6507f65bdc0b8238d553c /views | |
parent | 05afcce6fa8aa0c9fa4972d7f14a38976a4d4434 (diff) |
added links to the first and the last pages when pages are listed on the admin, friends, and index pages. It also displays links to pages within 5 of the current pagesHEADmaster
Diffstat (limited to 'views')
-rw-r--r-- | views/default/admin.html | 20 | ||||
-rw-r--r-- | views/default/friends.html | 20 | ||||
-rw-r--r-- | views/default/index.html | 36 |
3 files changed, 58 insertions, 18 deletions
diff --git a/views/default/admin.html b/views/default/admin.html index feb1924..6598a46 100644 --- a/views/default/admin.html +++ b/views/default/admin.html @@ -21,13 +21,23 @@ {{pass}} </table> <ul id="navlist"> +{{if page != 1:}} + <li><a href = {{="admin.html?page="+str(0)}}> < </a></li> + {{pass}} +{{if page > 5:}}<li>...</li>{{pass}} {{for count in range(pages):}} - {{if count+1 == page:}} - <li>{{=str(page)}}</li> - {{pass}} - {{if count+1 != page:}} - <li><a href = {{="admin.html?page="+str(count+1)}}>{{ = str(count+1)}}</a></li> + {{if count+1 < page+5 and count+1 > page-5:}} + {{if count+1 == page:}} + <li>{{=str(page)}}</li> + {{pass}} + {{if count+1 != page:}} + <li><a href = {{="admin.html?page="+str(count+1)}}>{{ = str(count+1)}}</a></li> + {{pass}} {{pass}} {{pass}} +{{if page+5 < pages:}}<li>...</li>{{pass}} +{{if page != pages:}} + <li><a href = {{="admin.html?page="+str(pages)}}> > </a></li> + {{pass}} </ul> </center> diff --git a/views/default/friends.html b/views/default/friends.html index 4dacbaa..d7a6288 100644 --- a/views/default/friends.html +++ b/views/default/friends.html @@ -15,13 +15,23 @@ {{pass}} </table> <ul id="navlist"> +{{if page != 1:}} + <li><a href = {{="friends.html?page="+str(1)}}> < </a></li> + {{pass}} +{{if page > 5:}}<li>...</li>{{pass}} {{for count in range(pages):}} - {{if count+1 == page:}} - <li>{{=str(page)}}</li> - {{pass}} - {{if count+1 != page:}} - <li><a href = {{="admin.html?page="+str(count+1)}}>{{ = str(count+1)}}</a></li> + {{if count+1 < page+5 and count+1 > page-5:}} + {{if count+1 == page:}} + <li>{{=str(page)}}</li> + {{pass}} + {{if count+1 != page:}} + <li><a href = {{="friends.html?page="+str(count+1)}}>{{ = str(count+1)}}</a></li> + {{pass}} {{pass}} {{pass}} +{{if page+5 < pages:}}<li>...</li>{{pass}} +{{if page != pages:}} + <li><a href = {{="friends.html?page="+str(pages)}}> < </a></li> + {{pass}} </ul> </center> diff --git a/views/default/index.html b/views/default/index.html index 455f564..c2f692d 100644 --- a/views/default/index.html +++ b/views/default/index.html @@ -48,18 +48,38 @@ {{pass}} <center> <ul id="navlist"> -{{for count in range(pages):}} - {{if count+1 == page:}} - <li>{{=str(page)}}</li> +{{if page != 1:}} + {{if profile == None:}} + <li><a href = {{="index.html?page="+str(1)+";sort="+sort+";favorites"+str(show_favorites)}}> < </a></li> + {{pass}} + {{if profile != None:}} + <li><a href = {{="index.html?page="+str(1)+";sort="+sort+";profile="+profile.username+";favorites"+str(show_favorites)}}> < </a></li> {{pass}} - {{if count+1 != page:}} - {{if profile == None:}} - <li><a href = {{="index.html?page="+str(count+1)+";sort="+sort+";favorites"+str(show_favorites)}}>{{ = str(count+1)}}</a></li> + {{pass}} +{{if page > 5:}}<li>...</li>{{pass}} +{{for count in range(pages):}} + {{if count+1 < page+5 and count+1 > page-5:}} + {{if count+1 == page:}} + <li>{{=str(page)}}</li> {{pass}} - {{if profile != None:}} - <li><a href = {{="index.html?page="+str(count+1)+";sort="+sort+";profile="+profile.username+";favorites"+str(show_favorites)}}>{{ = str(count+1)}}</a></li> + {{if count+1 != page:}} + {{if profile == None:}} + <li><a href = {{="index.html?page="+str(count+1)+";sort="+sort+";favorites"+str(show_favorites)}}>{{ = str(count+1)}}</a></li> + {{pass}} + {{if profile != None:}} + <li><a href = {{="index.html?page="+str(count+1)+";sort="+sort+";profile="+profile.username+";favorites"+str(show_favorites)}}>{{ = str(count+1)}}</a></li> + {{pass}} {{pass}} {{pass}} {{pass}} +{{if page+5 < pages:}}<li>...</li>{{pass}} +{{if page != pages:}} + {{if profile == None:}} + <li><a href = {{="index.html?page="+str(pages)+";sort="+sort+";favorites"+str(show_favorites)}}> > </a></li> + {{pass}} + {{if profile != None:}} + <li><a href = {{="index.html?page="+str(pages)+";sort="+sort+";profile="+profile.username+";favorites"+str(show_favorites)}}> > </a></li> + {{pass}} + {{pass}} </ul> </center> |