Minor enhancements in project module
This commit is contained in:
parent
31fe1652db
commit
68ccad2f7f
@ -156,14 +156,10 @@ function PLinesb(&$inc, $parent, $lines, &$level, $tasksrole)
|
||||
$var = !$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
|
||||
print "<td>";
|
||||
$projectstatic->id=$lines[$i]->projectid;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
print "<td>".$lines[$i]->id."</td>";
|
||||
// Ref
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'">'.$lines[$i]->id.'</a></td>';
|
||||
|
||||
// Label task
|
||||
print "<td>";
|
||||
|
||||
for ($k = 0 ; $k < $level ; $k++)
|
||||
@ -171,22 +167,29 @@ function PLinesb(&$inc, $parent, $lines, &$level, $tasksrole)
|
||||
print " ";
|
||||
}
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/task.php?id='.$lines[$i]->id.'">'.$lines[$i]->title."</a></td>\n";
|
||||
print $lines[$i]->title;
|
||||
print "</td>\n";
|
||||
|
||||
// Project
|
||||
print "<td>";
|
||||
$projectstatic->id=$lines[$i]->projectid;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print "</td>";
|
||||
|
||||
$heure = intval($lines[$i]->duration);
|
||||
$minutes = round((($lines[$i]->duration - $heure) * 60),0);
|
||||
$minutes = substr("00"."$minutes", -2);
|
||||
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
if ($tasksrole[$lines[$i]->id] == 'admin')
|
||||
{
|
||||
print '<td>';
|
||||
print '<input size="4" type="text" class="flat" name="task'.$lines[$i]->id.'" value="">';
|
||||
print ' <input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</td>';
|
||||
print "<td>";
|
||||
print '<td nowrap="nowrap">';
|
||||
print $form->select_date('',$lines[$i]->id,'','','',"addtime");
|
||||
print ' <input size="4" type="text" class="flat" name="task'.$lines[$i]->id.'" value="">';
|
||||
print ' <input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "<td> ";
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@ -242,15 +245,15 @@ function PLines(&$inc, $parent, $lines, &$level, $var, $showproject=1)
|
||||
|
||||
print "<tr ".$bc[$var].">\n";
|
||||
|
||||
print "<td>".$lines[$i]->id."</td>";
|
||||
print '<td><a href="task.php?id='.$lines[$i]->id.'">'.$lines[$i]->id.'</a></td>';
|
||||
|
||||
print "<td>";
|
||||
for ($k = 0 ; $k < $level ; $k++)
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
|
||||
print '<a href="task.php?id='.$lines[$i]->id.'">'.$lines[$i]->title."</a></td>\n";
|
||||
print $lines[$i]->title;
|
||||
print "</td>\n";
|
||||
|
||||
if ($showproject)
|
||||
{
|
||||
@ -264,7 +267,7 @@ function PLines(&$inc, $parent, $lines, &$level, $var, $showproject=1)
|
||||
$heure = intval($lines[$i]->duration);
|
||||
$minutes = round((($lines[$i]->duration - $heure) * 60),0);
|
||||
$minutes = substr("00"."$minutes", -2);
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
print '<td align="right"><a href="task.php?id='.$lines[$i]->id.'">'.$heure." h ".$minutes.'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -126,9 +126,9 @@ print '<input type="hidden" name="action" value="addtime">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td>'.$langs->trans("RefTask").'</td>';
|
||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("AddDuration").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/projet/tasks/task.php
|
||||
* \ingroup projet
|
||||
* \brief Fiche tâches d'un projet
|
||||
* \brief Fiche t<EFBFBD>ches d'un projet
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
@ -112,7 +112,7 @@ if ($_GET["id"] > 0)
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
/* Liste des tâches */
|
||||
/* List of time spent */
|
||||
|
||||
$sql = "SELECT t.task_date, t.task_duration, t.fk_user, u.login, u.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t";
|
||||
@ -163,16 +163,25 @@ if ($_GET["id"] > 0)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
||||
print '<td align="right">'.$langs->trans("User").'</td>';
|
||||
print '<td align="right">'.$langs->trans("By").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($tasks as $task_time)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.dolibarr_print_date($db->jdate($task_time->task_date),'day').'</td>';
|
||||
print '<td align="right">'.$task_time->task_duration.'</td>';
|
||||
$user->id=$task_time->rowid;
|
||||
|
||||
// Date
|
||||
print '<td>'.dolibarr_print_date($db->jdate($task_time->task_date),'day').' '.dolibarr_print_date($db->jdate($task_time->task_date),'%A').'</td>';
|
||||
|
||||
// Time spent
|
||||
$heure = intval($task_time->task_duration);
|
||||
$minutes = round((($task_time->task_duration - $heure) * 60),0);
|
||||
$minutes = substr("00"."$minutes", -2);
|
||||
print '<td align="right">'.$heure." h ".$minutes."</td>\n";
|
||||
|
||||
// User
|
||||
$user->id=$task_time->rowid;
|
||||
$user->nom=$task_time->login;
|
||||
print '<td align="right">'.$user->getNomUrl(1).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user