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