diff --git a/htdocs/core/js/timesheet.js b/htdocs/core/js/timesheet.js
index ba3f8b2edd1..20a713ce220 100644
--- a/htdocs/core/js/timesheet.js
+++ b/htdocs/core/js/timesheet.js
@@ -213,11 +213,9 @@ function updateTotal(days,mode)
}
});
- if (document.getElementById('totalDay['+days+']')) // May be null if no task records to output (nbline is also 0 in this case)
- {
- document.getElementById('totalDay['+days+']').innerHTML = pad(total.getHours())+':'+pad(total.getMinutes());
- //addText(,total.getHours()+':'+total.getMinutes());
- }
+ if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+days).addClass("bold");
+ else jQuery('.totalDay'+days).removeClass("bold");
+ jQuery('.totalDay'+days).text(pad(total.getHours())+':'+pad(total.getMinutes()));
}
else
{
@@ -257,10 +255,10 @@ function updateTotal(days,mode)
}
}
}
- if (document.getElementById('totalDay['+days+']')) // May be null if no task records to output (nbline is also 0 in this case)
- {
- document.getElementById('totalDay['+days+']').innerHTML = total;
- }
+
+ if (total) jQuery('.totalDay'+days).addClass("bold");
+ else jQuery('.totalDay'+days).removeClass("bold");
+ jQuery('.totalDay'+days).text(total);
}
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 67600a7ba3e..49474d1e190 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -940,7 +940,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
print "\n";
// Planned Workload
- print '
';
+ print '
';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
else print '--:--';
print '
';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
else print '--:--';
print '
';
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 86d09ff3edc..ab044618556 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -10,13 +10,13 @@ PrivateProject=Project contacts
ProjectsImContactFor=Projects I'm explicitely a contact of
AllAllowedProjects=All project I can read (mine + public)
AllProjects=All projects
-MyProjectsDesc=This view is limited to projects you are a contact for.
+MyProjectsDesc=This view is limited to projects you are a contact for
ProjectsPublicDesc=This view presents all projects you are allowed to read.
TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read.
ProjectsPublicTaskDesc=This view presents all projects and tasks you are allowed to read.
ProjectsDesc=This view presents all projects (your user permissions grant you permission to view everything).
TasksOnProjectsDesc=This view presents all tasks on all projects (your user permissions grant you permission to view everything).
-MyTasksDesc=This view is limited to projects or tasks you are a contact for.
+MyTasksDesc=This view is limited to projects or tasks you are a contact for
OnlyOpenedProject=Only open projects are visible (projects in draft or closed status are not visible).
ClosedProjectsAreHidden=Closed projects are not visible.
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index dd3aa856817..8475b607de6 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -345,7 +345,7 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0, $usertoprocess, ($proj
llxHeader("",$title,"",'','','',array('/core/js/timesheet.js'));
-print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num, '', 'title_project');
+//print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num, '', 'title_project');
$param='';
$param.=($mode?'&mode='.$mode:'');
@@ -375,7 +375,7 @@ print '';
print '';
$head=project_timesheet_prepare_head($mode, $usertoprocess);
-dol_fiche_head($head, 'inputperday', '', -1, 'task');
+dol_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, 'task');
// Show description of content
print '
';
+
+ $tmparray = dol_getdate($daytoparse,true); // detail of current day
+ $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.
+ {
+ $cssweekend='weekend';
+ }
+
+ print '
';
+
+ print '
+
+
';
+}
+
if (count($tasksarray) > 0)
{
@@ -565,8 +591,6 @@ if (count($tasksarray) > 0)
}
}
- $colspan = 8;
-
// There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user
if ($isdiff)
{
@@ -605,7 +629,7 @@ if (count($tasksarray) > 0)
$cssweekend='weekend';
}
- print '
';
+
+ 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.
+ {
+ $cssweekend='weekend';
+ }
+
+ print '
';
+ }
+ print '
+
';
+}
+
+
+
// By default, we can edit only tasks we are assigned to
$restrictviewformytask=(empty($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)?1:0);
@@ -584,8 +610,6 @@ if (count($tasksarray) > 0)
}
}
- $colspan=7;
-
// There is a diff between total shown on screen and total spent by user, so we add a line with all other cumulated time of user
if ($isdiff)
{
@@ -632,7 +656,7 @@ if (count($tasksarray) > 0)
$cssweekend='weekend';
}
- print '