aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-08 00:18:39 +0000
committerplegall <plg@piwigo.org>2005-01-08 00:18:39 +0000
commit43fc29137d4b415c65bcb14efe37e6dab9dcedf4 (patch)
tree776deb28a82cd67d2613b10bf956891b64739e78 /include/functions_html.inc.php
parent0fc6999ded4c86bcdfd5211b031b248e4a8f447b (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.php12
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.= '&nbsp;<a href="';
$navbar.= add_session_id($url.'&amp;start=0');
- $navbar.= '" class="'.$link_class.'">1</a>&nbsp;...';
+ $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.= '&nbsp;...&nbsp;<a href="';
+ if ($cur_page < ($maximum - $pages_around - 1))
+ {
+ $navbar.= ' ...';
+ }
+ $navbar.= ' <a href="';
$navbar.= add_session_id($url.'&amp;start='.$temp_start);
$navbar.= '" class="'.$link_class.'">'.$maximum.'</a>';
}