Ajout permissions sur cration et suppression des contacts
This commit is contained in:
parent
79d1b10b47
commit
fd46b75578
@ -347,7 +347,13 @@ if ( $societe->fetch($socid) )
|
||||
print '<tr class="liste_titre"><td><b>'.$langs->trans("Contact").'</b></td>';
|
||||
print '<td><b>Poste</b></td><td><b>'.$langs->trans("Tel").'</b></td>';
|
||||
print "<td><b>".$langs->trans("Fax")."</b></td><td><b>".$langs->trans("EMail")."</b></td>";
|
||||
print "<td align=\"center\"><a href=\"".DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid."&action=create\">".$langs->trans("AddContact")."</a></td></tr>";
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print "<td align=\"center\"><a href=\"".DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid."&action=create\">".$langs->trans("AddContact")."</a></td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.idp, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
@ -373,15 +379,20 @@ if ( $societe->fetch($socid) )
|
||||
print ' '.$obj->firstname.' '. $obj->name.'</a> ';
|
||||
|
||||
if ($obj->note)
|
||||
{
|
||||
print "<br>".nl2br($obj->note);
|
||||
}
|
||||
{
|
||||
print "<br>".nl2br($obj->note);
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=2&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actionid=4&contactid='.$obj->idp.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
print "<td align=\"center\"><a href=\"../contact/fiche.php?action=edit&id=$obj->idp\">".img_edit()."</a></td>";
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print "<td align=\"center\"><a href=\"../contact/fiche.php?action=edit&id=$obj->idp\">".img_edit()."</a></td>";
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user