diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 515b3b1cb08..09fb34ee333 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2465,7 +2465,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath * Print a title with navigation controls for pagination * * @param string $titre Title to show (required) - * @param string $page Numero of page (required) + * @param string $page Numero of page to show in navigation links (required) * @param string $file Url of page (required) * @param string $options parametres complementaires lien ('' par defaut) * @param string $sortfield champ de tri ('' par defaut) @@ -2497,18 +2497,26 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so print "\n"; print ''; - $pagelist = ''; - // Left + if ($picto && $titre) print ''; + print ''; + + // Center + if ($center) + { + print ''; + } + + // Right + print ''; - print ''; - $maxnbofpage=10; $nbpages=ceil($totalnboflines/$conf->liste_limit); @@ -2522,7 +2530,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so } do { - if($cpt==$page) + if ($cpt==$page) { $pagelist.= ' '.($page+1).''; } @@ -2541,30 +2549,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so } else { - if ($picto && $titre) print ''; - print ''; } } - else - { - if ($picto && $titre) print ''; - print ''; - } - - // Center - if ($center) - { - print ''; - } - - // Right - print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 820aaadb573..e5475404f6e 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -192,7 +192,7 @@ if ($resql) if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht")); if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); - print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,"index.php",$param,$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num); print ''; print '
'.img_picto('', $picto, '', $pictoisfullpath).'
'.$titre.'
'.$center.''; + if ($sortfield) $options .= "&sortfield=".$sortfield; + if ($sortorder) $options .= "&sortorder=".$sortorder; + // Show navigation bar + $pagelist = ''; if ($page > 0 || $num > $conf->liste_limit) { if ($totalnboflines) { - if ($picto && $titre) print ''.img_picto('',$picto, '', $pictoisfullpath).''; - print '
'.$titre.'
'; - print '
'.img_picto('',$picto, '', $pictoisfullpath).''; - print '
'.$titre.'
'; $pagelist.= $langs->trans('Page').' '.($page+1); - print '
'.img_picto('',$picto, '', $pictoisfullpath).'
'.$titre.'
'.$center.''; - if ($sortfield) $options .= "&sortfield=".$sortfield; - if ($sortorder) $options .= "&sortorder=".$sortorder; - // Affichage des fleches de navigation print_fleche_navigation($page,$file,$options,$nextpage,$pagelist); print '
'; print '';