NEW Days where user is on vacation use different colors in timesheet.

This commit is contained in:
Laurent Destailleur 2017-09-19 17:07:39 +02:00
parent 2a04d497da
commit 5f7631a95d
5 changed files with 22 additions and 7 deletions

View File

@ -733,8 +733,9 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
print '</td>';
$cssonholiday='';
if (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning ';
if (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon ';
if (! $isavailable[$preselectedday]['morning'] && ! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayallday ';
elseif (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning ';
elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon ';
// Duration
print '<td align="right" class="duration'.($cssonholiday?' '.$cssonholiday:'').'">';
@ -970,8 +971,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
$tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
$cssonholiday='';
if (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
if (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday ';
elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
$tmparray=dol_getdate($tmpday);
$dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id];

View File

@ -85,7 +85,7 @@ if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id)
$usertoprocess=$user;
$search_usertoprocessid=$usertoprocess->id;
}
elseif (search_usertoprocessid > 0)
elseif ($search_usertoprocessid > 0)
{
$usertoprocess=new User($db);
$usertoprocess->fetch($search_usertoprocessid);

View File

@ -98,7 +98,7 @@ if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id)
$usertoprocess=$user;
$search_usertoprocessid=$usertoprocess->id;
}
elseif (search_usertoprocessid > 0)
elseif ($search_usertoprocessid > 0)
{
$usertoprocess=new User($db);
$usertoprocess->fetch($search_usertoprocessid);

View File

@ -387,12 +387,18 @@ input.buttonpaymentstripe {
background-repeat: no-repeat;
background-position: 8px 7px;
}
/* Used by timesheets */
span.timesheetalreadyrecorded input {
border: none;
border-bottom: solid 1px rgba(0,0,0,0.4);
margin-right: 1px !important;
}
td.onholidaymorning, td.onholidayafternoon {
background-color: #fdf6f2;
}
td.onholidayallday {
background-color: #f4eede;
}
select.flat, form.flat select {
font-weight: normal;
}

View File

@ -384,11 +384,18 @@ input.buttonpaymentstripe {
background-repeat: no-repeat;
background-position: 8px 7px;
}
/* Used for timesheets */
span.timesheetalreadyrecorded input {
border: none;
border-bottom: solid 1px rgba(0,0,0,0.1);
margin-right: 1px !important;
}
td.onholidaymorning, td.onholidayafternoon {
background-color: #fdf6f2;
}
td.onholidayallday {
background-color: #f4eede;
}
select.flat, form.flat select {
font-weight: normal;