Fix: Show project when task is view as a standalone card.
This commit is contained in:
parent
c614c7d84a
commit
8f56d2d798
@ -37,6 +37,7 @@ $taskid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$id = GETPOST('id');
|
||||
$ref= GETPOST('ref');
|
||||
$action=GETPOST('action');
|
||||
$withproject=GETPOST('withproject');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -143,7 +144,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if (GETPOST('withproject'))
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
@ -224,17 +225,19 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$task->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
$id = GETPOST('id');
|
||||
$ref= GETPOST('ref');
|
||||
$withproject=GETPOST('withproject');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -137,7 +138,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if (GETPOST('withproject'))
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
@ -219,16 +220,18 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $projectstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Files infos
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
|
||||
@ -33,6 +33,7 @@ $mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||
$id = GETPOST('id');
|
||||
$ref= GETPOST('ref');
|
||||
$withproject=GETPOST('withproject');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -107,7 +108,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if (GETPOST('withproject'))
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
@ -180,18 +181,20 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$task->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id > 0) print $project->societe->getNomUrl(1);
|
||||
else print' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Note publique
|
||||
// Note public
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||
print '<td valign="top" colspan="3">';
|
||||
if ($action == 'edit')
|
||||
@ -209,7 +212,7 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
// Note privee
|
||||
// Note private
|
||||
if (! $user->societe_id)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||
|
||||
@ -129,7 +129,7 @@ if ($taskid)
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if (GETPOST('withproject'))
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
@ -229,16 +229,18 @@ if ($taskid)
|
||||
print '<td><input size="30" name="label" value="'.$task->label.'"></td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Task parent
|
||||
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
||||
@ -280,8 +282,8 @@ if ($taskid)
|
||||
/*
|
||||
* Fiche tache en mode visu
|
||||
*/
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$param=($withproject?'&withproject=1':'');
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
@ -309,16 +311,18 @@ if ($taskid)
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="3">';
|
||||
|
||||
@ -36,6 +36,7 @@ $taskid = isset($_GET["id"])?$_GET["id"]:'';
|
||||
$id = GETPOST('id');
|
||||
$ref= GETPOST('ref');
|
||||
$action=GETPOST('action');
|
||||
$withproject=GETPOST('withproject');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -166,7 +167,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$userWrite = $project->restrictedProjectArea($user,'write');
|
||||
|
||||
if (GETPOST('withproject'))
|
||||
if ($withproject)
|
||||
{
|
||||
// Tabs for project
|
||||
$tab='tasks';
|
||||
@ -227,8 +228,8 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$param=(GETPOST('withproject')?'&withproject=1':'');
|
||||
$linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
$param=($withproject?'&withproject=1':'');
|
||||
$linkback=$withproject?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id.'">'.$langs->trans("BackToList").'</a>':'';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">';
|
||||
@ -247,16 +248,18 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$task->label.'</td></tr>';
|
||||
|
||||
// Project
|
||||
/*print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
if (empty($withproject))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
print $project->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
// Third party
|
||||
print '<td>'.$langs->trans("Company").'</td><td>';
|
||||
if ($project->societe->id) print $project->societe->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user