diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 11:30:56 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 11:31:01 +0200 |
commit | 900ece18e787b294aa1c424af543ec14817b2302 (patch) | |
tree | d492a342a7bc9c545f70ab7e5a1da4597f98c9f9 /templates | |
parent | 5249f09f70c670dcd7d34cac5c5c2ae617ae739b (diff) | |
download | nextcloud-server-900ece18e787b294aa1c424af543ec14817b2302.tar.gz nextcloud-server-900ece18e787b294aa1c424af543ec14817b2302.zip |
seperate view and logic for pagenavi
Diffstat (limited to 'templates')
-rw-r--r-- | templates/part.pagenavi.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/templates/part.pagenavi.php b/templates/part.pagenavi.php new file mode 100644 index 00000000000..1bb99b6173b --- /dev/null +++ b/templates/part.pagenavi.php @@ -0,0 +1,31 @@ +<center> + <table class="pager" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td width="1"> + <?php if($_['page']>0):?> + <span class="pagerbutton1"><a href="<?php echo $_['page']-1;?>">prev</a> </span> + <?php endif; ?> + </td> + <td> + <?php if ($_['pagestart']>0):?> + ... + <?php endif;?> + <?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?> + <?php if ($_['page']!=$i):?> + <a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?> </a> + <?php else:?> + <?php echo $i+1;?> + <?php endif?> + <?php endfor;?> + <?php if ($_['pagestop']<$_['pagecount']):?> + ... + <?php endif;?> + </td> + <td width="1"> + <?php if(($_['page']+1)<$_['pagecount']):?> + <span class="pagerbutton2"><a href="<?php echo $_['page']+1;?>">next</a></span> + <?php endif; ?> + </td> + </tr> + </table> +</center>
\ No newline at end of file |