2 /* Generated from /home/crodas/projects/playground/haanga/tests/assert_templates/load.tpl */
3 function haanga_8d56a9a504af63b0aa1f9e966ad860de9c65c99b($vars, $return=FALSE, $blocks=array())
11 $mnm_total = ceil($total / $results_per_page);
12 $mnm_start = max($mnm_current - intval(5 / 2), 1);
13 $mnm_end = $mnm_start +
5 - 1;
14 $mnm_prev = (1 == $mnm_current ?
FALSE : $mnm_current - 1);
15 $mnm_next = ($total < 0 ||
$mnm_current < $mnm_total ?
$mnm_current +
1 : FALSE);
16 $mnm_pages = range($mnm_start, ($mnm_end < $mnm_total ?
$mnm_end : $mnm_total));
18 if (empty($mnm_prev) === FALSE) {
19 echo "\n <span class=\"nextprev\">« Previous</span>\n";
21 echo "\n <a href=\"?page".htmlentities($mnm_prev)."\">« Previous</a>\n";
25 echo "\n <a href=\"?page=1\">1</a>';\n <span>...</span>\n";
28 foreach ($mnm_pages as $page) {
30 if ($mnm_current == $page) {
31 echo "\n <span class=\"current\">".htmlentities($page)."</span>\n ";
33 echo "\n <a href=\"?page=".htmlentities($page)."\">".htmlentities($page)."</a>\n ";
38 if ($mnm_total > $mnm_end) {
39 echo "\n <span>...</span>\n <a href=\"?page=".htmlentities($mnm_total)."\">".htmlentities($mnm_total)."</a>\n";
42 if (empty($mnm_next) === FALSE) {
43 echo "\n <a href=\"?page=".htmlentities($mnm_next)."\">» Next</a>\n";
45 echo "\n <span class=\"nextprev\">» Next</span>\n";
48 if ($return == TRUE) {
49 return ob_get_clean();