NEW Can hide columns "time consumed" on timesheet per week.
This commit is contained in:
parent
1444920f57
commit
cb57546d99
@ -1512,27 +1512,29 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Time spent by everybody
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
// Time spent by everybody
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
$disabledproject = 1;
|
||||
$disabledtask = 1;
|
||||
@ -1903,27 +1905,29 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Time spent by everybody
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
// Time spent by everybody
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
$disabledproject = 1;
|
||||
$disabledtask = 1;
|
||||
|
||||
@ -61,10 +61,6 @@ $socid = 0;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
$now = dol_now();
|
||||
$nowtmp = dol_getdate($now);
|
||||
$nowday = $nowtmp['mday'];
|
||||
$nowmonth = $nowtmp['mon'];
|
||||
$nowyear = $nowtmp['year'];
|
||||
|
||||
$year = GETPOST('reyear', 'int') ?GETPOST('reyear', 'int') : (GETPOST("year", "int") ?GETPOST("year", "int") : (GETPOST("addtimeyear", "int") ?GETPOST("addtimeyear", "int") : date("Y")));
|
||||
$month = GETPOST('remonth', 'int') ?GETPOST('remonth', 'int') : (GETPOST("month", "int") ?GETPOST("month", "int") : (GETPOST("addtimemonth", "int") ?GETPOST("addtimemonth", "int") : date("m")));
|
||||
@ -73,7 +69,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
|
||||
$day = (int) $day;
|
||||
|
||||
$search_categ = GETPOST("search_categ", 'alpha');
|
||||
//$search_categ = GETPOST("search_categ", 'alpha');
|
||||
$search_usertoprocessid = GETPOST('search_usertoprocessid', 'int');
|
||||
$search_task_ref = GETPOST('search_task_ref', 'alpha');
|
||||
$search_task_label = GETPOST('search_task_label', 'alpha');
|
||||
@ -117,6 +113,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$arrayfields = array();
|
||||
$arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>0);
|
||||
$arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>0);
|
||||
$arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'enabled'=>1, 'position'=>15);
|
||||
/*$arrayfields=array(
|
||||
// Project
|
||||
'p.opp_amount'=>array('label'=>$langs->trans("OpportunityAmountShort"), 'checked'=>0, 'enabled'=>($conf->global->PROJECT_USE_OPPORTUNITIES?1:0), 'position'=>103),
|
||||
@ -153,7 +150,7 @@ if ($reshook < 0) {
|
||||
// Purge criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||
$action = '';
|
||||
$search_categ = '';
|
||||
//$search_categ = '';
|
||||
$search_usertoprocessid = $user->id;
|
||||
$search_task_ref = '';
|
||||
$search_task_label = '';
|
||||
@ -403,12 +400,13 @@ llxHeader("", $title, "", '', '', '', array('/core/js/timesheet.js'));
|
||||
$param = '';
|
||||
$param .= ($mode ? '&mode='.urlencode($mode) : '');
|
||||
$param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : '');
|
||||
$param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : '');
|
||||
$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : '');
|
||||
$param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : '');
|
||||
$param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : '');
|
||||
$param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : '');
|
||||
|
||||
/*$search_array_options=$search_array_options_project;
|
||||
/*
|
||||
$search_array_options = $search_array_options_project;
|
||||
$search_options_pattern='search_options_';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
*/
|
||||
@ -422,9 +420,7 @@ $nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&mont
|
||||
$nav .= dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "%A").' ';
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "day")." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
//$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button valignmiddle" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
@ -561,14 +557,16 @@ $search_options_pattern = 'search_task_options_';
|
||||
$extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
@ -592,21 +590,20 @@ $extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="right leftborder plannedworkload maxwidth100">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="leftborder plannedworkload maxwidth100 right">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
}
|
||||
/*print '<td class="right maxwidth100">'.$langs->trans("TimeSpent").'</td>';
|
||||
if ($usertoprocess->id == $user->id) print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||
else print '<td class="right maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';*/
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
|
||||
}
|
||||
print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>';
|
||||
|
||||
// By default, we can edit only tasks we are assigned to
|
||||
@ -658,13 +655,17 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$colspan = 4 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2);
|
||||
$colspan = 2 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="liste_total leftborder">';
|
||||
//print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>';
|
||||
print '</td>';
|
||||
@ -723,6 +724,10 @@ if (count($tasksarray) > 0) {
|
||||
print '<td colspan="'.($colspan - 1).'" class="opacitymedium">';
|
||||
print $langs->trans("OtherFilteredTasks");
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="leftborder"></td>';
|
||||
print '<td class="center">';
|
||||
$timeonothertasks = ($totalforeachday[$daytoparse] - $totalforvisibletasks[$daytoparse]);
|
||||
@ -745,6 +750,10 @@ if (count($tasksarray) > 0) {
|
||||
print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
print '<td class="liste_total leftborder">';
|
||||
//print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>';
|
||||
print '</td>';
|
||||
|
||||
@ -57,10 +57,6 @@ $socid = 0;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
$now = dol_now();
|
||||
$nowtmp = dol_getdate($now);
|
||||
$nowday = $nowtmp['mday'];
|
||||
$nowmonth = $nowtmp['mon'];
|
||||
$nowyear = $nowtmp['year'];
|
||||
|
||||
$year = GETPOST('reyear') ?GETPOST('reyear', 'int') : (GETPOST("year") ?GETPOST("year", "int") : date("Y"));
|
||||
$month = GETPOST('remonth') ?GETPOST('remonth', 'int') : (GETPOST("month") ?GETPOST("month", "int") : date("m"));
|
||||
@ -68,7 +64,7 @@ $day = GETPOST('reday') ?GETPOST('reday', 'int') : (GETPOST("day") ?GETPOST("day
|
||||
$day = (int) $day;
|
||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
|
||||
$search_categ = GETPOST("search_categ", 'alpha');
|
||||
//$search_categ = GETPOST("search_categ", 'alpha');
|
||||
$search_usertoprocessid = GETPOST('search_usertoprocessid', 'int');
|
||||
$search_task_ref = GETPOST('search_task_ref', 'alpha');
|
||||
$search_task_label = GETPOST('search_task_label', 'alpha');
|
||||
@ -119,7 +115,7 @@ if ($reshook < 0) {
|
||||
// Purge criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||
$action = '';
|
||||
$search_categ = '';
|
||||
//$search_categ = '';
|
||||
$search_usertoprocessid = $user->id;
|
||||
$search_task_ref = '';
|
||||
$search_task_label = '';
|
||||
@ -349,9 +345,7 @@ $param .= ($search_task_label ? '&search_task_label='.$search_task_label : '');
|
||||
$nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n";
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%Y").", ".$langs->trans(date('F', mktime(0, 0, 0, $month, 10)))." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
//$nav.=" (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav.=' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
|
||||
@ -61,10 +61,6 @@ $socid = 0;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
$now = dol_now();
|
||||
$nowtmp = dol_getdate($now);
|
||||
$nowday = $nowtmp['mday'];
|
||||
$nowmonth = $nowtmp['mon'];
|
||||
$nowyear = $nowtmp['year'];
|
||||
|
||||
$year = GETPOST('reyear', 'int') ?GETPOST('reyear', 'int') : (GETPOST("year", 'int') ?GETPOST("year", "int") : date("Y"));
|
||||
$month = GETPOST('remonth', 'int') ?GETPOST('remonth', 'int') : (GETPOST("month", 'int') ?GETPOST("month", "int") : date("m"));
|
||||
@ -73,7 +69,7 @@ $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
|
||||
$day = (int) $day;
|
||||
|
||||
$search_categ = GETPOST("search_categ", 'alpha');
|
||||
//$search_categ = GETPOST("search_categ", 'alpha');
|
||||
$search_usertoprocessid = GETPOST('search_usertoprocessid', 'int');
|
||||
$search_task_ref = GETPOST('search_task_ref', 'alpha');
|
||||
$search_task_label = GETPOST('search_task_label', 'alpha');
|
||||
@ -129,8 +125,9 @@ $arrayfields = array();
|
||||
'p.budget_amount'=>array('label'=>$langs->trans("Budget"), 'checked'=>0, 'position'=>110),
|
||||
'p.usage_bill_time'=>array('label'=>$langs->trans("BillTimeShort"), 'checked'=>0, 'position'=>115),
|
||||
);*/
|
||||
$arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>0);
|
||||
$arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>0);
|
||||
$arrayfields['t.planned_workload'] = array('label'=>'PlannedWorkload', 'checked'=>1, 'enabled'=>1, 'position'=>5);
|
||||
$arrayfields['t.progress'] = array('label'=>'ProgressDeclared', 'checked'=>1, 'enabled'=>1, 'position'=>10);
|
||||
$arrayfields['timeconsumed'] = array('label'=>'TimeConsumed', 'checked'=>1, 'enabled'=>1, 'position'=>15);
|
||||
/*foreach($object->fields as $key => $val)
|
||||
{
|
||||
// If $val['visible']==0, then we never show the field
|
||||
@ -165,7 +162,7 @@ if ($reshook < 0) {
|
||||
// Purge criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||
$action = '';
|
||||
$search_categ = '';
|
||||
//$search_categ = '';
|
||||
$search_usertoprocessid = $user->id;
|
||||
$search_task_ref = '';
|
||||
$search_task_label = '';
|
||||
@ -184,8 +181,10 @@ if (GETPOST("button_search_x", 'alpha') || GETPOST("button_search.x", 'alpha') |
|
||||
}
|
||||
|
||||
if (GETPOST('submitdateselect')) {
|
||||
$daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
|
||||
if (GETPOST('remonth', 'int') && GETPOST('reday', 'int') && GETPOST('reyear', 'int')) {
|
||||
$daytoparse = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
}
|
||||
|
||||
$action = '';
|
||||
}
|
||||
|
||||
@ -441,9 +440,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
$nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n";
|
||||
$nav .= " <span id=\"month_name\">".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("WeekShort")." ".$week." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
//$nav .= " (<a href=\"?year=".$nowyear."&month=".$nowmonth."&day=".$nowday.$param."\">".$langs->trans("Today")."</a>)";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
//$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
|
||||
$nav .= ' <button type="submit" name="submitdateselect" value="x" class="bordertransp"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
@ -618,14 +615,16 @@ $search_options_pattern = 'search_task_options_';
|
||||
$extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
@ -649,22 +648,20 @@ $extrafieldsobjectkey = 'projet_task';
|
||||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="leftborder plannedworkload maxwidth75 right">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="right leftborder plannedworkload maxwidth75 right">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="maxwidth75 right">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
}
|
||||
/*print '<td class="maxwidth75 right">'.$langs->trans("TimeSpent").'</td>';
|
||||
if ($usertoprocess->id == $user->id) print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||
else print '<td class="maxwidth75 right">'.$langs->trans("TimeSpentByUser").'</td>';*/
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span">';
|
||||
print '</th>';
|
||||
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
|
||||
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpent").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("Everybody").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="maxwidth75 right">'.$langs->trans("TimeSpent").($usertoprocess->firstname ? '<br>'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span>' : '').'</th>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
|
||||
$dayinloop = dol_time_plus_duree($startday, $idw, 'd');
|
||||
@ -693,7 +690,7 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$colspan = 3 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2);
|
||||
$colspan = 1 + (empty($conf->global->PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT) ? 0 : 2);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">';
|
||||
@ -701,7 +698,10 @@ if ($conf->use_javascript_ajax) {
|
||||
print $langs->trans("Total");
|
||||
print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>';
|
||||
print '</td>';
|
||||
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$cssweekend = '';
|
||||
if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css.
|
||||
@ -780,6 +780,10 @@ if (count($tasksarray) > 0) {
|
||||
print '<td colspan="'.($colspan + $addcolspan).'" class="opacitymedium">';
|
||||
print $langs->trans("OtherFilteredTasks");
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$cssweekend = '';
|
||||
if ((($idw + 1) < $numstartworkingday) || (($idw + 1) > $numendworkingday)) { // This is a day is not inside the setup of working days, so we use a week-end css.
|
||||
@ -801,11 +805,15 @@ if (count($tasksarray) > 0) {
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">
|
||||
<td class="liste_total" colspan="'.($colspan + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>';
|
||||
print '</td>';
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>';
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$cssweekend = '';
|
||||
@ -826,8 +834,8 @@ if (count($tasksarray) > 0) {
|
||||
|
||||
print '<td class="liste_total hide'.$idw.($cssonholiday ? ' '.$cssonholiday : '').($cssweekend ? ' '.$cssweekend : '').'" align="center"><div class="totalDay'.$idw.'"> </div></td>';
|
||||
}
|
||||
print '<td class="liste_total center"><div class="totalDayAll"> </div></td>
|
||||
</tr>';
|
||||
print '<td class="liste_total center"><div class="totalDayAll"> </div></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr><td colspan="15"><span class="opacitymedium">'.$langs->trans("NoAssignedTasks").'</span></td></tr>';
|
||||
|
||||
@ -2284,8 +2284,8 @@ li.tmenu, li.tmenusel {
|
||||
li.tmenu:hover {
|
||||
opacity: .50; /* show only a slight shadow */
|
||||
}
|
||||
li.tmenusel {
|
||||
text-decoration: underline;
|
||||
li.tmenusel a.tmenusel {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.tmenuend .tmenuleft { width: 0px; }
|
||||
.tmenuend { display: none; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user