From b3260333340718f6b1a7ac7124fb6af5258a0733 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Jan 2010 13:32:09 +0000 Subject: [PATCH] Some fix in contact's projects --- ChangeLog | 9 ++++++--- htdocs/langs/en_US/projects.lang | 3 ++- htdocs/langs/fr_FR/projects.lang | 3 ++- htdocs/projet/contact.php | 23 ++++++++++++++--------- htdocs/projet/fiche.php | 2 +- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19a0d6f2c9b..bd078e9937d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,10 +4,13 @@ English Dolibarr ChangeLog ***** ChangeLog for 2.8 compared to 2.7 ***** For users: +- New: Can link contacts to projects +- New: Can removed attached file on email form if attachment was wrong. +- New: Add option to show your logo on top of left menu. - New: task #9935: Can edit accountancy code. -- New: Add an option to make users email reuired. -- New: Module notification can send mail on order or proposal validation. -- New: Can use any antivirus on file upload. +- New: Add an option to make users email required. +- New: Module notification can send email on order or proposal validation. +- New: Can use any command line antivirus on file upload. - New: A customer can also be a prospect. - New: task #9802 : Can link an action to a project and use project to filter agenda. diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 7154d4b5d53..3984e832455 100755 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -58,4 +58,5 @@ ConfirmValidateProject=Are you sure you want to validate this project ? CloseAProject=Close project ConfirmCloseAProject=Are you sure you want to close this project ? ReOpenAProject=Open project -ConfirmReOpenAProject=Are you sure you want to re-open this project ? \ No newline at end of file +ConfirmReOpenAProject=Are you sure you want to re-open this project ? +ProjectContact=Project contacts \ No newline at end of file diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 34e7303376c..ca56f214169 100755 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -58,4 +58,5 @@ ConfirmValidateProject=Etes-vous sur de vouloir valider ce projet ? CloseAProject=Clore projet ConfirmCloseAProject=Etes-vous sur de vouloir clore ce projet ? ReOpenAProject=Réouvrir projet -ConfirmReOpenAProject=Etes-vous sur de vouloir rouvrir ce projet ? \ No newline at end of file +ConfirmReOpenAProject=Etes-vous sur de vouloir rouvrir ce projet ? +ProjectContact=Contacts projet \ No newline at end of file diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 5d4b4b32950..d3b146309bf 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -40,9 +40,10 @@ $result = restrictedArea($user, 'projet', $projectid); /* - * Ajout d'un nouveau contact + * Actions */ +// Add new contact if ($_POST["action"] == 'addcontact' && $user->rights->projet->creer) { @@ -166,12 +167,12 @@ $id = $_GET['id']; $ref= $_GET['ref']; if ($id > 0 || ! empty($ref)) { - $project = New Project($db); - + $project = new Project($db); + if ( $project->fetch($id,$ref) > 0) { - $soc = new Societe($db, $project->socid); - $soc->fetch($project->socid); + if ($project->societe->id > 0) $result=$project->societe->fetch($project->societe->id); + if ($project->user_resp_id > 0) $result=$project->fetch_user($project->user_resp_id); $head = project_prepare_head($project); @@ -186,15 +187,19 @@ if ($id > 0 || ! empty($ref)) //$linkback="".$langs->trans("BackToList").""; // Ref - print ''.$langs->trans('Ref').''; + print ''.$langs->trans('Ref').''; print $html->showrefnav($project,'ref',$linkback,1,'ref','ref',''); print ''; + // Label + print ''.$langs->trans("Label").''.$project->title.''; + // Customer - if ( is_null($project->client) ) - $project->fetch_client(); print "".$langs->trans("Company").""; - print ''.$project->client->getNomUrl(1).''; + print ''; + if ($project->societe->id > 0) print $project->societe->getNomUrl(1); + else print ' '; + print ''; print ""; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 6c67cd4f637..745b588b3b6 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -318,7 +318,7 @@ else // Label print ''.$langs->trans("Label").''; - // Client + // Customer print ''.$langs->trans("Company").''; print $html->select_societes($projet->societe->id,'socid','',1,1); print '';