Uniformize presentation
This commit is contained in:
parent
dd905debb4
commit
a1d1396919
@ -120,7 +120,7 @@ if ($id > 0 && empty($object->id))
|
|||||||
|
|
||||||
if ($object->id > 0)
|
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');
|
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='';
|
$help_url='';
|
||||||
llxHeader('',$title, $help_url);
|
llxHeader('',$title, $help_url);
|
||||||
|
|||||||
@ -69,11 +69,21 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$result = $object->fetch($id, $ref);
|
$result = $object->fetch($id, $ref);
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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
|
* En mode visu
|
||||||
|
|||||||
@ -811,12 +811,19 @@ if (empty($reshook))
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT))
|
||||||
|
{
|
||||||
if (isset($_GET['type'])) $title = $langs->trans('CardProduct'.GETPOST('type'));
|
$title = $langs->trans('Product')." ". $shortlabel ." - ".$langs->trans('Card');
|
||||||
else $title = $langs->trans('ProductServiceCard');
|
$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);
|
llxHeader('', $title, $helpurl);
|
||||||
|
|
||||||
|
|||||||
@ -133,10 +133,6 @@ else if($action==='save_composed_product')
|
|||||||
* View
|
* 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);
|
$product_fourn = new ProductFournisseur($db);
|
||||||
$productstatic = new Product($db);
|
$productstatic = new Product($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -177,10 +173,22 @@ if ($action == 'search')
|
|||||||
|
|
||||||
$resql = $db->query($sql);
|
$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);
|
$head=product_prepare_head($object);
|
||||||
$titre=$langs->trans("CardProduct".$object->type);
|
$titre=$langs->trans("CardProduct".$object->type);
|
||||||
|
|||||||
@ -166,11 +166,21 @@ if ($action=='filemerge')
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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)
|
if ($object->id)
|
||||||
|
|||||||
@ -274,19 +274,26 @@ if (empty($reshook))
|
|||||||
* view
|
* view
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($id > 0 || $ref)
|
if ($id > 0 || $ref)
|
||||||
{
|
{
|
||||||
if ($action <> 're-edit')
|
|
||||||
{
|
|
||||||
llxHeader("", $langs->trans("CardProduct".$object->type), $helpurl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
if ($action == 'ask_remove_pf') {
|
if ($action == 'ask_remove_pf') {
|
||||||
@ -365,7 +372,7 @@ if ($id > 0 || $ref)
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Supplier
|
// Supplier
|
||||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Supplier").'</td><td>';
|
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Supplier").'</td><td>';
|
||||||
if ($rowid)
|
if ($rowid)
|
||||||
{
|
{
|
||||||
$supplier=new Fournisseur($db);
|
$supplier=new Fournisseur($db);
|
||||||
|
|||||||
@ -56,11 +56,21 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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);
|
$form=new Form($b);
|
||||||
|
|
||||||
|
|||||||
@ -619,11 +619,21 @@ if (! empty($id) || ! empty($ref))
|
|||||||
$object->fetch($id, $ref);
|
$object->fetch($id, $ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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);
|
$head = product_prepare_head($object);
|
||||||
$titre = $langs->trans("CardProduct" . $object->type);
|
$titre = $langs->trans("CardProduct" . $object->type);
|
||||||
|
|||||||
@ -94,7 +94,22 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id,$ref);
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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
|
$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');
|
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)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -407,8 +407,21 @@ if ($id > 0 || $ref)
|
|||||||
|
|
||||||
$object->load_stock();
|
$object->load_stock();
|
||||||
|
|
||||||
$help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
|
$title = $langs->trans('ProductServiceCard');
|
||||||
llxHeader("",$langs->trans("CardProduct".$object->type),$help_url);
|
$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)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -163,11 +163,21 @@ $result = $object->fetch($id,$ref);
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$title = $langs->trans('ProductServiceCard');
|
||||||
$helpurl = '';
|
$helpurl = '';
|
||||||
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
$shortlabel = dol_trunc($object->label,16);
|
||||||
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
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);
|
$form = new Form($db);
|
||||||
$formadmin=new FormAdmin($db);
|
$formadmin=new FormAdmin($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user