diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 177dbf10e46..17807e09fd6 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -39,14 +39,14 @@ if ($user->societe_id > 0) $socid = $user->societe_id; //$result = restrictedArea($user, 'projet', $projectid); if (!$user->rights->projet->lire) accessforbidden(); -$userAccess=0; - $langs->load("users"); $langs->load("projects"); $progress=GETPOST('progress'); $description=GETPOST('description'); +$userAccess=0; + /* * Actions @@ -154,7 +154,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer && (empty($proje { print_fiche_titre($langs->trans("NewTask")); - if ($mesg) print '
'.$mesg.'
'; + dol_htmloutput_errors($mesg); print '
'; print ''; @@ -198,16 +198,14 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer && (empty($proje print ''; print ''; - print ''; - //if (sizeof($tasksarray)) - //{ - print ''; - print '     '; - //} - print ''; - print ''; - print ''; + + print '

'; + print ''; + print '     '; + print ''; + print '
'; + print '
'; } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 87470c74a4d..690284c899c 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2010 Laurent Destailleur + * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ /** * \file htdocs/projet/tasks/task.php * \ingroup projet - * \brief Fiche taches d'un projet + * \brief Page of a project task */ require ("../../main.inc.php"); @@ -29,8 +29,8 @@ require_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php"); -$taskid = (isset($_GET["id"])?$_GET["id"]:(isset($_POST["id"])?$_POST["id"]:'')); -$taskref = (isset($_GET["ref"])?$_GET["ref"]:''); +$taskid = GETPOST("id"); +$taskref = GETPOST("ref"); // Security check $socid=0; @@ -129,7 +129,7 @@ if ($taskid) //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project //$arrayofuseridoftask=$task->getListContactId('internal'); - if ($mesg) print $mesg; + dol_htmloutput_mesg($mesg); $head=task_prepare_head($task); @@ -144,8 +144,6 @@ if ($taskid) print ''; - if ($mesg) print $mesg.'
'; - // Ref print ''; print ''; @@ -191,10 +189,13 @@ if ($taskid) print ''; print ''; - print ''; print '
'.$langs->trans("Ref").''.$task->ref.'
'; - print '   '; - print '
'; + + print '

'; + print '   '; + print ''; + print '
'; + print ''; } else @@ -255,9 +256,15 @@ if ($taskid) print nl2br($task->description); print ''; - print ''; - print ''; + print ''; + + } + dol_fiche_end(); + + + if ($_GET["action"] != 'edit') + { /* * Actions */