Debug v23
This commit is contained in:
parent
83f9d2cab7
commit
0870e00503
1 changed files with 17 additions and 19 deletions
|
|
@ -917,6 +917,19 @@ $help_url = '';
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-project project-tasks page-task_time');
|
||||
|
||||
|
||||
$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
|
||||
if ($search_user) {
|
||||
$param .= '&search_user=' . ((int) $search_user);
|
||||
}
|
||||
if ($search_month) {
|
||||
$param .= '&search_month=' . ((int) $search_month);
|
||||
}
|
||||
if ($search_year) {
|
||||
$param .= '&search_year=' . ((int) $search_year);
|
||||
}
|
||||
|
||||
|
||||
if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser > 0) {
|
||||
// Project car in view mode
|
||||
if ($projectidforalltimes > 0) {
|
||||
|
|
@ -956,17 +969,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
$head = project_prepare_head($projectstatic);
|
||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'));
|
||||
|
||||
$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
|
||||
if ($search_user) {
|
||||
$param .= '&search_user=' . ((int) $search_user);
|
||||
}
|
||||
if ($search_month) {
|
||||
$param .= '&search_month=' . ((int) $search_month);
|
||||
}
|
||||
if ($search_year) {
|
||||
$param .= '&search_year=' . ((int) $search_year);
|
||||
}
|
||||
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
|
@ -1100,8 +1102,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print '<br>';
|
||||
}
|
||||
|
||||
$param = '';
|
||||
|
||||
// Link to create time
|
||||
$linktocreatetimeBtnStatus = 0;
|
||||
$linktocreatetimeUrl = '';
|
||||
|
|
@ -1162,15 +1162,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
$head = task_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
|
||||
|
||||
$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
|
||||
|
||||
if ($action == 'deleteline') {
|
||||
$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : '');
|
||||
$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . $param;
|
||||
$formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
|
||||
}
|
||||
|
||||
$param = ($withproject ? '&withproject=1' : '');
|
||||
$param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task
|
||||
$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
|
||||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId);
|
||||
|
|
@ -1270,7 +1268,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
print dol_get_fiche_end();
|
||||
} else {
|
||||
if ($action == 'deleteline') {
|
||||
$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''). "&contextpage=" . urlencode($contextpage);
|
||||
$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''). "&contextpage=" . urlencode($contextpage).$param;
|
||||
$formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue