From 5ece9f288f0941d1e73a676416a514365286fc97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 May 2024 13:32:52 +0200 Subject: [PATCH] Debug v20 --- htdocs/projet/tasks/time.php | 56 ++++++++++++++++++++------------ htdocs/theme/eldy/global.inc.php | 9 ++--- htdocs/theme/md/style.css.php | 9 ++--- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index fdf26f5df79..39c629c52ee 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -2117,17 +2117,16 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; } elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { - print ' '; - print ''; - print img_split('', 'class="pictofixedwidth"'); - print ''; - } - print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_edit('default', 0, 'class="pictofixedwidth paddingleft"'); print ''; + if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { + print ''; + print img_split('', 'class="pictofixedwidth paddingleft"'); + print ''; + } + print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_delete('default', 'class="pictodelete paddingleft"'); print ''; @@ -2147,6 +2146,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $totalarray['nbfield']++; } } + // Date if (!empty($arrayfields['t.element_date']['checked'])) { print ''; @@ -2454,22 +2454,21 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { print ''; - print ''; + print ''; print '
'; - print ''; + print ''; } elseif ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer')) { // Read project and enter time consumed on assigned tasks if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { - print ' '; - print ''; - print img_split('', 'class="pictofixedwidth"'); - print ''; - } - print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_edit('default', 0, 'class="pictofixedwidth paddingleft"'); print ''; + if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) { + print ''; + print img_split('', 'class="pictofixedwidth paddingleft"'); + print ''; + } + print 'rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; print img_delete('default', 'class="pictodelete paddingleft"'); print ''; @@ -2493,12 +2492,17 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print "\n"; - // Add line to split + // Add the lines for the split feature if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + // Date if (!empty($arrayfields['t.element_date']['checked'])) { print ''; @@ -2645,8 +2649,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print $hookmanager->resPrint; // Action column - print ''; - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } print "\n"; @@ -2655,6 +2661,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } + // Date if (!empty($arrayfields['t.element_date']['checked'])) { print ''; @@ -2803,8 +2815,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print $hookmanager->resPrint; // Action column - print ''; - print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } print "\n"; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a491051e74c..e8df12f3b0d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1024,12 +1024,6 @@ td.wordbreak img, td.wordbreakimp img { .marginright2 { margin-: 2px; } -.nomarginleft { - margin-: unset; -} -.nomarginright { - margin-: unset; -} .nowidthimp { width: unset !important; } @@ -1418,6 +1412,9 @@ select.flat.selectlimit { .nomarginleft { margin-: 0px !important; } +.nomarginright { + margin-: 0px !important; +} .marginrightonly { margin-: 10px !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 1d56e60b832..4cce5ffdc4d 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1211,12 +1211,6 @@ td.wordbreak img, td.wordbreakimp img { .marginright2 { margin-: 2px; } -.nomarginleft { - margin-: unset; -} -.nomarginright { - margin-: unset; -} .nowidthimp { width: unset !important; } @@ -1597,6 +1591,9 @@ select.flat.selectlimit { .nomarginleft { margin-: 0px !important; } +.nomarginright { + margin-: 0px !important; +} .marginrightonly { margin-: 10px !important; }