Fix: Conditionnement de l'onglet clicktodial sur l'activation du module ou non

This commit is contained in:
Laurent Destailleur 2005-03-06 16:01:38 +00:00
parent ed08ddade5
commit 5f2151d84c
4 changed files with 21 additions and 10 deletions

View File

@ -76,12 +76,9 @@ if ($_GET["id"])
if ($_GET["action"] != 'perms') { $hselected=$h; } if ($_GET["action"] != 'perms') { $hselected=$h; }
$h++; $h++;
if ($user->admin) $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
{ $head[$h][1] = $langs->trans("UserRights");
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?action=perms&id='.$fuser->id; $h++;
$head[$h][1] = $langs->trans("UserRights");
$h++;
}
if ($conf->bookmark4u->enabled) if ($conf->bookmark4u->enabled)
{ {
@ -98,7 +95,7 @@ if ($_GET["id"])
$h++; $h++;
} }
dolibarr_fiche_head($head, $hselected, $langs->trans("User")." : ".$fuser->fullname); dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
/* /*
* Fiche en mode visu * Fiche en mode visu

View File

@ -307,6 +307,13 @@ else
$h++; $h++;
} }
if ($conf->clicktodial->enabled)
{
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
$head[$h][1] = $langs->trans("ClickToDial");
$h++;
}
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);

View File

@ -59,7 +59,7 @@ if ($sortfield) { $sql.=" ORDER BY $sortfield $sortorder"; }
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$num = $db->num_rows(); $num = $db->num_rows($result);
$i = 0; $i = 0;
print "<br>"; print "<br>";
@ -75,7 +75,7 @@ if ($result)
$var=True; $var=True;
while ($i < $num) while ($i < $num)
{ {
$obj = $db->fetch_object( $i); $obj = $db->fetch_object($result);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
@ -95,7 +95,7 @@ if ($result)
$i++; $i++;
} }
print "</table>"; print "</table>";
$db->free(); $db->free($result);
} }
else else
{ {

View File

@ -93,6 +93,13 @@ if ($_GET["id"])
$h++; $h++;
} }
if ($conf->clicktodial->enabled)
{
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
$head[$h][1] = $langs->trans("ClickToDial");
$h++;
}
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
// Lecture des droits utilisateurs // Lecture des droits utilisateurs