diff options
author | plegall <plg@piwigo.org> | 2005-01-08 00:18:39 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-01-08 00:18:39 +0000 |
commit | 43fc29137d4b415c65bcb14efe37e6dab9dcedf4 (patch) | |
tree | 776deb28a82cd67d2613b10bf956891b64739e78 /include/functions_html.inc.php | |
parent | 0fc6999ded4c86bcdfd5211b031b248e4a8f447b (diff) |
- no "..." in navigation bar if page numbers are consecutive
git-svn-id: http://piwigo.org/svn/trunk@678 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_html.inc.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 303c9b6cd..f30523c34 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -110,7 +110,11 @@ function create_navigation_bar($url, $nb_element, $start, { $navbar.= ' <a href="'; $navbar.= add_session_id($url.'&start=0'); - $navbar.= '" class="'.$link_class.'">1</a> ...'; + $navbar.= '" class="'.$link_class.'">1</a>'; + if ($cur_page > $pages_around + 2) + { + $navbar.= ' ...'; + } } // inspired from punbb source code @@ -139,7 +143,11 @@ function create_navigation_bar($url, $nb_element, $start, if ($cur_page < ($maximum - $pages_around)) { $temp_start = ($maximum - 1) * $nb_element_page; - $navbar.= ' ... <a href="'; + if ($cur_page < ($maximum - $pages_around - 1)) + { + $navbar.= ' ...'; + } + $navbar.= ' <a href="'; $navbar.= add_session_id($url.'&start='.$temp_start); $navbar.= '" class="'.$link_class.'">'.$maximum.'</a>'; } |