Fix look and feel v10

This commit is contained in:
Laurent Destailleur 2019-05-22 13:42:27 +02:00
parent e3d50c533c
commit e60131e3ee

View File

@ -214,7 +214,7 @@ if ($id > 0 || ! empty($ref))
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border centpercent tableforfield">';
// Nature // Nature
if ($object->type!=Product::TYPE_SERVICE) if ($object->type!=Product::TYPE_SERVICE)
@ -268,13 +268,11 @@ if ($id > 0 || ! empty($ref))
$nbofsubproducts=count($prodschild); // This include only first level of childs $nbofsubproducts=count($prodschild); // This include only first level of childs
// Number of parent virtual products print '<div class="fichecenter">';
//print $form->textwithpicto($langs->trans("ParentProductsNumber").': '.count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct'));
//if (count($prodsfather) > 0)
//{
print load_fiche_titre($langs->trans("ProductParentList"), '', ''); print load_fiche_titre($langs->trans("ProductParentList"), '', '');
print '<table class="centpercent noborder">';
print '<table class="liste">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ParentProducts').'</td>'; print '<td>'.$langs->trans('ParentProducts').'</td>';
print '<td>'.$langs->trans('Label').'</td>'; print '<td>'.$langs->trans('Label').'</td>';
@ -282,8 +280,6 @@ if ($id > 0 || ! empty($ref))
print '</td>'; print '</td>';
if (count($prodsfather) > 0) if (count($prodsfather) > 0)
{ {
$class='pair';
foreach($prodsfather as $value) foreach($prodsfather as $value)
{ {
$idprod= $value["id"]; $idprod= $value["id"];
@ -293,9 +289,7 @@ if ($id > 0 || ! empty($ref))
$productstatic->label=$value['label']; $productstatic->label=$value['label'];
$productstatic->entity=$value['entity']; $productstatic->entity=$value['entity'];
$class=($class=='impair')?'pair':'impair'; print '<tr class="oddeven">';
print '<tr class="'.$class.'">';
print '<td>'.$productstatic->getNomUrl(1, 'composition').'</td>'; print '<td>'.$productstatic->getNomUrl(1, 'composition').'</td>';
print '<td>'.$productstatic->label.'</td>'; print '<td>'.$productstatic->label.'</td>';
print '<td>'.$value['qty'].'</td>'; print '<td>'.$value['qty'].'</td>';
@ -304,23 +298,18 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
print '<tr class="impair">'; print '<tr class="oddeven">';
print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>'; print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
print '</tr>'; print '</tr>';
} }
print '</table>'; print '</table>';
//} print '</div>';
print '<br>'."\n"; print '<br>'."\n";
// Number of subproducts print '<div class="fichecenter">';
//print $form->textwithpicto($langs->trans("AssociatedProductsNumber").': '.(empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)?$nbofsubproducts:$nbofsubsubproducts), $langs->trans('IfZeroItIsNotAVirtualProduct'));
// List of subproducts
//if (count($prods_arbo) > 0)
//{
$atleastonenotdefined=0; $atleastonenotdefined=0;
print load_fiche_titre($langs->trans("ProductAssociationList"), '', ''); print load_fiche_titre($langs->trans("ProductAssociationList"), '', '');
@ -328,7 +317,7 @@ if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="action" value="save_composed_product" />'; print '<input type="hidden" name="action" value="save_composed_product" />';
print '<input type="hidden" name="id" value="'.$id.'" />'; print '<input type="hidden" name="id" value="'.$id.'" />';
print '<table class="centpercent noborder">'; print '<table class="liste">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ComposedProduct').'</td>'; print '<td>'.$langs->trans('ComposedProduct').'</td>';
@ -340,8 +329,6 @@ if ($id > 0 || ! empty($ref))
print '<td class="center">'.$langs->trans('ComposedProductIncDecStock').'</td>'; print '<td class="center">'.$langs->trans('ComposedProductIncDecStock').'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
$class='pair';
$totalsell=0; $totalsell=0;
if (count($prods_arbo)) if (count($prods_arbo))
{ {
@ -351,8 +338,7 @@ if ($id > 0 || ! empty($ref))
if ($value['level'] <= 1) if ($value['level'] <= 1)
{ {
$class=($class=='impair')?'pair':'impair'; print '<tr class="oddeven">';
print '<tr class="'.$class.'">';
$notdefined=0; $notdefined=0;
$nb_of_subproduct = $value['nb']; $nb_of_subproduct = $value['nb'];
@ -420,8 +406,7 @@ if ($id > 0 || ! empty($ref))
$hide=''; $hide='';
if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject'; // By default, we do not show this. It makes screen very difficult to understand if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide=' hideobject'; // By default, we do not show this. It makes screen very difficult to understand
$class=($class=='impair')?'pair':'impair'; print '<tr class="oddeven'.$hide.'" id="sub-'.$value['id_parent'].'">';
print '<tr class="'.$class.$hide.'" id="sub-'.$value['id_parent'].'">';
//$productstatic->ref=$value['label']; //$productstatic->ref=$value['label'];
$productstatic->ref=$value['ref']; $productstatic->ref=$value['ref'];
@ -485,7 +470,7 @@ if ($id > 0 || ! empty($ref))
$colspan=8; $colspan=8;
if (! empty($conf->stock->enabled)) $colspan++; if (! empty($conf->stock->enabled)) $colspan++;
print '<tr class="impair">'; print '<tr class="oddeven">';
print '<td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td>'; print '<td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td>';
print '</tr>'; print '</tr>';
} }
@ -497,7 +482,9 @@ if ($id > 0 || ! empty($ref))
}*/ }*/
print '</form>'; print '</form>';
//} print '</div>';
// Form with product to add // Form with product to add
if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer)) if ((empty($action) || $action == 'view' || $action == 'edit' || $action == 'search' || $action == 're-edit') && ($user->rights->produit->creer || $user->rights->service->creer))