This commit is contained in:
Laurent Destailleur 2019-05-19 13:01:11 +02:00
parent 2bbb04085e
commit d86fc28aba
6 changed files with 36 additions and 39 deletions

View File

@ -310,7 +310,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<table class="border centpercent">'."\n";
// Common attributes
//$keyforbreak='fieldkeytoswithonsecondcolumn';
$keyforbreak='description';
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
// Other attributes

View File

@ -16,7 +16,7 @@
*/
/**
* \file class/bom.class.php
* \file bom/class/bom.class.php
* \ingroup bom
* \brief This file is a CRUD class file for BOM (Create/Read/Update/Delete)
*/
@ -98,7 +98,7 @@ class BOM extends CommonObject
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-1, 'position'=>62, 'notnull'=>-1,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,),
'date_valid' => array('type'=>'datetime', 'label'=>'DateValid', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
'fk_user_creat' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'llx_user.rowid',),
'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1,),
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,),

View File

@ -48,7 +48,7 @@ foreach($object->fields as $key => $val)
$value=$object->$key;
print '<tr><td';
print ' class="titlefield';
print ' class="titlefield fieldname_'.$key;
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired on the view output
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
print '">';
@ -65,9 +65,11 @@ foreach($object->fields as $key => $val)
}
print '</table>';
// We close div and reopen for second column
print '</div>';
print '<div class="fichehalfright">';
print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
@ -87,7 +89,7 @@ foreach($object->fields as $key => $val)
$value=$object->$key;
print '<tr><td';
print ' class="titlefield';
print ' class="titlefield fieldname_'.$key;
if ($val['notnull'] > 0) print ' fieldrequired';
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
print '">';

View File

@ -155,7 +155,6 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
print '<input type="hidden" name="'.$fieldid.'" value="' . $object->id . '">';
print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id);
print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Modify')) . '">';
print '</form>';

View File

@ -1126,15 +1126,14 @@ div.fichetwothirdright {
}
div.fichehalfleft {
<?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?>
<?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?>
<?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?>
}
div.fichehalfright {
<?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?>
<?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?>
<?php if ($conf->browser->layout != 'phone') { print "width: calc(50% - 10px);\n"; } ?>
}
div.ficheaddleft {
<?php if ($conf->browser->layout != 'phone') { print "padding-".$left.": 16px;\n"; }
else print "margin-top: 10px;\n"; ?>
div.fichehalfright {
<?php if ($conf->browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?>
}
div.firstcolumn div.box {
padding-right: 10px;
@ -1174,8 +1173,7 @@ div.secondcolumn div.box {
float: none;
width: auto;
}
div.ficheaddleft {
<?php print "padding-".$left.": 0px;\n"; ?>
div.fichehalfright {
margin-top: 10px;
}
div.firstcolumn div.box {
@ -1198,13 +1196,13 @@ div.secondcolumn div.box {
width: auto;
}
.fichehalfright-lg .ficheaddleft{
.fichehalfright-lg .fichehalfright {
padding-left:0;
}
}
/* For table into table into card */
div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td {
div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td {
padding: 0 0 0 0;
}
div.nopadding {
@ -2466,9 +2464,9 @@ td.border, div.tagtable div div.border {
}
/*.ficheaddleft table.noborder {
.fichehalfright table.noborder {
margin: 0px 0px 0px 0px;
}*/
}
table.liste, table.noborder, table.formdoc, div.noborder {
width: 100%;
@ -2498,7 +2496,7 @@ table.liste tr:last-of-type td, table.noborder:not(#tablelines) tr:last-of-type
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-bottom-style: solid;
}
div.tabBar div.ficheaddleft table.noborder:not(.margintable):not(.paymenttable):last-of-type {
div.tabBar div.fichehalfright table.noborder:not(.margintable):not(.paymenttable):last-of-type {
border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>);
}
div.tabBar table.border>tbody>tr:last-of-type>td {
@ -2506,7 +2504,7 @@ div.tabBar table.border>tbody>tr:last-of-type>td {
border-bottom-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-bottom-style: solid;
}
div.tabBar div.ficheaddleft table.noborder {
div.tabBar div.fichehalfright table.noborder {
border-bottom: none;
}
@ -3013,8 +3011,8 @@ div.tabBar .noborder {
/* Prepare to remove class pair - impair */
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
{
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
@ -3029,8 +3027,8 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-
}
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
{
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
@ -3057,9 +3055,9 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
overflow-x: auto;
min-height: 40px;
}
/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats {
.ficheaddleft div.boxstats, .ficheaddright div.boxstats {
border: none;
}*/
}
.boxstatsborder {
/* border: 1px solid #CCC !important; */
}

View File

@ -1364,9 +1364,8 @@ div.fichehalfright {
<?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?>
<?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?>
}
div.ficheaddleft {
<?php if ($conf->browser->layout != 'phone') { print "padding-".$left.": 16px;\n"; }
else print "margin-top: 10px;\n"; ?>
div.fichehalfright {
<?php if ($conf->browser->layout == 'phone') { print "margin-top: 10px;\n"; } ?>
}
div.firstcolumn div.box {
padding-right: 10px;
@ -1408,8 +1407,7 @@ div.secondcolumn div.box {
float: none;
width: auto;
}
div.ficheaddleft {
<?php print "padding-".$left.": 0px;\n"; ?>
div.fichehalfright {
margin-top: 10px;
}
div.firstcolumn div.box {
@ -1421,7 +1419,7 @@ div.secondcolumn div.box {
}
/* For table into table into card */
div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td, div.nopadding {
div.fichehalfright tr.liste_titre:first-child td table.nobordernopadding td, div.nopadding {
padding: 0 0 0 0;
}
div.nopadding {
@ -2736,7 +2734,7 @@ td.border, div.tagtable div div.border {
border-bottom: 1px solid rgb(<?php echo $colortopbordertitle1 ?>);
}
.ficheaddleft table.noborder {
.fichehalfright table.noborder {
margin: 0px 0px 0px 0px;
}
div.colorback
@ -3275,8 +3273,8 @@ div .tdtop {
/* Prepare to remove class pair - impair */
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
{
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
@ -3291,8 +3289,8 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-
}
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
div:not(.fichecenter):not(.fichehalfleft):not(.fichehalfright):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
{
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
@ -3319,9 +3317,9 @@ ul.noborder li:nth-child(even):not(.liste_titre) {
overflow-x: auto;
min-height: 40px;
}
/*.ficheaddleft div.boxstats, .ficheaddright div.boxstats {
.ficheaddleft div.boxstats, .ficheaddright div.boxstats {
border: none;
}*/
}
.boxstatsborder {
/* border: 1px solid #CCC !important; */
}