Skip to content
Snippets Groups Projects
Commit 7365a16d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge tab "tasks" and "mytasks". Now it is just a link to switch on page.

parent 8c0a14fa
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,8 @@ ActionsOnProject=Actions on project
YouAreNotContactOfProject=You are not a contact of this private project
DeleteATimeSpent=Delete time spent
ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent ?
DoNotShowMyTasksOnly=See also tasks i am not affected to
ShowMyTasksOnly=View only tasks i am affected to
##### Types de contacts #####
TypeContact_project_internal_PROJECTLEADER=Project leader
TypeContact_project_external_PROJECTLEADER=Project leader
......
......@@ -74,6 +74,8 @@ ActionsOnProject=Actions sur le projet
YouAreNotContactOfProject=Vous n'êtes pas contact de ce projet privé
DeleteATimeSpent=Suppression du temps consommé
ConfirmDeleteATimeSpent=Êtes-vous sûr de vouloir supprimer ce temps consommé ?
DoNotShowMyTasksOnly=Voir aussi les taches qui ne me sont pas affectées
ShowMyTasksOnly=Ne voir que les taches qui me sont affectées
##### Types de contacts #####
TypeContact_project_internal_PROJECTLEADER=Chef de projet
TypeContact_project_external_PROJECTLEADER=Chef de projet
......
<?php
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -85,12 +85,22 @@ function project_prepare_head($object)
$head[$h][2] = 'tasks';
$h++;
/* Now this is a filter in the Task tab.
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/fiche.php?id='.$object->id.'&mode=mine';
$head[$h][1] = $langs->trans("MyTasks");
$head[$h][2] = 'mytasks';
$h++;
*/
return $head;
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
$head[$h][0] = DOL_URL_ROOT.'/projet/gant/gantview.php?id='.$object->id;
$head[$h][1] = $langs->trans("Gantt");
$head[$h][2] = 'gantt';
$h++;
}
return $head;
}
......
......@@ -42,6 +42,7 @@ $result = restrictedArea($user, 'projet', $projectid);
$userAccess=0;
$langs->load("users");
$langs->load("projects");
/*
......@@ -199,12 +200,11 @@ else
{
/*
* Fiche projet en mode visu
*
*/
$userstatic=new User($db);
$tab='tasks';
if ($_REQUEST["mode"]=='mine') $tab='mytasks';
//if ($_REQUEST["mode"]=='mine') $tab='mytasks';
$head=project_prepare_head($project);
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($project->public?'projectpub':'project'));
......@@ -266,6 +266,23 @@ else
print '<br>';
// Link to switch in "my task" / "all task"
print '<table width="100%"><tr><td align="right">';
if ($_REQUEST["mode"] == 'mine')
{
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">'.$langs->trans("DoNotShowMyTasksOnly").'</a>';
//print ' - ';
//print $langs->trans("ShowMyTaskOnly");
}
else
{
//print $langs->trans("DoNotShowMyTaskOnly");
//print ' - ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'&mode=mine">'.$langs->trans("ShowMyTasksOnly").'</a>';
}
print '</td></tr></table>';
// Get list of tasks in tasksarray and taskarrayfiltered
// We need all tasks (even not limited to a user because a task to user
// can have a parent that is not affected to him).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment