From b1cc6b234ecc2462d0c4474103d65cd1b9e5bf37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Nov 2004 21:15:34 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Quelques=20traductions=20Qual:=20Unifor?= =?UTF-8?q?misation=20de=20la=20gestion=20des=20onglets=20sur=20le=20m=EAm?= =?UTF-8?q?e=20standard.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/contact/fiche.php | 71 +++++++++++++++++++----------------- htdocs/contact/info.php | 37 +++++++++++++------ htdocs/contact/perso.php | 79 ++++++++++++++++++++++++++-------------- 3 files changed, 114 insertions(+), 73 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index e119b90e31c..4083c2d69e1 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -136,34 +136,49 @@ if ($_POST["action"] == 'update') llxHeader(); $form = new Form($db); + +/* + * Onglets + */ +if ($_GET["id"] > 0) +{ + # Si edition contact deja existant + + $contact = new Contact($db); + $contact->fetch($_GET["id"], $user); + + + $h=0; + $head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"]; + $head[$h][1] = "Général"; + $hselected=$h; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"]; + $head[$h][1] = 'Informations personnelles'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"]; + $head[$h][1] = $langs->trans("VCard"); + $h++; + + $head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"]; + $head[$h][1] = $langs->trans("Info"); + $h++; + + dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name); +} + + /* * Confirmation de la suppression du contact * */ if ($_GET["action"] == 'delete') - { - $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],"Supprimer le contact","Êtes-vous sûr de vouloir supprimer ce contact ?","confirm_delete"); - } - - - -/* - * Onglets - */ -print '
'; -if ($_GET["id"] > 0) { - # Si edition contact deja existant - print 'Général'; - print 'Informations personnelles'; - print 'VCard'; - print 'Info'; + $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],"Supprimer le contact","Êtes-vous sûr de vouloir supprimer ce contact ?","confirm_delete"); + print '
'; } -else { - print 'Général'; -} -print '
'; - // Affiche les erreurs if (sizeof($error)) @@ -174,8 +189,6 @@ if (sizeof($error)) } -print '
'; - if ($_GET["socid"] > 0) { $objsoc = new Societe($db); @@ -203,7 +216,7 @@ if ($_GET["action"] == 'create') print ''; } - print 'Titre'; + print ''.$langs->trans("Title").''; print $form->select_civilite($obj->civilite); print ''; @@ -239,11 +252,7 @@ if ($_GET["action"] == 'create') elseif ($_GET["action"] == 'edit') { // Fiche en mode edition - print '
'; - $contact = new Contact($db); - $contact->fetch($_GET["id"], $user); - print '
'; print ''; print ''; @@ -300,12 +309,6 @@ else * */ - $contact = new Contact($db); - $contact->fetch($_GET["id"], $user); - - print_fiche_titre ($langs->trans("Contact")." : ". $contact->firstname.' '.$contact->name); - - print ''; if ($contact->socid > 0) diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 0a0a62681cc..c3fee03f05c 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -36,25 +36,40 @@ $langs->load("company"); llxHeader(); -print '
'; -print 'Général'; -print 'Informations personnelles'; -print 'VCard'; -print 'Info'; -print '
'; -print '
'; + +$contact = new Contact($db); +$contact->fetch($_GET["id"], $user); + + +$h=0; +$head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"]; +$head[$h][1] = "Général"; +$h++; + +$head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"]; +$head[$h][1] = 'Informations personnelles'; +$h++; + +$head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"]; +$head[$h][1] = $langs->trans("VCard"); +$h++; + +$head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"]; +$head[$h][1] = $langs->trans("Info"); +$hselected=$h; +$h++; + +dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name); /* * Visualisation de la fiche * */ -$contact = new Contact($db); -$contact->fetch($_GET["id"], $user); +print '
'; $contact->info($_GET["id"]); +print '
'; -print_fiche_titre ($langs->trans("Contact")." : ". $contact->firstname.' '.$contact->name); - if ($contact->socid > 0) { $objsoc = new Societe($db); diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index a892f3901a1..f71d0581e9d 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -20,10 +20,21 @@ * $Source$ * */ + +/*! + \file htdocs/contact/perso.php + \ingroup companies + \brief Onglet informations personnelles d'un contact + \version $Revision$ +*/ + require("./pre.inc.php"); require("../contact.class.php"); require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php"); +$langs->load("companies"); + + if ($_POST["action"] == 'update') { $contact = new Contact($db); @@ -31,7 +42,7 @@ if ($_POST["action"] == 'update') if ($_POST["birthdayyear"]) { if ($_POST["birthdayyear"]<=1970 && $_SERVER["WINDIR"]) { - # windows mktime does not support negative date timestamp so birthday is not support for old persons + # windows mktime does not support negative date timestamp so birthday is not supported for old persons $contact->birthday = $_POST["birthdayyear"].'-'.$_POST["birthdaymonth"].'-'.$_POST["birthdayday"]; //array_push($error,"Windows ne sachant pas gérer des dates avant 1970, les dates de naissance avant cette date ne seront pas sauvegardées"); } else { @@ -50,22 +61,34 @@ if ($_POST["action"] == 'update') */ llxHeader(); -print '
'; -print 'Général'; -print 'Informations personnelles'; -print 'VCard'; -print 'Info'; -print '
'; -print '
'; +$contact = new Contact($db); +$contact->fetch($_GET["id"], $user); + + +$h=0; +$head[$h][0] = DOL_URL_ROOT.'fiche.php?id='.$_GET["id"]; +$head[$h][1] = "Général"; +$h++; + +$head[$h][0] = DOL_URL_ROOT.'perso.php?id='.$_GET["id"]; +$head[$h][1] = 'Informations personnelles'; +$hselected=$h; +$h++; + +$head[$h][0] = DOL_URL_ROOT.'vcard.php?id='.$_GET["id"]; +$head[$h][1] = $langs->trans("VCard"); +$h++; + +$head[$h][0] = DOL_URL_ROOT.'info.php?id='.$_GET["id"]; +$head[$h][1] = $langs->trans("Info"); +$h++; + +dolibarr_fiche_head($head, $hselected, $contact->firstname.' '.$contact->name); + if ($_GET["action"] == 'edit') { // Fiche info perso en mode edition - - $contact = new Contact($db); - $contact->fetch($_GET["id"], $user); - - print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name); print ''; print ''; @@ -76,12 +99,12 @@ if ($_GET["action"] == 'edit') $objsoc = new Societe($db); $objsoc->fetch($contact->socid); - print 'Société : '.$objsoc->nom_url.'
'; + print $langs->trans("Company").' : '.$objsoc->nom_url.'
'; } - print 'Nom : '.$contact->name.' '.$contact->firstname ."
"; + print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."
"; - print ''; + print '
'; $html = new Form($db); @@ -96,14 +119,14 @@ if ($_GET["action"] == 'edit') print ''; + print ''; } else { - print ''; + print ''; } - print "
Alerte : '; if ($contact->birthday_alert) { - print '
"; + print ""; print '
'; @@ -115,18 +138,14 @@ else * Visualisation de la fiche * */ + print '
'; - $contact = new Contact($db); - $contact->fetch($_GET["id"], $user); - - print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name); - if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); - print 'Société : '.$objsoc->nom_url.'
'; + print $langs->trans("Company").' : '.$objsoc->nom_url.'
'; } if ($contact->birthday && $contact->birthday > 0) { @@ -137,7 +156,12 @@ else else print ' (alerte anniversaire inactive)
'; } + else { + print 'Date de naissance : '.$langs->trans("Unknown")."
"; + } + print "
"; + print "
"; print "
"; @@ -148,12 +172,11 @@ else print ''.$langs->trans('Edit').''; - print ''.$langs->trans('Delete').''; - print "
"; } } - $db->close(); + +$db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>