histogram: Make histograms crash less
[ninja.git] / application / views / pagination / classic.php
blobd9cdcec75155378b8bbef91d02a7fda99423bb97
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * Classic pagination style
5 * @preview ‹ First < 1 2 3 > Last ›
6 */
7 ?>
9 <p class="pagination">
11 <?php if ($first_page): ?>
12 <a href="<?php echo str_replace('{page}', 1, $url) ?>">&lsaquo;&nbsp;<?php echo Kohana::lang('pagination.first') ?></a>
13 <?php endif ?>
15 <?php if ($previous_page): ?>
16 <a href="<?php echo str_replace('{page}', $previous_page, $url) ?>">&lt;</a>
17 <?php endif ?>
20 <?php for ($i = 1; $i <= $total_pages; $i++): ?>
22 <?php if ($i == $current_page): ?>
23 <strong><?php echo $i ?></strong>
24 <?php else: ?>
25 <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a>
26 <?php endif ?>
28 <?php endfor ?>
31 <?php if ($next_page): ?>
32 <a href="<?php echo str_replace('{page}', $next_page, $url) ?>">&gt;</a>
33 <?php endif ?>
35 <?php if ($last_page): ?>
36 <a href="<?php echo str_replace('{page}', $last_page, $url) ?>"><?php echo Kohana::lang('pagination.last') ?>&nbsp;&rsaquo;</a>
37 <?php endif ?>
39 </p>