From 8f160503ba29eeb35c08da51d7292e8f996a603e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 5 Nov 2007 18:35:45 +0000 Subject: [PATCH] Look: Uniformisation fiches avec ref --- htdocs/contact/exportimport.php | 21 ++++++++----- htdocs/contact/fiche.php | 56 ++++++++++++++++++--------------- htdocs/contact/info.php | 6 ++-- htdocs/contact/ldap.php | 42 +++++++++++++------------ htdocs/contact/perso.php | 40 ++++++++++++++++------- htdocs/contact/vcard.php | 1 - 6 files changed, 96 insertions(+), 70 deletions(-) diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index 259a3a4f59f..941333b8091 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006 Regis Houssin +/* Copyright (C) 2006-2007 Laurent Destailleur + * Copyright (C) 2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -86,7 +85,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'exportimport', $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); +dolibarr_fiche_head($head, 'exportimport', $langs->trans("Contact")); /* @@ -94,6 +93,16 @@ dolibarr_fiche_head($head, 'exportimport', $langs->trans("Contact").": ".$contac */ print ''; +// Ref +print ''; + +// Name +print ''; +print ''; + +// Company if ($contact->socid > 0) { $objsoc = new Societe($db); @@ -108,13 +117,11 @@ else print ''; } +// Civility print ''; -print ''; -print ''; - print '
'.$langs->trans("Ref").''; +print $form->showrefnav($contact,'id'); +print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'.$langs->trans("UserTitle").''; print $form->civilite_name($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'; print ''; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index a62e53215ef..a9d7e6597e5 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke @@ -20,7 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -244,7 +243,7 @@ if ($_GET["id"] > 0) */ $head = contact_prepare_head($contact); - dolibarr_fiche_head($head, 'general', $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); + dolibarr_fiche_head($head, 'general', $langs->trans("Contact")); } @@ -284,6 +283,11 @@ if ($user->rights->societe->contact->creer) print ''; print ''; + // Name + print ''; + print ''; + + // Company if ($socid) { // On remplit avec le numéro de la société par défaut @@ -304,13 +308,11 @@ if ($user->rights->societe->contact->creer) print ''; } + // Civility print ''; - print ''; - print ''; - print ''; print ''; @@ -362,33 +364,27 @@ if ($user->rights->societe->contact->creer) print ''; print '
'.$langs->trans("Lastname").''.$langs->trans("Firstname").'
'.$langs->trans("UserTitle").''; print $form->select_civilite($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$langs->trans("Firstname").'
'.$langs->trans("PostOrFunction").'
'.$langs->trans("Address").'
'; + // Ref + print ''; + + // Name + print ''; + print ''; + + // Company print ''; print ''; print ''; -/* - if ($contact->socid > 0) - { - $objsoc = new Societe($db); - $objsoc->fetch($contact->socid); - print ''; - } - else - { - print ''; - } -*/ + // Civility print ''; - print ''; - print ''; - print ''; print ''; @@ -489,6 +485,16 @@ if ($_GET["id"] && $_GET["action"] != 'edit') print '
'.$langs->trans("Ref").''; + print $contact->id; + print '
'.$langs->trans("Lastname").''.$langs->trans("Firstname").'
'.$langs->trans("Company").''; print $form->select_societes($contact->socid?$contact->socid:-1,'socid','',1); print '
'.$langs->trans("Company").''.$objsoc->getNomUrl(1).'
'.$langs->trans("Company").''; - print $langs->trans("ContactNotLinkedToCompany"); - print '
'.$langs->trans("UserTitle").''; print $form->select_civilite($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$langs->trans("Firstname").'
Poste/Fonction
'.$langs->trans("Address").'
'; + // Ref + print ''; + + // Name + print ''; + print ''; + + // Company if ($contact->socid > 0) { $objsoc = new Societe($db); @@ -503,13 +509,11 @@ if ($_GET["id"] && $_GET["action"] != 'edit') print ''; } + // Civility print ''; - print ''; - print ''; - print ''; print ''; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 5bf70dcb468..738aac8dac3 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,8 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ - * */ /** @@ -85,7 +83,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'info', $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); +dolibarr_fiche_head($head, 'info', $langs->trans("Contact")); /* diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 94d693732d2..20839f0070b 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006 Regis Houssin +/* Copyright (C) 2006-2007 Laurent Destailleur + * Copyright (C) 2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -36,6 +35,7 @@ $user->getrights('commercial'); $langs->load("companies"); $langs->load("ldap"); +$langs->load("admin"); // Protection quand utilisateur externe $contactid = isset($_GET["id"])?$_GET["id"]:''; @@ -88,8 +88,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'ldap', $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); - +dolibarr_fiche_head($head, 'ldap', $langs->trans("Contact")); /* @@ -97,42 +96,45 @@ dolibarr_fiche_head($head, 'ldap', $langs->trans("Contact").": ".$contact->first */ print '
'.$langs->trans("Ref").''; + print $form->showrefnav($contact,'id'); + print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'.$langs->trans("UserTitle").''; print $form->civilite_name($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
Poste/Fonction'.$contact->poste.'
'.$langs->trans("Address").''.$contact->address.'
'; +// Ref +print ''; + +// Name +print ''; +print ''; + +// Company if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); - print ''; + print ''; } else { - print ''; } +// Civility print ''; -// Nom -print ''; - -// Prenom -print ''; - -$langs->load("admin"); - // LDAP DN -print '\n"; +print '\n"; // LDAP Clé -print '\n"; +print '\n"; // LDAP Server -print '\n"; -print '\n"; -print '\n"; +print '\n"; +print '\n"; +print '\n"; print '
'.$langs->trans("Ref").''; +print $form->showrefnav($contact,'id'); +print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'.$langs->trans("Company").''.$objsoc->getNomUrl(1).'
'.$langs->trans("Company").''.$objsoc->getNomUrl(1).'
'.$langs->trans("Company").''; + print '
'.$langs->trans("Company").''; print $langs->trans("ContactNotLinkedToCompany"); print '
'.$langs->trans("UserTitle").''; print $form->civilite_name($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$contact->name.'
'.$langs->trans("Firstname").''.$contact->firstname.'
LDAP '.$langs->trans("LDAPContactDn").''.$conf->global->LDAP_CONTACT_DN."
LDAP '.$langs->trans("LDAPContactDn").''.$conf->global->LDAP_CONTACT_DN."
LDAP '.$langs->trans("LDAPNamingAttribute").''.$conf->global->LDAP_KEY_CONTACTS."
LDAP '.$langs->trans("LDAPNamingAttribute").''.$conf->global->LDAP_KEY_CONTACTS."
LDAP '.$langs->trans("LDAPPrimaryServer").''.$conf->global->LDAP_SERVER_HOST."
LDAP '.$langs->trans("LDAPSecondaryServer").''.$conf->global->LDAP_SERVER_HOST_SLAVE."
LDAP '.$langs->trans("LDAPServerPort").''.$conf->global->LDAP_SERVER_PORT."
LDAP '.$langs->trans("LDAPPrimaryServer").''.$conf->global->LDAP_SERVER_HOST."
LDAP '.$langs->trans("LDAPSecondaryServer").''.$conf->global->LDAP_SERVER_HOST_SLAVE."
LDAP '.$langs->trans("LDAPServerPort").''.$conf->global->LDAP_SERVER_PORT."
'; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 0439d462585..4e1e66f6d92 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -101,7 +100,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dolibarr_fiche_head($head, 'perso', $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name); +dolibarr_fiche_head($head, 'perso', $langs->trans("Contact")); @@ -117,7 +116,17 @@ if ($_GET["action"] == 'edit') print ''; print ''; - if ($contact->socid > 0) + // Ref + print ''.$langs->trans("Ref").''; + print $contact->id; + print ''; + + // Name + print ''.$langs->trans("Lastname").''.$contact->nom.''; + print ''.$langs->trans("Firstname").''.$contact->prenom.''; + + // Company + if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); @@ -131,14 +140,12 @@ if ($_GET["action"] == 'edit') print ''; } + // Civility print ''.$langs->trans("UserTitle").''; print $form->civilite_name($contact->civilite_id); print ''; - print ''.$langs->trans("Lastname").''.$contact->nom.''; - print ''.$langs->trans("Firstname").''.$contact->prenom.''; - - + // Birthday print ''.$langs->trans("BirthdayDate").''; $html=new Form($db); if ($contact->birthday) @@ -174,7 +181,17 @@ else */ print ''; - if ($contact->socid > 0) + // Ref + print ''; + + // Name + print ''; + print ''; + + // Company + if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); @@ -189,13 +206,12 @@ else print ''; } + // Civility print ''; - print ''; - print ''; - + // Birthday if ($contact->birthday) { print '
'.$langs->trans("Ref").''; + print $form->showrefnav($contact,'id'); + print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'.$langs->trans("UserTitle").''; print $form->civilite_name($contact->civilite_id); print '
'.$langs->trans("Lastname").''.$contact->name.''.$langs->trans("Firstname").''.$contact->firstname.'
'.$langs->trans("BirthdayDate").''.dolibarr_print_date($contact->birthday,"day"); diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index a2bcbb7601d..999459a2dcc 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -17,7 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /**