From 522b0eb1b8d8f15a12b120adbd658004dd602a6d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Sep 2008 11:36:13 +0000 Subject: [PATCH] New: Some enhancements in project module --- htdocs/langs/en_US/main.lang | 1 + htdocs/langs/en_US/projects.lang | 6 +++ htdocs/langs/fr_FR/main.lang | 1 + htdocs/langs/fr_FR/projects.lang | 8 ++- htdocs/projet/tasks/fiche.php | 91 +++++++++++++++----------------- 5 files changed, 57 insertions(+), 50 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index ad8589e192f..d3c8e3111d7 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -72,6 +72,7 @@ Home=Home Help=Help Always=Always Never=Never +Under=under Period=Period Activate=Activate Activated=Activated diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 1b4af643716..03a03a26179 100755 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -18,10 +18,16 @@ Mytasks=My tasks Tasks=Tasks Task=Task NewTask=New task +AddTask=Add task AddDuration=Add duration Activity=Activity MyActivity=My activity DurationEffective=Effective duration +Time=Time ListProposalsAssociatedProject=Lists of the commercial proposals associated with the project ListOrdersAssociatedProject=Lists of the orders associated with the project ListInvoicesAssociatedProject=Lists of the invoices associated with the project +ActivityOnProjectThisWeek=Activity on project this week +ActivityOnProjectThisMonth=Activity on project this month +ActivityOnProjectThisYear=Activity on project this year +ChildOfTaks=child of task \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 74752018d0e..b471039f838 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -72,6 +72,7 @@ Home=Accueil Help=Aide Always=Toujours Never=Jamais +Under=sous Period=Période Activate=Activer Activated=Activé diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 08c87980da2..6e9fa0c8019 100755 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -18,12 +18,18 @@ Mytasks=Mes t Tasks=Tâches Task=Tâche NewTask=Nouvelle tâche +AddTask=Créer tâche AddDuration=Ajouter la durée Activity=Activité MyActivity=Mon activité DurationEffective=Durée effective +Time=Temps ListProposalsAssociatedProject=Liste des propositions commerciales associées au projet ListOrdersAssociatedProject=Liste des commandes associées au projet ListInvoicesAssociatedProject=Liste des factures associées au projet ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associées au projet -ListSupplierInvoicesAssociatedProject=Liste des factures fournisseur associées au projet \ No newline at end of file +ListSupplierInvoicesAssociatedProject=Liste des factures fournisseur associées au projet +ActivityOnProjectThisWeek=Activité sur les projets cette semaine +ActivityOnProjectThisMonth=Activité sur les projets ce mois +ActivityOnProjectThisYear=Activité sur les projets cette année +ChildOfTaks=fille de la tache \ No newline at end of file diff --git a/htdocs/projet/tasks/fiche.php b/htdocs/projet/tasks/fiche.php index 23e8907556b..a2155c6064d 100644 --- a/htdocs/projet/tasks/fiche.php +++ b/htdocs/projet/tasks/fiche.php @@ -19,21 +19,17 @@ */ /** - \file htdocs/projet/tasks/fiche.php - \ingroup projet - \brief Fiche taches d'un projet - \version $Id$ + * \file htdocs/projet/tasks/fiche.php + * \ingroup projet + * \brief Fiche taches d'un projet + * \version $Id$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php"); -/* - * Securite acces client - */ $projetid=''; -if ($_GET["id"]) { $projetid=$_GET["id"]; } - +$projetid=isset($_GET["id"])?$_GET["id"]:$_POST["projetid"]; if ($projetid == '') accessforbidden(); // Security check @@ -179,30 +175,39 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer) llxHeader("",$langs->trans("Tasks"),"Tasks"); +$projet = new Project($db); +$projet->fetch($_GET["id"]); +$projet->societe->fetch($projet->societe->id); + if ($_GET["action"] == 'create' && $user->rights->projet->creer) { print_titre($langs->trans("NewTask")); - + print '
'; + + $tasksarray=$projet->getTasksArray(); + if ($mesg) print $mesg; - print '
'; - + print ''; + print ''; + print ''; - print ''; - - print ''; - print ''; - - print ''; - - print ''; - - print ''; + print '
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'.$langs->trans("Company").''; - $societe = new Societe($db); - $societe->fetch($_GET["socid"]); - print $societe->getNomUrl(1); + + print '
'.$langs->trans("NewTask").''; + print ' '; + if ($tasksarray) + { + print '   '.$langs->trans("ChildOfTaks").'   '; + + print ''; + } + print '   '; print '
'.$langs->trans("Author").''.$user->fullname.'
'; print '
'; @@ -213,18 +218,12 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer) * */ - $projet = new Project($db); - $projet->fetch($_GET["id"]); - $projet->societe->fetch($projet->societe->id); - $head=project_prepare_head($projet); dolibarr_fiche_head($head, 'tasks', $langs->trans("Project")); - print '
'; - print ''; print ''; - + print ''; print ''; @@ -233,22 +232,10 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer) $tasksrole=$projet->getTasksRoleForUser($user); $tasksarray=$projet->getTasksArray(); - - /* Nouvelle tache */ - print ''; - - print '
'.$langs->trans("Ref").''.$projet->ref.'
'.$langs->trans("Label").''.$projet->title.'
'.$langs->trans("NewTask").''; - print ' '; - if ($tasksarray) - { - print ''; - } - print ' '; - print '

'; - + + print ''; + print '
'; + print '
'; print ''; @@ -266,7 +253,13 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer) print ""; print ''; - + + /* + * Actions + */ + print '
'; + print ''.$langs->trans('AddTask').''; + print '
'; } $db->close();