Created
November 4, 2012 13:08
-
-
Save eminetto/4011827 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ($this->pageCount > 1): ?> | |
<div class="navigation clearfix"> | |
<?php if($this->current != 1): ?> | |
<a href="<?= $this->url(null, array('page' => 1), true) ?>">«</a> | |
<?php else: ?> | |
<a href="<?= $this->url(null, array('page' => 1), true) ?>" class="disabled">«</a> | |
<?php endif;?> | |
<!-- Previous page link --> | |
<?php if (isset($this->previous)): ?> | |
<a href="<?= $this->url(null, array('page' => $this->previous), true) ?>"><</a> | |
<?php else: ?> | |
<a href="#" class="disabled"><</a> | |
<?php endif; ?> | |
<!-- Numbered page links --> | |
<?php foreach ($this->pagesInRange as $page): ?> | |
<?php if ($page != $this->current): ?> | |
<a href="<?= $this->url(null, array('page' => $page), true) ?>" class="btn"><?php echo $page; ?></a> | |
<?php else: ?> | |
<a href="#" class="btn disabled"><?php echo $page; ?></a> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
<!-- Next page link --> | |
<?php if (isset($this->next)): ?> | |
<a href="<?= $this->url(null, array('page' => $this->next), true) ?>">></a> | |
<?php else: ?> | |
<a href="#" class="disabled">></a> | |
<?php endif; ?> | |
<?php if($this->current != $this->pageCount): ?> | |
<a href="<?= $this->url(null, array('page' => $this->pageCount), true) ?>">»</a> | |
<?php else: ?> | |
<a href="<?= $this->url(null, array('page' => 1), true) ?>" class="disabled">»</a> | |
<?php endif;?> | |
</ul> | |
<span class="info"><?php echo $this->current;?> de <?php echo $this->pageCount;?></span> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment