Changeset 678 for trunk


Ignore:
Timestamp:
Jan 8, 2005, 1:18:39 AM (20 years ago)
Author:
plg
Message:
  • no "..." in navigation bar if page numbers are consecutive
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_html.inc.php

    r675 r678  
    111111      $navbar.= '&nbsp;<a href="';
    112112      $navbar.= add_session_id($url.'&amp;start=0');
    113       $navbar.= '" class="'.$link_class.'">1</a>&nbsp;...';
     113      $navbar.= '" class="'.$link_class.'">1</a>';
     114      if ($cur_page > $pages_around + 2)
     115      {
     116        $navbar.= ' ...';
     117      }
    114118    }
    115119   
     
    140144    {
    141145      $temp_start = ($maximum - 1) * $nb_element_page;
    142       $navbar.= '&nbsp;...&nbsp;<a href="';
     146      if ($cur_page < ($maximum - $pages_around - 1))
     147      {
     148        $navbar.= ' ...';
     149      }
     150      $navbar.= ' <a href="';
    143151      $navbar.= add_session_id($url.'&amp;start='.$temp_start);
    144152      $navbar.= '" class="'.$link_class.'">'.$maximum.'</a>';
Note: See TracChangeset for help on using the changeset viewer.