diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 24d589cf659..f670c7b4a6d 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -160,12 +160,12 @@ if ($_GET["id"] > 0) $h=0; $head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$_GET["id"]; - $head[$h][1] = "Général"; + $head[$h][1] = $langs->trans("General"); $hselected=$h; $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$_GET["id"]; - $head[$h][1] = 'Informations personnelles'; + $head[$h][1] = $langs->trans("PersonalInformations"); $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"]; @@ -196,9 +196,13 @@ if ($_GET["socid"] > 0) $objsoc->fetch($_GET["socid"]); } + if ($_GET["action"] == 'create') { - // Fiche en mode creation + /* + * Fiche en mode creation + * + */ print '
'; print "
"; @@ -252,7 +256,10 @@ if ($_GET["action"] == 'create') } elseif ($_GET["action"] == 'edit') { - // Fiche en mode edition + /* + * Fiche en mode edition + * + */ print ''; print ''; @@ -403,66 +410,61 @@ else print "
"; } -} -// Historique des actions vers ce contact -print_titre ("Historique des actions pour ce contact"); - -print ''; - -print ""; -print ""; -print ""; - -$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; -$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; -$sql .= " WHERE fk_contact = ".$contact->id; -$sql .= " AND u.rowid = a.fk_user_author"; -$sql .= " AND c.id=a.fk_action "; - -if ($contactid) -{ - $sql .= " AND fk_contact = $contactid"; -} -$sql .= " ORDER BY a.datea DESC, a.id DESC"; - -if ( $db->query($sql) ) -{ - $i = 0 ; $num = $db->num_rows(); $tag = True; - while ($i < $num) + // Historique des actions vers ce contact + print_titre ("Historique des actions pour ce contact"); + + print '
".$langs->trans("Date")."".$langs->trans("Actions")."".$langs->trans("CreatedBy")."
'; + + print ""; + print ""; + print ""; + + $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql .= " WHERE fk_contact = ".$contact->id; + $sql .= " AND u.rowid = a.fk_user_author"; + $sql .= " AND c.id=a.fk_action "; + + if ($contactid) { - $obj = $db->fetch_object(); - $var=!$var; - print ""; - - print ""; - if ($obj->propalrowid) - { - print ""; - } - else - { - print ""; - } - - print ""; - print "\n"; - $i++; - $tag = !$tag; + $sql .= " AND fk_contact = $contactid"; } -} -else -{ - dolibarr_print_error($db); -} -print "
".$langs->trans("Date")."".$langs->trans("Actions")."".$langs->trans("CreatedBy")."
". strftime("%d %b %Y %H:%M", $obj->da) ."propalrowid\">$obj->libelle$obj->libelle$obj->code 
"; + $sql .= " ORDER BY a.datea DESC, a.id DESC"; + + if ( $db->query($sql) ) + { + $i = 0 ; $num = $db->num_rows(); $tag = True; + while ($i < $num) + { + $obj = $db->fetch_object(); + $var=!$var; + print ""; + + print "". strftime("%d %b %Y %H:%M", $obj->da) .""; + if ($obj->propalrowid) + { + print "propalrowid\">$obj->libelle"; + } + else + { + print "$obj->libelle"; + } + + print "$obj->code "; + print "\n"; + $i++; + $tag = !$tag; + } + } + else + { + dolibarr_print_error($db); + } + print ""; - - - - - +} $db->close(); diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 2c8c5614ec9..3625a4cf814 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -21,7 +21,7 @@ * */ -/*! +/** \file htdocs/contact/info.php \ingroup societe \brief Onglet info d'un contact @@ -42,11 +42,11 @@ $contact->fetch($_GET["id"], $user); $h=0; $head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$_GET["id"]; -$head[$h][1] = "Général"; +$head[$h][1] = $langs->trans("General"); $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$_GET["id"]; -$head[$h][1] = 'Informations personnelles'; +$head[$h][1] = $langs->trans("PersonalInformations"); $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"]; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 589a03691d6..75903370779 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -21,7 +21,7 @@ * */ -/*! +/** \file htdocs/contact/perso.php \ingroup societe \brief Onglet informations personnelles d'un contact @@ -66,12 +66,13 @@ $contact->fetch($_GET["id"], $user); $h=0; + $head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$_GET["id"]; -$head[$h][1] = "Général"; +$head[$h][1] = $langs->trans("General"); $h++; $head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$_GET["id"]; -$head[$h][1] = 'Informations personnelles'; +$head[$h][1] = $langs->trans("PersonalInformations"); $hselected=$h; $h++; diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 1de2d55f57a..d56f8b7f117 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -30,3 +30,4 @@ CustomerDiscount=Customer Discount Supplier=Supplier CompanyList=Companies' list AddContact=Add new contact +PersonalInformations=Personal data diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e63834dd2b2..28c377b2fdd 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -156,4 +156,5 @@ Drafts=Drafts Opened=Opened New=New Discount=Discount -Unknown=Inconnu \ No newline at end of file +Unknown=Inconnu +General=General \ No newline at end of file diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 17ce18fb59f..b3dfb165f50 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -33,4 +33,5 @@ CompanyList=Liste des soci AddContact=Ajouter un contact NewSocGroup=Nouveau groupement de sociétés SocGroup=Groupement de sociétés -Created=Date saisie \ No newline at end of file +Created=Date saisie +PersonalInformations=Informations personnelles \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 1922c50aa4f..0db3a69c785 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -156,4 +156,5 @@ Drafts=Brouillons Opened=Ouverts New=Nouveau Discount=Remise -Unknown=Inconnu \ No newline at end of file +Unknown=Inconnu +General=Général \ No newline at end of file