diff --git a/build/tgz/tar_exclude.txt b/build/tgz/tar_exclude.txt index 381f7fd20f5..6900aefc3dc 100644 --- a/build/tgz/tar_exclude.txt +++ b/build/tgz/tar_exclude.txt @@ -34,11 +34,8 @@ htdocs/includes/treemenu/docs htdocs/includes/treemenu/images htdocs/includes/treemenu/imagesAlt htdocs/includes/treemenu/imagesAlt2 -htdocs/includes/modules/modBarcode.class.php htdocs/includes/modules/modBookmark4u.class.php -htdocs/includes/modules/modClickToDial.class.php htdocs/includes/modules/modDocument.class.php -htdocs/includes/modules/modDomain.class.php htdocs/includes/modules/modDroitPret.class.php htdocs/includes/modules/modEditeur.class.php htdocs/includes/modules/modPostnuke.class.php diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 2df63a33a51..791fe18db67 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Laurent Destailleur + * Copyright (C) 2005-2008 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 @@ -15,15 +15,12 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/admin/clicktodial.php \ingroup clicktodial \brief Page d'administration/configuration du module clicktodial - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -68,14 +65,14 @@ $var=true; print ''; print ''; print ''; -print ''; +print ''; print "\n"; $var=!$var; print ''; print ''; @@ -84,5 +81,4 @@ print '
'.$langs->trans("Name").''.$langs->trans("NewValue").''.$langs->trans("CurrentValue").''.$langs->trans("Value").''.$langs->trans("Desc").'
'; print $langs->trans("URL").''; -print ''; +print ''; print ''; -print $conf->global->CLICKTODIAL_URL; +print $langs->trans("ClickToDialUrlDesc"); print '
'; $db->close(); llxFooter('$Date$ - $Revision$'); - ?> diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 145ae1c6811..40a4509610b 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -54,18 +54,30 @@ if (isset($_GET["error"])) $error=$_GET["error"]; */ if ($_POST["action"] == 'add_action') { + if ($_POST["contactid"]) + { + $contact = new Contact($db); + $result=$contact->fetch($_POST["contactid"]); + } + + if ($_POST['cancel']) + { + header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']); + exit; + } + // Nettoyage parametres if ($_POST["aphour"] == -1) $_POST["aphour"]='0'; if ($_POST["apmin"] == -1) $_POST["apmin"]='0'; if ($_POST["adhour"] == -1) $_POST["adhour"]='0'; if ($_POST["admin"] == -1) $_POST["admin"]='0'; - $datep=@mktime($_POST["aphour"], + $datep=dolibarr_mktime($_POST["aphour"], $_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); - $datea=@mktime($_POST["adhour"], + $datea=dolibarr_mktime($_POST["adhour"], $_POST["admin"], 0, $_POST["admonth"], @@ -75,12 +87,6 @@ if ($_POST["action"] == 'add_action') if (! ($datep > 0)) $datep=''; if (! ($datea > 0)) $datea=''; - if ($_POST["contactid"]) - { - $contact = new Contact($db); - $contact->fetch($_POST["contactid"]); - } - if (! $_POST["actioncode"]) { $error=1; @@ -286,7 +292,7 @@ $html = new Form($db); /* ************************************************************************** */ /* */ -/* Affichage fiche en mode cr�ation */ +/* Affichage fiche en mode creation */ /* */ /* ************************************************************************** */ @@ -402,7 +408,11 @@ if ($_GET["action"] == 'create') } print ''; - print ''; + print ''; + print ''; + print '     '; + print ''; + print ''; print ''; } @@ -412,27 +422,6 @@ if ($_GET["action"] == 'create') */ else { - /* - * Click to dial - * - */ - if ($conf->clicktodial->enabled) - { - $user->fetch_clicktodial(); - - if ($_GET["call"] && $user->clicktodial_enabled == 1) - { - - print '\n"; - } - } - - print_titre ($langs->trans("AddAnAction")); print "
"; @@ -471,7 +460,7 @@ if ($_GET["action"] == 'create') } print ''; - // Si la societe est impos�e, on propose ces contacts + // Si la societe est imposee, on propose ces contacts if ($_REQUEST["socid"]) { print ''.$langs->trans("ActionOnContact").''; @@ -546,7 +535,11 @@ if ($_GET["action"] == 'create') } print ''; - print ''; + print ''; + print ''; + print '     '; + print ''; + print ''; print ''; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 33ec53fe629..35d488c8524 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -18,15 +18,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/comm/fiche.php \ingroup commercial \brief Onglet client de la fiche societe - \version $Revision$ + \version $Id$ */ require_once("./pre.inc.php"); @@ -184,12 +182,15 @@ if ($socid > 0) print ''.$langs->trans('Country').''.$objsoc->pays.''; } + // Phone print ''.$langs->trans('Phone').''.dolibarr_print_phone($objsoc->tel,$objsoc->pays_code).''; - print ''.$langs->trans('Fax').''.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code).''; + + // Fax + print ''.$langs->trans('Fax').''.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code).''; print ''.$langs->trans("Web")."url\" target=\"_blank\">".$objsoc->url." "; - // Assujeti � TVA ou pas + // Assujeti TVA ou pas print ''; print ''.$langs->trans('VATIsUsed').''; print yn($objsoc->tva_assuj); @@ -633,7 +634,7 @@ if ($socid > 0) print ''; print ''; - print ''; + print ''; print ''; print ""; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) @@ -666,27 +667,17 @@ if ($socid > 0) print $contactstatic->getNomUrl(1); print ''; - print ''; + print ''; // Lien click to dial - if (strlen($obj->phone) && $user->clicktodial_enabled == 1) - { - print ''; + if ($obj->phone) print ' '.dol_phone_link($obj->phone); + print ''; print ''; print ''; - print ''; - print '"; + print ''; + print '"; if ($societe->rubrique) { @@ -282,23 +282,21 @@ if ($socid > 0) print ''; print ''; - print ''; - - print ''; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index d8e2d5812bc..25c9fdd2479 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -15,15 +15,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \file htdocs/compta/fiche.php \ingroup compta \brief Page de fiche compta - \version $Revision$ + \version $Id$ */ require("./pre.inc.php"); @@ -425,14 +423,15 @@ if ($socid > 0) print $obj->phone; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; - print ' '; + if ($obj->phone) print ' '.dol_phone_link($obj->phone); + print ''; print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print '"; // Assujeti � TVA ou pas @@ -344,9 +344,11 @@ if ( $societe->fetch($socid) ) } print ""; print ""; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if ($user->rights->societe->contact->creer) { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index dd4f9f36af8..389073ff6b6 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Eric Seigne diff --git a/htdocs/includes/modules/modBoutique.class.php b/htdocs/includes/modules/modBoutique.class.php index ddf372922b6..8c9cda45294 100644 --- a/htdocs/includes/modules/modBoutique.class.php +++ b/htdocs/includes/modules/modBoutique.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -17,12 +17,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** \defgroup oscommerce Module OSCommerce - \brief Module pour g�rer une boutique et interface avec OSCommerce + \brief Module pour gerer une boutique et interface avec OSCommerce + \version $Id$ */ /** diff --git a/htdocs/includes/modules/modClickToDial.class.php b/htdocs/includes/modules/modClickToDial.class.php index c00e1a27173..8bc0396bbda 100644 --- a/htdocs/includes/modules/modClickToDial.class.php +++ b/htdocs/includes/modules/modClickToDial.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2008 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 @@ -15,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ */ /** @@ -28,6 +26,7 @@ \file htdocs/includes/modules/modClickToDial.class.php \ingroup clicktodial \brief Fichier de description et activation du module de click to Dial + \version $Id$ */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); @@ -54,7 +53,7 @@ class modClickToDial extends DolibarrModules $this->name = "ClickToDial"; $this->description = "Gestion du Click To Dial"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_CLICKTODIAL'; $this->special = 1; @@ -63,17 +62,17 @@ class modClickToDial extends DolibarrModules // Dir $this->dirs = array(); - // D�pendances + // Dependencies $this->depends = array(); $this->requiredby = array(); // Config pages $this->config_page_url = array("clicktodial.php"); - // Constantes + // Constants $this->const = array(); - // Boites + // Boxes $this->boxes = array(); // Permissions diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index aca7df54f92..9f92c71a475 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -583,6 +583,7 @@ FicheinterNumberingModules=Intervention numbering modules TemplatePDFInterventions=Intervention card documents models ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup +ClickToDialUrlDesc=Url called when a click on phone picto is done.
Complete url will be: URL?login=...&password=...&caller=...&called=phonecalled ##### Bookmark4u ##### Bookmark4uSetup=Bookmark4u module setup ##### Interventions ##### diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 260eceb2a26..12d6439c50b 100755 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -84,3 +84,4 @@ Reactivate=Reactivate CreateInternalUserDesc=This form allows you to creat an user internal to your company/fundation. To creat an external user (customer, supplier, ...), use button 'Create Dolibarr user' from third party's contact card. InternalExternalDesc=An internal user is a user that is part of your company/fundation.
An external user is a customer, supplier or other.

In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) PermissionInheritedFromAGroup=Permission granted because ineherited from one of a user's group. +IdPhoneCaller=Id phone caller \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index d16840c0744..a444a9b8f64 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -582,6 +582,7 @@ FicheinterNumberingModules=Modules de num TemplatePDFInterventions=Modèle de documents des fiches d'interventions ##### Clicktodial ##### ClickToDialSetup=Configuration du module Click To Dial +ClickToDialUrlDesc=Url appelée lors dun clic sur le picto téléphone.
L'url complète appelée sera: URL?login=...&password=...&caller=...&called=telappelé ##### Bookmark4u ##### Bookmark4uSetup=Configuration du module Bookmark4u ##### Interventions ##### diff --git a/htdocs/langs/fr_FR/users.lang b/htdocs/langs/fr_FR/users.lang index 9ccea5d30e4..66851b1b7dc 100755 --- a/htdocs/langs/fr_FR/users.lang +++ b/htdocs/langs/fr_FR/users.lang @@ -84,3 +84,4 @@ Reactivate=R CreateInternalUserDesc=Cet écran permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utiliser le bouton 'Créer utilisateur Dolibarr' qui se trouve sur la fiche contact du tiers en question. InternalExternalDesc=Un utilisateur interne est un utilisateur appartenant à votre société/institution.
Un utilisateur externe est un utilisateur client, fournisseur ou autre.

Dans les 2 cas, les permissions utilisateurs définissent les droits d'accès mais l'utilisateur externe peut en plus avoir un gestionnaire de menu différent de l'utilisateur interne (Voir Accueil - Configuration - Affichage) PermissionInheritedFromAGroup=La permission est accordée car héritée d'un groupe auquel appartient l'utilisateur. +IdPhoneCaller=Id appelant (téléphone) \ No newline at end of file diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 378718c5b5e..afdf8d89bc3 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Christophe Combelles @@ -778,9 +778,11 @@ function dolibarr_print_object_info($object) */ function dolibarr_print_phone($phone,$country="FR") { - $phone=trim($phone); - if (strstr($phone, ' ')) { return $phone; } - if (strtoupper($country) == "FR") { + $phone=trim($phone); + if (! $phone) { return $phone; } + + if (strtoupper($country) == "FR") + { // France if (strlen($phone) == 10) { return substr($phone,0,2)." ".substr($phone,2,2)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2); @@ -803,9 +805,30 @@ function dolibarr_print_phone($phone,$country="FR") return substr($phone,0,4)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2)." ".substr($phone,10,2); } } + return $phone; } +/** + * \brief Show click to dial link + * \param phone Phone to call + * \param option Type of picto + * \return string Link + */ +function dol_phone_link($phone,$option=0) +{ + global $conf,$user; + + $link=''; + $phone=trim($phone); + + $url = $conf->global->CLICKTODIAL_URL; + $url.= "?login=".urlencode($user->clicktodial_login)."&password=".urlencode($user->clicktodial_password); + $url.= "&caller=".urlencode($user->clicktodial_poste)."&called=".urlencode(trim($phone)); + $link.=''.img_phone("default",0).''; + return $link; +} + /** \brief Tronque une chaine a une taille donnée en ajoutant les points de suspension si cela dépasse \param string String to truncate @@ -1148,28 +1171,21 @@ function img_alerte($alt = "default") } /** - \brief Affiche logo téléphone in + \brief Affiche logo téléphone \param alt Texte sur le alt de l'image + \param option Choose of logo \return string Retourne tag img */ -function img_phone_in($alt = "default") +function img_phone($alt = "default",$option=0) { global $conf,$langs; - if ($alt=="default") $alt=$langs->trans("Modify"); - return ''.$alt.''; + if ($alt=="default") $alt=$langs->trans("Call"); + $img='call_out'; + if ($option == 1) $img='call'; + $img='object_commercial'; + return ''.$alt.''; } -/** - \brief Affiche logo téléphone out - \param alt Texte sur le alt de l'image - \return string Retourne tag img -*/ -function img_phone_out($alt = "default") -{ - global $conf,$langs; - if ($alt=="default") $alt=$langs->trans("Modify"); - return ''.$alt.''; -} /** \brief Affiche logo suivant diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 843f855b4c8..c6568b184c8 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -699,28 +699,34 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0) print ''."\n"; print ''."\n"; print ''."\n"; + // TODO As-ton besoin des ces 2 js ? print ''."\n"; print ''."\n"; + } + + // TODO Voir si on peut pas virer ca + if (! $disablejs && $conf->use_javascript_ajax) + { + // Define tradMonths javascript array + $tradTemp=Array($langs->trans("January"), + $langs->trans("February"), + $langs->trans("March"), + $langs->trans("April"), + $langs->trans("May"), + $langs->trans("June"), + $langs->trans("July"), + $langs->trans("August"), + $langs->trans("September"), + $langs->trans("October"), + $langs->trans("November"), + $langs->trans("December") + ); + print ''."\n"; } - // Define tradMonths javascript array - $tradTemp=Array($langs->trans("January"), - $langs->trans("February"), - $langs->trans("March"), - $langs->trans("April"), - $langs->trans("May"), - $langs->trans("June"), - $langs->trans("July"), - $langs->trans("August"), - $langs->trans("September"), - $langs->trans("October"), - $langs->trans("November"), - $langs->trans("December") - ); - print ''."\n"; - + print "\n"; } } diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 98f26b202fa..de0bb6e36d5 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2002-2003 Jean-Louis Bergamo - * Copyright (c) 2004-2007 Laurent Destailleur + * Copyright (c) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2007 Regis Houssin @@ -1338,8 +1338,9 @@ class User extends CommonObject function fetch_clicktodial() { - $sql = "SELECT login, pass, poste FROM ".MAIN_DB_PREFIX."user_clicktodial as u"; - $sql .= " WHERE u.fk_user = ".$this->id; + $sql = "SELECT login, pass, poste "; + $sql.= " FROM ".MAIN_DB_PREFIX."user_clicktodial as u"; + $sql.= " WHERE u.fk_user = ".$this->id; $result = $this->db->query($sql); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 50bd5f36056..87c1e96a981 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Laurent Destailleur + * Copyright (C) 2005-2008 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 @@ -15,15 +15,12 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/user/clicktodial.php - \brief Gestion des infos de click to dial - \version $Revision$ + \brief Page for Click to dial datas + \version $Id$ */ require("./pre.inc.php"); @@ -38,18 +35,15 @@ $form = new Form($db); * Actions */ -if ($_POST["action"] == 'update') +if ($_POST["action"] == 'update' && ! $_POST['cancel']) { - $edituser = new User($db, $_GET["id"]); - - $edituser->clicktodial_login = $_POST["login"]; - $edituser->clicktodial_password = $_POST["password"]; - $edituser->clicktodial_poste = $_POST["poste"]; - - $edituser->update_clicktodial(); - - Header("Location: clicktodial.php?id=".$_GET["id"]); - exit; + $edituser = new User($db, $_GET["id"]); + + $edituser->clicktodial_login = $_POST["login"]; + $edituser->clicktodial_password = $_POST["password"]; + $edituser->clicktodial_poste = $_POST["poste"]; + + $result=$edituser->update_clicktodial(); } @@ -78,43 +72,60 @@ if ($_GET["id"]) print '
'.$langs->trans("Name").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Poste").''.$langs->trans("Tel").''.$langs->trans("Fax").''.$langs->trans("EMail").' '.$obj->poste.' '.$obj->poste.''; - print ''; - print img_phone_out("Appel emis") ; - print ''; - } - else - { - print ''; - } - + print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; print dolibarr_print_phone($obj->phone); if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; - print ' '; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 72799f95e39..333c6c33d98 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 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 @@ -113,8 +113,8 @@ if ($socid > 0) print '
'.$langs->trans('Zip').' / '.$langs->trans('Town').''.$societe->cp." ".$societe->ville.'
'.$langs->trans('Country').''.$societe->pays.'
'.$langs->trans("Phone").''.$societe->tel.' Fax'.$societe->fax.' 
'.$langs->trans("Web")."url\">$societe->url 
'.$langs->trans("Phone").''.dolibarr_print_phone($societe->tel,$societe->pays_code).'Fax'.dolibarr_print_phone($societe->fax,$societe->pays_code).'
'.$langs->trans("Web")."url\">$societe->url
'.$obj->poste.' '; + // Phone + print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; - print $obj->phone; - if (strlen($obj->phone) && $user->clicktodial_enabled == 1) - { - print ''; - print img_phone_out("Appel émis") ; - } + print dolibarr_print_phone($obj->phone,''); if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; + if ($obj->phone) print ' '.dol_phone_link($obj->phone); print ''; + + // Fax + print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; - print $obj->fax; + print dolibarr_print_phone($obj->fax); if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; print ' '; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; print $obj->fax; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; - print ' '; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index cc8e9717780..f6a2faafebb 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -111,7 +111,7 @@ if ( $societe->fetch($socid) ) print '
'.$langs->trans("Zip").''.$societe->cp.''.$langs->trans("Town").''.$societe->ville.'
'.$langs->trans("Country").''.$societe->pays.'
'.$langs->trans("Phone").''.dolibarr_print_phone($societe->tel).' '.$langs->trans("Fax").''.dolibarr_print_phone($societe->fax).' 
'.$langs->trans("Phone").''.dolibarr_print_phone($societe->tel,$societe->pays_code).' '.$langs->trans("Fax").''.dolibarr_print_phone($societe->fax,$societe->pays_code).' 
'.$langs->trans("Web")."url\">$societe->url 
$obj->poste '.$obj->phone.' '.$obj->fax.' '.$obj->email.' '.$obj->phone.''; + if ($obj->phone) print ' '.dol_phone_link($obj->phone); + print ''.$obj->fax.''.$obj->email.'
'; - print "".''; - print ''; - print ''; - print ''; + // Ref + print ''; + print ''; + print ''; + + // Nom + print ''; + print ''; print "\n"; - print "".''; - print ''; - print ''; - print ''; + // Prenom + print ''; + print ''; print "\n"; - + print "
'.$langs->trans("LastName").''.$fuser->nom.''.$langs->trans("FirstName").''.$fuser->prenom.'
'.$langs->trans("Ref").''; + print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin); + print '
'.$langs->trans("Lastname").''.$fuser->nom.'
'.$langs->trans("Login").''.$fuser->login.''.$langs->trans("EMail").''.$fuser->email.'
'.$langs->trans("Firstname").''.$fuser->prenom.'
\n"; print "
\n"; + print info_admin($langs->trans("ClickToDialUrlDesc")); + if ($_GET["action"] == 'edit') { print '
'; print ''; print ''; - print "".''; - print '".''; + print ''; + print ''; + } + + print "".''; + print ''; - - print ''; - print ''; + + print "".''; + print ''; print "\n"; - print "".''; - print '".''; + print ''; - print ''; - print ''; print "\n"; - print ''; + print ''; print '
'.$langs->trans("Login").''; + + if ($user->admin) + { + print "
ClickToDial URL'.$conf->global->CLICKTODIAL_URL.'
ClickToDial '.$langs->trans("Login").''; print ''.$langs->trans("Password").''; + print '
ClickToDial '.$langs->trans("Password").''; print '
Poste'; + print "
ClickToDial '.$langs->trans("IdPhoneCaller").''; print '  
'; + print '     '; + print ''; + print '
'; } @@ -123,17 +134,20 @@ if ($_GET["id"]) print ''; - print "".''; - print ''; - print ''; - print ''; + if ($user->admin) + { + print "".''; + print ''; + print ''; + } + print "".''; + print ''; + print ''; + print "".''; + print ''; print "\n"; - - print "".''; - print ''; - print ''; - print ''; - + print "".''; + print ''; print "
'.$langs->trans("Login").''.$fuser->clicktodial_login.''.$langs->trans("Password").'XXXXXX
ClickToDial URL'.$conf->global->CLICKTODIAL_URL.'
ClickToDial '.$langs->trans("Login").''.$fuser->clicktodial_login.'
ClickToDial '.$langs->trans("Password").''.$fuser->clicktodial_password.'
Poste'.$fuser->clicktodial_poste.'  
ClickToDial '.$langs->trans("IdPhoneCaller").''.$fuser->clicktodial_poste.'
\n"; } @@ -149,11 +163,6 @@ if ($_GET["id"]) print ''.$langs->trans("Modify").''; } - if ($user->admin && $_GET["action"] == 'edit') - { - print ''.$langs->trans("Cancel").''; - } - print "\n"; print "
\n"; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 30eb864e58e..0a5b3ab96d3 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2008 Regis Houssin * Copyright (C) 2005 Lionel COUSTEIX