Debug v20
This commit is contained in:
parent
46b0bcefb7
commit
5ece9f288f
3 changed files with 41 additions and 33 deletions
|
|
@ -2117,17 +2117,16 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
} 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 '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
|
||||
print img_split('', 'class="pictofixedwidth"');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
print '<a class="reposition editfielda" href="'.$_SERVER["PHP_SELF"].'?'.($withproject ? 'id='.$task_time->fk_element : '').'&action=editline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||
print img_edit('default', 0, 'class="pictofixedwidth paddingleft"');
|
||||
print '</a>';
|
||||
|
||||
if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
|
||||
print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
|
||||
print img_split('', 'class="pictofixedwidth paddingleft"');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
print '<a class="reposition paddingleft" href="'.$_SERVER["PHP_SELF"].'?'.($withproject ? 'id='.$task_time->fk_element : '').'&action=deleteline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||
print img_delete('default', 'class="pictodelete paddingleft"');
|
||||
print '</a>';
|
||||
|
|
@ -2147,6 +2146,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Date
|
||||
if (!empty($arrayfields['t.element_date']['checked'])) {
|
||||
print '<td class="nowrap">';
|
||||
|
|
@ -2454,22 +2454,21 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print '<td class="center nowraponall">';
|
||||
if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) {
|
||||
print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">';
|
||||
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-save small" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '<br>';
|
||||
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-cancel small" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
} 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 '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
|
||||
print img_split('', 'class="pictofixedwidth"');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
print '<a class="reposition editfielda" href="'.$_SERVER["PHP_SELF"].'?'.($withproject ? 'id='.$task_time->fk_element : '').'&action=editline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||
print img_edit('default', 0, 'class="pictofixedwidth paddingleft"');
|
||||
print '</a>';
|
||||
|
||||
if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
|
||||
print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
|
||||
print img_split('', 'class="pictofixedwidth paddingleft"');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
print '<a class="reposition paddingleft" href="'.$_SERVER["PHP_SELF"].'?'.($withproject ? 'id='.$task_time->fk_element : '').'&action=deleteline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||
print img_delete('default', 'class="pictodelete paddingleft"');
|
||||
print '</a>';
|
||||
|
|
@ -2493,12 +2492,17 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print "</tr>\n";
|
||||
|
||||
|
||||
// Add line to split
|
||||
// Add the lines for the split feature
|
||||
|
||||
if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
|
||||
print '<!-- first line -->';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td></td>';
|
||||
}
|
||||
|
||||
// Date
|
||||
if (!empty($arrayfields['t.element_date']['checked'])) {
|
||||
print '<td class="nowrap">';
|
||||
|
|
@ -2645,8 +2649,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print $hookmanager->resPrint;
|
||||
|
||||
// Action column
|
||||
print '<td class="center nowraponall">';
|
||||
print '</td>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center nowraponall">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
@ -2655,6 +2661,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
|
||||
print '<!-- second line --><tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center nowraponall">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date
|
||||
if (!empty($arrayfields['t.element_date']['checked'])) {
|
||||
print '<td class="nowrap">';
|
||||
|
|
@ -2803,8 +2815,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print $hookmanager->resPrint;
|
||||
|
||||
// Action column
|
||||
print '<td class="center nowraponall">';
|
||||
print '</td>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="center nowraponall">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1024,12 +1024,6 @@ td.wordbreak img, td.wordbreakimp img {
|
|||
.marginright2 {
|
||||
margin-<?php print $right; ?>: 2px;
|
||||
}
|
||||
.nomarginleft {
|
||||
margin-<?php print $left; ?>: unset;
|
||||
}
|
||||
.nomarginright {
|
||||
margin-<?php print $right; ?>: unset;
|
||||
}
|
||||
.nowidthimp {
|
||||
width: unset !important;
|
||||
}
|
||||
|
|
@ -1418,6 +1412,9 @@ select.flat.selectlimit {
|
|||
.nomarginleft {
|
||||
margin-<?php echo $left; ?>: 0px !important;
|
||||
}
|
||||
.nomarginright {
|
||||
margin-<?php echo $right; ?>: 0px !important;
|
||||
}
|
||||
.marginrightonly {
|
||||
margin-<?php echo $right; ?>: 10px !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1211,12 +1211,6 @@ td.wordbreak img, td.wordbreakimp img {
|
|||
.marginright2 {
|
||||
margin-<?php print $right; ?>: 2px;
|
||||
}
|
||||
.nomarginleft {
|
||||
margin-<?php print $left; ?>: unset;
|
||||
}
|
||||
.nomarginright {
|
||||
margin-<?php print $right; ?>: unset;
|
||||
}
|
||||
.nowidthimp {
|
||||
width: unset !important;
|
||||
}
|
||||
|
|
@ -1597,6 +1591,9 @@ select.flat.selectlimit {
|
|||
.nomarginleft {
|
||||
margin-<?php echo $left; ?>: 0px !important;
|
||||
}
|
||||
.nomarginright {
|
||||
margin-<?php echo $right; ?>: 0px !important;
|
||||
}
|
||||
.marginrightonly {
|
||||
margin-<?php echo $right; ?>: 10px !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue