';
- print '| '.$langs->trans("Note").' | ';
+ print ''.$langs->trans("Date").' | ';
print ''.$langs->trans("By").' | ';
- print ''.$langs->trans("Date").' | ';
+ print ''.$langs->trans("Note").' | ';
print ''.$langs->trans("Duration").' | ';
- print ' | ';
+ print ' | ';
print "
\n";
foreach ($tasks as $task_time)
{
$var=!$var;
print "";
-
- // Note
- print '| ';
+
+ // Date
+ print ' | ';
+ if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
+ {
+ print $html->select_date($db->jdate($task_time->task_date),'timeline','','','',"timespent_date");
+ }
+ else
+ {
+ print dol_print_date($db->jdate($task_time->task_date),'day');
+ }
+ print ' | ';
+
+ // User
+ $user->id = $task_time->fk_user;
+ $user->nom = $task_time->name;
+ $user->prenom = $task_time->firstname;
+ print ''.$user->getNomUrl(1).' | ';
+
+ // Note
+ print '';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
{
print '';
@@ -249,25 +290,7 @@ if ($_GET["id"] > 0)
print dol_nl2br($task_time->note);
}
print ' | ';
-
- // User
- $user->id = $task_time->fk_user;
- $user->nom = $task_time->name;
- $user->prenom = $task_time->firstname;
- print ''.$user->getNomUrl(1).' | ';
- // Date
- print '';
- if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
- {
- print $html->select_date($task_time->task_date,'timeline','','','',"timespent_date");
- }
- else
- {
- print dol_print_date($db->jdate($task_time->task_date),'%A').' '.dol_print_date($db->jdate($task_time->task_date),'daytext');
- }
- print ' | ';
-
// Time spent
print '';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
@@ -276,16 +299,12 @@ if ($_GET["id"] > 0)
}
else
{
- // TODO add function
- $hour = intval($task_time->task_duration);
- $minutes = round((($task_time->task_duration - $hour) * 60),0);
- $minutes = substr("00"."$minutes", -2);
- print $hour." h ".$minutes;
+ print ConvertSecondToTime($task_time->task_duration,'all');
}
print ' | ';
-
+
// Edit and delete icon
- print '';
+ print ' | ';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
{
print '';
@@ -298,14 +317,14 @@ if ($_GET["id"] > 0)
print 'id.'&action=editline&lineid='.$task_time->rowid.'">';
print img_edit();
print '';
-
+
print ' ';
print 'id.'&action=deleteline&lineid='.$task_time->rowid.'">';
print img_delete();
print '';
}
print ' | ';
-
+
print "
\n";
}