From fa3c1933e314fa54d714d3f7517ee26807194725 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Jul 2007 11:09:04 +0000 Subject: [PATCH] On deplace le bouton Retour Liste au niveau de la ligne de ref car les boutons actions sont reserves aux actions sur l'objet et ce bouton est un operation de navigation et non d'action sur l'objet. Le lient est donc mis au meme niveau que les boutons de navigations suivant-precedents d'une fiche --- htdocs/commonobject.class.php | 10 ++++++++++ htdocs/compta/propal.php | 7 +++++-- htdocs/html.form.class.php | 19 +++++++++++++++---- htdocs/langs/en_US/main.lang | 1 + htdocs/langs/fr_FR/main.lang | 3 ++- htdocs/product/fiche.php | 2 +- 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index 4d8f99447f2..62b874681c2 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -474,6 +474,16 @@ class CommonObject print "\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 7936f0c581e..dcdc095e89f 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -144,8 +144,12 @@ if ($_GET["propalid"] > 0) */ print ''; + $linkback=''.$langs->trans("BackToList").""; + // Ref - print ''; + print ''; // Ref client print ''; $nblignes=6;
'.$langs->trans('Ref').''.$propal->ref.'
'.$langs->trans('Ref').''; + print $html->showrefnav($propal,'propalid',$linkback); + print '
'; @@ -449,7 +453,6 @@ if ($_GET["propalid"] > 0) * Boutons Actions */ print '
'; - print ''.'Retour Liste'.""; if ($propal->statut <> 4 && $user->societe_id == 0) { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 84f7f0c0e5f..c2fcfaa35f7 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?''.img_previous().'':''; $next_ref = $object->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) $ret.='
'; - $ret.=$object->getNomUrl(0); + if ($previous_ref || $next_ref || $morehtml) { + $ret.=''; - $ret.='
'; + } + //$ret.=$object->getNomUrl(0); + $ret.=$object->ref; + if ($morehtml) { + $ret.=''.$morehtml; + } if ($previous_ref || $next_ref) { $ret.=''.$previous_ref.''.$next_ref.'
'; + $ret.='
'.$next_ref; + } + if ($previous_ref || $next_ref || $morehtml) + { + $ret.='
'; } return $ret; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 586c8a484b4..dabef17d62d 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 93e9473879e..a40591b41fe 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 aa644658e95..81571417529 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -654,7 +654,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - print $html->showrefnav($product); + print $html->showrefnav($product,'ref'); print '