summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-04-18 11:30:56 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-04-18 11:31:01 +0200
commit900ece18e787b294aa1c424af543ec14817b2302 (patch)
treed492a342a7bc9c545f70ab7e5a1da4597f98c9f9 /templates
parent5249f09f70c670dcd7d34cac5c5c2ae617ae739b (diff)
downloadnextcloud-server-900ece18e787b294aa1c424af543ec14817b2302.tar.gz
nextcloud-server-900ece18e787b294aa1c424af543ec14817b2302.zip
seperate view and logic for pagenavi
Diffstat (limited to 'templates')
-rw-r--r--templates/part.pagenavi.php31
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>&nbsp;&nbsp;</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;?>&nbsp;</a>
+ <?php else:?>
+ <?php echo $i+1;?>&nbsp;
+ <?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