diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 51e47c0ee8a..4fa103b49e0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1118,7 +1118,9 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e if (! is_object($outputlangs)) $outputlangs=$langs; if (! $format) $format='daytextshort'; $reduceformat=(! empty($conf->dol_optimize_smallscreen) && in_array($format,array('day','dayhour')))?1:0; - + $formatwithoutreduce = preg_replace('/reduceformat/','',$format); + if ($formatwithoutreduce != $format) { $format = $formatwithoutreduce; $reduceformat=1; } // so format 'dayreduceformat' is processed like day + // Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default. if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short); else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index cdf565cd18f..4a3b5cf710d 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -804,17 +804,19 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id]; $alreadyspent=''; if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin'); + $alttitle=$langs->trans("AddHereTimeSpentForDay",$tmparray['day'],$tmparray['mon']); + $tableCell =''; - $tableCell.=''; - //$placeholder=' placeholder="00:00"'; - $placeholder=''; - //if (! $disabledtask) - //{ - $tableCell.='+'; - $tableCell.=''; - //} + if ($alreadyspent) + { + $tableCell.=''; + //$placeholder=' placeholder="00:00"'; + $placeholder=''; + //$tableCell.='+'; + } + $tableCell.=''; $tableCell.=''; print $tableCell; } diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 4376811142b..cc31d1090f8 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -316,7 +316,7 @@ $startday=dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['fi for($i=0;$i<7;$i++) { - print ''.dol_print_date($startday + ($i * 3600 * 24), '%a').'
'.dol_print_date($startday + ($i * 3600 * 24), 'day').''; + print ''.dol_print_date($startday + ($i * 3600 * 24), '%a').'
'.dol_print_date($startday + ($i * 3600 * 24), 'dayreduceformat').''; } print '';