+ *
* 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
* the Free Software Foundation; either version 3 of the License, or
@@ -576,7 +577,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax","",$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email","",$param,'',$sortfield,$sortorder);
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
$colspan++;
print ''.$langs->trans("Skype").' ';
@@ -608,8 +609,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print ' ';
- print ' ';
- if (! empty($conf->skype->enabled))
+ print ' ';
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
$colspan++;
print ' ';
@@ -681,7 +682,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print '';
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
print ' ';
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print '';
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8da52e301e6..b91a19a9820 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1190,11 +1190,11 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
* Show Skype link
*
* @param string $skype Skype to show (only skype, without 'Name of recipient' before)
- * @param int $cid Id of contact if known
+ * @param int $cid Id of contact if known
* @param int $socid Id of third party if known
* @param int $addlink 0=no link to create action
- * @param int $max Max number of characters to show
- * @return string HTML Link
+ * @param int $max Max number of characters to show
+ * @return string HTML Link
*/
function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
@@ -1208,9 +1208,12 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
{
$newskype='';
- $newskype.=' ';
+ $newskype.='?call" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
+ $newskype.=' ';
+ $newskype.=' ';
+ $newskype.=' ';
$newskype.=' ';
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
diff --git a/htdocs/install/mysql/migration/2.1.0-2.2.0.sql b/htdocs/install/mysql/migration/2.1.0-2.2.0.sql
index 070682d3c50..cc3988f8a42 100644
--- a/htdocs/install/mysql/migration/2.1.0-2.2.0.sql
+++ b/htdocs/install/mysql/migration/2.1.0-2.2.0.sql
@@ -71,12 +71,13 @@ update llx_bank set dateo = datec where datev = '1970-01-01 00:00:00' and rappro
alter table llx_c_chargesociales add column actioncompta varchar(12) NOT NULL;
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 1, 'Allocations familiales', 1,1,'TAXFAM');
-insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'GSG Deductible', 1,1,'TAXCSGD');
-insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'GSG/CRDS NON Deductible',0,1,'TAXCSGND');
-insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (10, 'Taxe apprenttissage', 0,1,'TAXAPP');
+insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 2, 'GSG Déductible', 1,1,'TAXCSGD');
+insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values ( 3, 'GSG/CRDS NON Déductible',0,1,'TAXCSGND');
+insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (10, 'Taxe apprentissage', 0,1,'TAXAPP');
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (11, 'Taxe professionnelle', 0,1,'TAXPRO');
+insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (12, 'Contribution à la formation professionnelle', 1,1,'TAXOPCA');
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (20, 'Impots locaux/fonciers', 0,1,'TAXFON');
-insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (30, 'Assurance Sante (SECU-URSSAF)', 0,1,'TAXSECU');
+insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (30, 'Assurance Santé (SECU-URSSAF)', 0,1,'TAXSECU');
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (40, 'Mutuelle', 0,1,'TAXMUT');
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (50, 'Assurance vieillesse (CNAV)', 0,1,'TAXRET');
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (60, 'Assurance Chomage (ASSEDIC)', 0,1,'TAXCHOM');
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index cdf9c3e5770..227ce4442fb 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -68,6 +68,7 @@ CountryId=Country id
Phone=Phone
Skype=Skype
Call=Call
+Chat=Chat
PhonePro=Prof. phone
PhonePerso=Pers. phone
PhoneMobile=Mobile
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 9d5a707aac1..cc4d2c6754f 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -876,7 +876,7 @@ else
print ' '.$langs->trans('Web').' ';
// Skype
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print ''.$langs->trans('Skype').' ';
}
@@ -1300,7 +1300,7 @@ else
print ''.$langs->trans('Web').' ';
// Skype
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print ''.$langs->trans('Skype').' ';
}
@@ -1592,12 +1592,12 @@ else
// Country
print ''.$langs->trans("Country").' ';
- if ($object->country_code)
- {
- $img=picto_from_langcode($object->country_code);
- if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
- else print ($img?$img.' ':'').$object->country;
- }
+ if ($object->country_code)
+ {
+ $img=picto_from_langcode($object->country_code);
+ if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
+ else print ($img?$img.' ':'').$object->country;
+ }
print ' ';
// State
@@ -1614,7 +1614,7 @@ else
print '';
// Skype
- if (! empty($conf->skype->enabled))
+ if (! empty($conf->skype->enabled) && $user->rights->skype->view)
{
print ''.$langs->trans('Skype').' ';
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
diff --git a/htdocs/theme/common/skype_callbutton.png b/htdocs/theme/common/skype_callbutton.png
new file mode 100644
index 00000000000..79ee7963fc4
Binary files /dev/null and b/htdocs/theme/common/skype_callbutton.png differ
diff --git a/htdocs/theme/common/skype_chatbutton.png b/htdocs/theme/common/skype_chatbutton.png
new file mode 100644
index 00000000000..788c31fec21
Binary files /dev/null and b/htdocs/theme/common/skype_chatbutton.png differ
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index 54a9093bd34..44686e9277e 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005-2013 Laurent Destailleur
* Copyright (C) 2010-2012 Regis Houssin
* Copyright (C) 2013 Florian Henry
*
@@ -78,7 +78,7 @@ $formadmin=new FormAdmin($db);
/*
* Actions
*/
-if ($action == 'update' && ($caneditfield || $user->admin))
+if ($action == 'update' && ($caneditfield || ! empty($user->admin)))
{
if (! $_POST["cancel"])
{
@@ -258,7 +258,7 @@ else
}
else
{
- if ($user->id == $fuser->id || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
+ if ($caneditfield || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
{
print 'id.'">'.$langs->trans("Modify").' ';
}