diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index b61c5aff922..43720614a2e 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -302,7 +302,7 @@ $projectstatic=new Project($db);
$project = new Project($db);
$taskstatic = new Task($db);
$thirdpartystatic = new Societe($db);
-
+$holiday = new Holiday($db);
$prev = dol_getdate($daytoparse - (24 * 3600));
$prev_year = $prev['year'];
@@ -487,8 +487,6 @@ print '
'.$langs->trans("HourStart").' | ';
$restrictviewformytask=(empty($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)?1:0);
// Get if user is available or not for each day
-$holiday = new Holiday($db);
-
$isavailable=array();
if (! empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
{
@@ -512,7 +510,14 @@ if (($idw + 1) < $numstartworkingday || ($idw + 1) > $numendworkingday) // This
$cssweekend='weekend';
}
-print ''.$langs->trans("Duration").' | ';
+$tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
+
+$cssonholiday='';
+if (! $isavailable[$daytoparse]['morning'] && ! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayallday ';
+elseif (! $isavailable[$daytoparse]['morning']) $cssonholiday.='onholidaymorning ';
+elseif (! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+print ''.$langs->trans("Duration").' | ';
print ''.$langs->trans("Note").' | ';
print ' | ';
print "\n";
@@ -522,8 +527,10 @@ $colspan = 8;
if ($conf->use_javascript_ajax)
{
print '';
- print '| ';
+ print ' | ';
print $langs->trans("Total");
+ print ' | ';
+ print '';
//print ' - '.$langs->trans("ExpectedWorkedHours").': '.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'';
print ' | ';
@@ -531,12 +538,17 @@ if ($conf->use_javascript_ajax)
$idw = $tmparray['wday'];
$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.
+ 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.
{
$cssweekend='weekend';
- }*/
+ }
- print ' | ';
+ $cssonholiday='';
+ if (! $isavailable[$daytoparse]['morning'] && ! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayallday ';
+ elseif (! $isavailable[$daytoparse]['morning']) $cssonholiday.='onholidaymorning ';
+ elseif (! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+ print ' | ';
print ' |
|
@@ -620,8 +632,10 @@ if (count($tasksarray) > 0)
if ($conf->use_javascript_ajax)
{
print '
';
- print '| ';
+ print ' | ';
print $langs->trans("Total");
+ print ' | ';
+ print '';
//print ' - '.$langs->trans("ExpectedWorkedHours").': '.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'';
print ' | ';
@@ -629,12 +643,17 @@ if (count($tasksarray) > 0)
$idw = $tmparray['wday'];
$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.
+ 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.
{
$cssweekend='weekend';
- }*/
+ }
- print ' | ';
+ $cssonholiday='';
+ if (! $isavailable[$daytoparse]['morning'] && ! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayallday ';
+ elseif (! $isavailable[$daytoparse]['morning']) $cssonholiday.='onholidaymorning ';
+ elseif (! $isavailable[$daytoparse]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+ print ' | ';
print ' |
|
diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php
index a52ea4fd6d8..b7d731d786b 100644
--- a/htdocs/projet/activity/perweek.php
+++ b/htdocs/projet/activity/perweek.php
@@ -314,6 +314,7 @@ $projectstatic=new Project($db);
$project = new Project($db);
$taskstatic = new Task($db);
$thirdpartystatic = new Societe($db);
+$holiday = new Holiday($db);
$title=$langs->trans("TimeSpent");
@@ -417,6 +418,38 @@ print '';
print '';
+
+$startday=dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['first_day'], $startdayarray['first_year']);
+
+// Get if user is available or not for each day
+$isavailable=array();
+if (! empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
+{
+ $tmparray=explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
+ if (count($tmparray) >= 2)
+ {
+ $numstartworkingday = $tmparray[0];
+ $numendworkingday = $tmparray[1];
+ }
+}
+
+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');
+
+ // Useless because $dayinloopwithouthours should be same than $dayinloopfromfirstdaytoshow
+ //$tmparray = dol_getdate($dayinloop);
+ //$dayinloopwithouthours=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
+ //print dol_print_date($dayinloop, 'dayhour').' ';
+ //print dol_print_date($dayinloopwithouthours, 'dayhour').' ';
+ //print dol_print_date($dayinloopfromfirstdaytoshow, 'dayhour').'
';
+
+ $isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $dayinloopfromfirstdaytoshow);
+ $isavailable[$dayinloopfromfirstdaytoshow]=$isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day
+}
+
+
$moreforfilter='';
// Filter on categories
@@ -448,7 +481,6 @@ if (! empty($moreforfilter))
print '';
}
-
print '';
print '
'."\n";
@@ -461,7 +493,7 @@ print ' | ';
print ' | ';
print ' | ';
print ' | ';
-for($idw=0;$idw<7;$idw++)
+for ($idw=0;$idw<7;$idw++)
{
print ' | ';
}
@@ -485,44 +517,25 @@ print ''.$langs->trans("ProgressDeclared").
print ' | '.$langs->trans("TimeSpent").' ('.$langs->trans("Everybody").') | ';
print ''.$langs->trans("TimeSpent").($usertoprocess->firstname?' ('.$usertoprocess->firstname.')':'').' | ';
-$startday=dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['first_day'], $startdayarray['first_year']);
-
-// Get if user is available or not for each day
-$holiday = new Holiday($db);
-
-$isavailable=array();
-if (! empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
-{
- $tmparray=explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
- if (count($tmparray) >= 2)
- {
- $numstartworkingday = $tmparray[0];
- $numendworkingday = $tmparray[1];
- }
-}
-
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');
- // Useless because $dayinloopwithouthours should be same than $dayinloopfromfirstdaytoshow
- //$tmparray = dol_getdate($dayinloop);
- //$dayinloopwithouthours=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']);
- //print dol_print_date($dayinloop, 'dayhour').' ';
- //print dol_print_date($dayinloopwithouthours, 'dayhour').' ';
- //print dol_print_date($dayinloopfromfirstdaytoshow, 'dayhour').'
';
-
- $isavailablefordayanduser = $holiday->verifDateHolidayForTimestamp($usertoprocess->id, $dayinloopfromfirstdaytoshow);
- $isavailable[$dayinloopfromfirstdaytoshow]=$isavailablefordayanduser; // in projectLinesPerWeek later, we are using $firstdaytoshow and dol_time_plus_duree to loop on each day
-
$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.
{
$cssweekend='weekend';
}
- print ''.dol_print_date($dayinloopfromfirstdaytoshow, '%a').' '.dol_print_date($dayinloopfromfirstdaytoshow, 'dayreduceformat').' | ';
+ $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
+
+ $cssonholiday='';
+ if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday ';
+ elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
+ elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+ print ''.dol_print_date($dayinloopfromfirstdaytoshow, '%a').' '.dol_print_date($dayinloopfromfirstdaytoshow, 'dayreduceformat').' | ';
}
print ' | ';
print "\n";
@@ -540,12 +553,19 @@ if ($conf->use_javascript_ajax)
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.
+ 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.
{
$cssweekend='weekend';
- }*/
+ }
- print ' | ';
+ $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
+
+ $cssonholiday='';
+ if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday ';
+ elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
+ elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+ print ' | ';
}
print ' | ';
print '';
@@ -651,12 +671,19 @@ if (count($tasksarray) > 0)
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.
+ 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.
{
$cssweekend='weekend';
- }*/
+ }
- print ' | ';
+ $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
+
+ $cssonholiday='';
+ if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday ';
+ elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
+ elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
+
+ print ' | ';
}
print ' |
';
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 5c9c861c97e..47369f7c92f 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -414,6 +414,9 @@ td.leftborder, td.hide0 {
td.leftborder, td.hide6 {
border-right: 1px solid #ccc;
}
+td.rightborder {
+ border-right: 1px solid #ccc;
+}
td.actionbuttons a {
padding-left: 6px;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 18d61624b8c..3b3f0ca092e 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -417,6 +417,9 @@ td.leftborder, td.hide0 {
td.leftborder, td.hide6 {
border-right: 1px solid #ccc;
}
+td.rightborder {
+ border-right: 1px solid #ccc;
+}
select.flat, form.flat select {
font-weight: normal;