diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index 4d8f99447f2496497e912feacacca1902066aa7f..62b874681c2d0219f24a26d5deb07961d96f0d1a 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -474,6 +474,16 @@ class CommonObject print "</select>\n"; } + + /** + * \brief Charge les propri�t�s ref_previous et ref_next + * \param filter filtre + * \return int <0 si ko, >0 si ok + */ + function load_previous_next_ref($filter='') + { + return 1; + } } ?> diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 7936f0c581e4746f552796bcb7bdb45e1a87fb34..dcdc095e89f011c1a43fa8044dfe5010fef8f45b 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -144,8 +144,12 @@ if ($_GET["propalid"] > 0) */ print '<table class="border" width="100%">'; + $linkback='<a href="propal.php' . "?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder" .'">'.$langs->trans("BackToList")."</a>"; + // Ref - print '<tr><td>'.$langs->trans('Ref').'</td><td colspan="5">'.$propal->ref.'</td></tr>'; + print '<tr><td>'.$langs->trans('Ref').'</td><td colspan="5">'; + print $html->showrefnav($propal,'propalid',$linkback); + print '</td></tr>'; // Ref client print '<tr><td>'; @@ -449,7 +453,6 @@ if ($_GET["propalid"] > 0) * Boutons Actions */ print '<div class="tabsAction">'; - print '<a class="butAction" href="propal.php' . "?page=$page&socid=$socid&viewstatut=$viewstatut&sortfield=$sortfield&$sortorder" .'">'.'Retour Liste'."</a>"; if ($propal->statut <> 4 && $user->societe_id == 0) { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 84f7f0c0e5f987ba3394f20783c224f52e35293f..c2fcfaa35f74a0407403067cc9a301f341dc438d 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -3327,9 +3327,10 @@ class Form * \brief Affiche tableau avec ref et bouton navigation pour un objet metier * \param object Objet a afficher * \param paramid Nom du parametre a utiliser pour nommer id dans liens URL + * \param morehtml Code html supplementaire a afficher avant barre nav * \return string Portion HTML avec ref + boutons nav */ - function showrefnav($object,$paramid='ref') + function showrefnav($object,$paramid,$morehtml='') { $ret=''; @@ -3337,11 +3338,21 @@ class Form $previous_ref = $object->ref_previous?'<a href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_previous).'">'.img_previous().'</a>':''; $next_ref = $object->ref_next?'<a href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).'">'.img_next().'</a>':''; - if ($previous_ref || $next_ref) $ret.='<table class="nobordernopadding" width="100%"><tr class="nobordernopadding"><td class="nobordernopadding">'; - $ret.=$object->getNomUrl(0); + if ($previous_ref || $next_ref || $morehtml) { + $ret.='<table class="nobordernopadding" width="100%"><tr class="nobordernopadding"><td class="nobordernopadding">'; + } + //$ret.=$object->getNomUrl(0); + $ret.=$object->ref; + if ($morehtml) { + $ret.='</td><td class="nobordernopadding" align="right">'.$morehtml; + } if ($previous_ref || $next_ref) { $ret.='</td><td class="nobordernopadding" align="center" width="20">'.$previous_ref.'</td>'; - $ret.='<td class="nobordernopadding" align="center" width="20">'.$next_ref.'</td></tr></table>'; + $ret.='<td class="nobordernopadding" align="center" width="20">'.$next_ref; + } + if ($previous_ref || $next_ref || $morehtml) + { + $ret.='</td></tr></table>'; } return $ret; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 586c8a484b44695aac7c1ccd8c10c8ad1b8ab13d..dabef17d62dd58df5c18337fb3a0d3b873260eb5 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -379,6 +379,7 @@ Owner=Owner DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=Following constants will be substitute with corresponding value. Refresh=Refresh +BackToList=Back to list # Countries CountryFR=France CountryBE=Belgium diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 93e9473879e08d383de117036958096033aeee41..a40591b41fe9e294e43de35511bbe3562d95ee88 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -380,6 +380,7 @@ Owner=Propri DetectedVersion=Version d�tect�e FollowingConstantsWillBeSubstituted=Les constantes suivantes seront substitu�es par leur valeur correspondante. Refresh=Rafraichir +BackToList=Retour liste # Countries CountryFR=France CountryBE=Belgique @@ -407,4 +408,4 @@ ShortWednesday=M ShortThursday=J ShortFriday=V ShortSaturday=S -ShortSunday=D \ No newline at end of file +ShortSunday=D diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index aa644658e95903b18f270372cb4002678552b53e..81571417529eb3b53cd2ebaaccb30cf04eb33d9f 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -654,7 +654,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '<td width="15%">'.$langs->trans("Ref").'</td><td width="85%">'; - print $html->showrefnav($product); + print $html->showrefnav($product,'ref'); print '</td>'; $nblignes=6;