CSS and look

This commit is contained in:
Laurent Destailleur 2017-01-22 14:55:41 +01:00
parent 433ad9d59d
commit 581b61bef1
7 changed files with 24 additions and 16 deletions

View File

@ -1470,11 +1470,11 @@ else
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$var=!$var; //$var=!$var;
if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) if ($action != 'editline' || GETPOST('rowid') != $objp->rowid)
{ {
print '<tr '.$bc[$var].' valign="top">'; print '<tr '.$bcnd[$var].' valign="top">';
// Libelle // Libelle
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
@ -1563,7 +1563,7 @@ else
$colspan = 7; $colspan = 7;
} }
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
print '<td colspan="'.$colspan.'">'; print '<td colspan="'.$colspan.'">';
// Date planned // Date planned
@ -1599,10 +1599,10 @@ else
// Display lines extrafields // Display lines extrafields
if (is_array($extralabelslines) && count($extralabelslines)>0) { if (is_array($extralabelslines) && count($extralabelslines)>0) {
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
$line = new ContratLigne($db); $line = new ContratLigne($db);
$line->fetch_optionals($objp->rowid,$extralabelslines); $line->fetch_optionals($objp->rowid,$extralabelslines);
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan)); print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bcnd[$var], 'colspan'=>$colspan));
print '</tr>'; print '</tr>';
} }
} }
@ -1610,7 +1610,7 @@ else
else else
{ {
// Ligne carac // Ligne carac
print "<tr ".$bc[$var].">"; print "<tr ".$bcnd[$var].">";
print '<td>'; print '<td>';
if ($objp->fk_product) if ($objp->fk_product)
{ {
@ -1664,7 +1664,7 @@ else
if($conf->global->PRODUCT_USE_UNITS) $colspan++; if($conf->global->PRODUCT_USE_UNITS) $colspan++;
// Ligne dates prevues // Ligne dates prevues
print "<tr ".$bc[$var].">"; print "<tr ".$bcnd[$var].">";
print '<td colspan="'.$colspan.'">'; print '<td colspan="'.$colspan.'">';
print $langs->trans("DateStartPlanned").' '; print $langs->trans("DateStartPlanned").' ';
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update"); $form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
@ -1673,10 +1673,10 @@ else
print '</td>'; print '</td>';
if (is_array($extralabelslines) && count($extralabelslines)>0) { if (is_array($extralabelslines) && count($extralabelslines)>0) {
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
$line = new ContratLigne($db); $line = new ContratLigne($db);
$line->fetch_optionals($objp->rowid,$extralabelslines); $line->fetch_optionals($objp->rowid,$extralabelslines);
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan)); print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$colspan));
print '</tr>'; print '</tr>';
} }
@ -1692,7 +1692,7 @@ else
if ($object->statut > 0) if ($object->statut > 0)
{ {
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
print '<td colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium"></td>'; print '<td colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium"></td>';
print "</tr>\n"; print "</tr>\n";
} }
@ -1761,7 +1761,7 @@ else
{ {
print '<table class="notopnoleftnoright tableforservicepart2" width="100%">'; print '<table class="notopnoleftnoright tableforservicepart2" width="100%">';
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>'; print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>';
print '<td width="30" align="right">'; print '<td width="30" align="right">';
if ($user->societe_id == 0) if ($user->societe_id == 0)
@ -1769,10 +1769,18 @@ else
if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline') if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline')
{ {
$tmpaction='activateline'; $tmpaction='activateline';
if ($objp->statut == 4) $tmpaction='unactivateline'; $tmpactionpicto='play';
if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->desactiver)) { $tmpactiontext=$langs->trans("Activate");
if ($objp->statut == 4)
{
$tmpaction='unactivateline';
$tmpactionpicto='playstop';
$tmpactiontext=$langs->trans("Unactivate");
}
if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->desactiver))
{
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;ligne=' . $object->lines[$cursorline - 1]->id . '&amp;action=' . $tmpaction . '">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;ligne=' . $object->lines[$cursorline - 1]->id . '&amp;action=' . $tmpaction . '">';
print img_edit(); print img_picto($tmpactiontext, $tmpactionpicto);
print '</a>'; print '</a>';
} }
} }
@ -1780,7 +1788,7 @@ else
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr '.$bc[$var].'>'; print '<tr '.$bcnd[$var].'>';
print '<td>'; print '<td>';
// Si pas encore active // Si pas encore active
@ -1903,7 +1911,7 @@ else
print '</td>'; print '</td>';
print '<td align="right" rowspan="2" class="nohover">'; print '<td align="right" rowspan="2" class="nohover">';
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Close").'"><br>'; print '<input type="submit" class="button" name="close" value="'.$langs->trans("Unactivate").'"><br>';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B