diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index cdcdbd1a2ad..f03e511f8d0 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -120,7 +120,7 @@ if ($id > 0 && empty($object->id)) if ($object->id > 0) { - $title=$langs->trans("ThirdParty")." - ".$langs->trans('SupplierCard'); + $title=$langs->trans("ThirdParty")." - ".$langs->trans('Supplier'); if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$langs->trans('Supplier'); $help_url=''; llxHeader('',$title, $help_url); diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index 35bd8e85155..f6d94fb8135 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -69,11 +69,21 @@ if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); - $helpurl=''; - if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; - if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + $title = $langs->trans('ProductServiceCard'); + $helpurl = ''; + $shortlabel = dol_trunc($object->label,16); + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) + { + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Card'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; + } + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) + { + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Card'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + } - llxHeader("", $langs->trans("CardProduct".$object->type), $help_url); + llxHeader('', $title, $helpurl); /* * En mode visu diff --git a/htdocs/product/card.php b/htdocs/product/card.php index f06009ecfa7..d3f0ea70eb6 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -811,12 +811,19 @@ if (empty($reshook)) * View */ -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; - -if (isset($_GET['type'])) $title = $langs->trans('CardProduct'.GETPOST('type')); -else $title = $langs->trans('ProductServiceCard'); +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Card'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Card'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} llxHeader('', $title, $helpurl); diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index a65adb1c4b3..ef9c34f32ee 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -133,10 +133,6 @@ else if($action==='save_composed_product') * View */ -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; - $product_fourn = new ProductFournisseur($db); $productstatic = new Product($db); $form = new Form($db); @@ -177,10 +173,22 @@ if ($action == 'search') $resql = $db->query($sql); } -//print $sql; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('AssociatedProducts'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('AssociatedProducts'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} -llxHeader("", $langs->trans("CardProduct".$object->type), $helpurl); +llxHeader('', $title, $helpurl); $head=product_prepare_head($object); $titre=$langs->trans("CardProduct".$object->type); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index cddcff12374..05d25b4085a 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -166,11 +166,21 @@ if ($action=='filemerge') $form = new Form($db); -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Documents'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Documents'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} -llxHeader("", $langs->trans("CardProduct".$object->type), $help_url); +llxHeader('', $title, $helpurl); if ($object->id) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 3eb08370aba..05d70e7eb26 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -274,19 +274,26 @@ if (empty($reshook)) * view */ -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('BuyingPrices'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('BuyingPrices'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} + +llxHeader('', $title, $helpurl); $form = new Form($db); if ($id > 0 || $ref) { - if ($action <> 're-edit') - { - llxHeader("", $langs->trans("CardProduct".$object->type), $helpurl); - } - if ($result) { if ($action == 'ask_remove_pf') { @@ -365,7 +372,7 @@ if ($id > 0 || $ref) print '
| '.$langs->trans("Supplier").' | '; + print ' |
| '.$langs->trans("Supplier").' | '; if ($rowid) { $supplier=new Fournisseur($db); diff --git a/htdocs/product/info.php b/htdocs/product/info.php index 71f1908e434..f725d0e17d9 100644 --- a/htdocs/product/info.php +++ b/htdocs/product/info.php @@ -56,11 +56,21 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e * View */ -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Info'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Info'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} -$title=$langs->trans("Product"); +llxHeader('', $title, $helpurl); $form=new Form($b); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index c645d76062e..420fde73839 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -619,11 +619,21 @@ if (! empty($id) || ! empty($ref)) $object->fetch($id, $ref); } -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('SellingPrices'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('SellingPrices'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} -llxHeader("", $langs->trans("CardProduct" . $object->type), $hepl_url); +llxHeader('', $title, $helpurl); $head = product_prepare_head($object); $titre = $langs->trans("CardProduct" . $object->type); diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index f9f2fe51b5f..0bc4eafa316 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -94,7 +94,22 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all') else { $result = $object->fetch($id,$ref); - llxHeader("",$langs->trans("CardProduct".$object->type)); + + $title = $langs->trans('ProductServiceCard'); + $helpurl = ''; + $shortlabel = dol_trunc($object->label,16); + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) + { + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Statistics'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; + } + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) + { + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Statistics'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + } + + llxHeader('', $title, $helpurl); } diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 6f3f8546454..e9eb3d41859 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -90,7 +90,21 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - llxHeader("","",$langs->trans("CardProduct".$product->type)); + $title = $langs->trans('ProductServiceCard'); + $helpurl = ''; + $shortlabel = dol_trunc($object->label,16); + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) + { + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Referers'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; + } + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) + { + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Referers'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + } + + llxHeader('', $title, $helpurl); if ($result > 0) { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 9bc37ad5a7a..30536a6fd3f 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -407,8 +407,21 @@ if ($id > 0 || $ref) $object->load_stock(); - $help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; - llxHeader("",$langs->trans("CardProduct".$object->type),$help_url); + $title = $langs->trans('ProductServiceCard'); + $helpurl = ''; + $shortlabel = dol_trunc($object->label,16); + if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) + { + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Stock'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; + } + if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) + { + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Stock'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + } + + llxHeader('', $title, $helpurl); if ($result > 0) { diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 0460eca7c4c..28d6dc925fd 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -163,11 +163,21 @@ $result = $object->fetch($id,$ref); * View */ -$helpurl=''; -if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +$title = $langs->trans('ProductServiceCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label,16); +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) +{ + $title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Translation'); + $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +} +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) +{ + $title = $langs->trans('Service')." ". $shortlabel ." - ".$langs->trans('Translation'); + $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +} -llxHeader("", $langs->trans("Translation"), $help_url); +llxHeader('', $title, $helpurl); $form = new Form($db); $formadmin=new FormAdmin($db); |