Fix: navigation of supplier invoices

This commit is contained in:
Laurent Destailleur
2013-09-07 19:50:47 +02:00
parent 082cf0b487
commit bd24711b30
2 changed files with 18 additions and 31 deletions

View File

@@ -2465,7 +2465,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath
* Print a title with navigation controls for pagination * Print a title with navigation controls for pagination
* *
* @param string $titre Title to show (required) * @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 $file Url of page (required)
* @param string $options parametres complementaires lien ('' par defaut) * @param string $options parametres complementaires lien ('' par defaut)
* @param string $sortfield champ de tri ('' 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 "<!-- Begin title '".$titre."' -->\n"; print "<!-- Begin title '".$titre."' -->\n";
print '<table width="100%" border="0" class="notopnoleftnoright" style="margin-bottom: 2px;"><tr>'; print '<table width="100%" border="0" class="notopnoleftnoright" style="margin-bottom: 2px;"><tr>';
$pagelist = '';
// Left // Left
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('', $picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding"><div class="titre">'.$titre.'</div></td>';
// Center
if ($center)
{
print '<td class="nobordernopadding" align="left" valign="middle">'.$center.'</td>';
}
// Right
print '<td class="nobordernopadding" align="right" valign="middle">';
if ($sortfield) $options .= "&amp;sortfield=".$sortfield;
if ($sortorder) $options .= "&amp;sortorder=".$sortorder;
// Show navigation bar
$pagelist = '';
if ($page > 0 || $num > $conf->liste_limit) if ($page > 0 || $num > $conf->liste_limit)
{ {
if ($totalnboflines) if ($totalnboflines)
{ {
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding">';
print '<div class="titre">'.$titre.'</div>';
print '</td>';
$maxnbofpage=10; $maxnbofpage=10;
$nbpages=ceil($totalnboflines/$conf->liste_limit); $nbpages=ceil($totalnboflines/$conf->liste_limit);
@@ -2541,30 +2549,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
} }
else else
{ {
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding">';
print '<div class="titre">'.$titre.'</div>';
$pagelist.= $langs->trans('Page').' '.($page+1); $pagelist.= $langs->trans('Page').' '.($page+1);
print '</td>';
} }
} }
else
{
if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone" width="40" align="left" valign="middle">'.img_picto('',$picto, '', $pictoisfullpath).'</td>';
print '<td class="nobordernopadding"><div class="titre">'.$titre.'</div></td>';
}
// Center
if ($center)
{
print '<td class="nobordernopadding" align="left" valign="middle">'.$center.'</td>';
}
// Right
print '<td class="nobordernopadding" align="right" valign="middle">';
if ($sortfield) $options .= "&amp;sortfield=".$sortfield;
if ($sortorder) $options .= "&amp;sortorder=".$sortorder;
// Affichage des fleches de navigation
print_fleche_navigation($page,$file,$options,$nextpage,$pagelist); print_fleche_navigation($page,$file,$options,$nextpage,$pagelist);
print '</td>'; print '</td>';

View File

@@ -192,7 +192,7 @@ if ($resql)
if (GETPOST("search_montant_ht")) $param.='&amp;search_montant_ht='.urlencode(GETPOST("search_montant_ht")); if (GETPOST("search_montant_ht")) $param.='&amp;search_montant_ht='.urlencode(GETPOST("search_montant_ht"));
if (GETPOST("search_montant_ttc")) $param.='&amp;search_montant_ttc='.urlencode(GETPOST("search_montant_ttc")); if (GETPOST("search_montant_ttc")) $param.='&amp;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 '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<table class="liste" width="100%">'; print '<table class="liste" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';