forked from Wavyzz/dolibarr
Improvement of the Skype button
Perm & add a button"Chat"
This commit is contained in:
@@ -862,7 +862,7 @@ else
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
@@ -1104,7 +1104,8 @@ else
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled)) {
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
@@ -1427,7 +1428,10 @@ else
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
@@ -268,7 +268,7 @@ if ($id > 0)
|
||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ else
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
@@ -733,7 +733,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
@@ -952,7 +952,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
if (!empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); }
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); }
|
||||
print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
@@ -328,7 +328,7 @@ if ($result)
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
||||
print '</td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_skype" size="8" value="'.$search_skype.'">';
|
||||
@@ -397,7 +397,7 @@ if ($result)
|
||||
// EMail
|
||||
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled)) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Christophe Battarel <contact@altairis.fr>
|
||||
* *
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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 '<td>'.$langs->trans("Skype").'</td>';
|
||||
@@ -609,7 +610,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td> </td>';
|
||||
|
||||
print '<td> </td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
@@ -681,7 +682,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td>';
|
||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||
print '</td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<td>';
|
||||
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
||||
|
||||
@@ -1208,9 +1208,12 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
{
|
||||
$newskype='<a href="skype:';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/'.$conf->theme.'/img/object_skype.png" border="0"> ';
|
||||
$newskype.='?call" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/common/skype_callbutton.png" border="0"> ';
|
||||
$newskype.='</a> <a href="skype:';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='?chat" alt="'.$langs->trans("Chat").' '.$skype.'" title="'.$langs->trans("Chat").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/common/skype_chatbutton.png" border="0"> ';
|
||||
$newskype.='</a>';
|
||||
|
||||
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
|
||||
@@ -68,6 +68,7 @@ CountryId=Country id
|
||||
Phone=Phone
|
||||
Skype=Skype
|
||||
Call=Call
|
||||
Chat=Chat
|
||||
PhonePro=Prof. phone
|
||||
PhonePerso=Pers. phone
|
||||
PhoneMobile=Mobile
|
||||
|
||||
@@ -876,7 +876,7 @@ else
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ else
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||
}
|
||||
@@ -1614,7 +1614,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
if (! empty($conf->skype->enabled) && $user->rights->skype->view)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
|
||||
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
|
||||
|
||||
BIN
htdocs/theme/common/skype_callbutton.png
Normal file
BIN
htdocs/theme/common/skype_callbutton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
htdocs/theme/common/skype_chatbutton.png
Normal file
BIN
htdocs/theme/common/skype_chatbutton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Reference in New Issue
Block a user