Fix a fix

This commit is contained in:
Laurent Destailleur
2011-06-13 13:44:50 +00:00
parent f46492befe
commit b8574ef39d
2 changed files with 15 additions and 9 deletions

View File

@@ -510,11 +510,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
print '</td>';
print '<td align="center">';
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?action=edit&amp;id='.$obj->rowid.'&amp;backtopage='.urlencode($backtopage).'">';
print img_edit();
print '</a></td>';
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
{
print '<td align="center"><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtourl).'">';
@@ -522,6 +517,14 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print '</a></td>';
}
if ($user->rights->societe->contact->creer)
{
print '<td align="right">';
print '<a href="'.DOL_URL_ROOT.'/contact/fiche.php?action=edit&amp;id='.$obj->rowid.'&amp;backtopage='.urlencode($backtopage).'">';
print img_edit();
print '</a></td>';
}
print "</tr>\n";
$i++;
}

View File

@@ -487,10 +487,13 @@ function dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto
print '</a>';
}
// Define max of key (max may be higher than sizeof becaus of hole due to module disabling some tabs).
// Define max of key (max may be higher than sizeof because of hole due to module disabling some tabs).
$maxkey=-1;
if (is_array($links))
{
$keys=array_keys($links);
if (sizeof($keys)) $maxkey=max($keys);
else $maxkey=-1;
}
// Show tabs
for ($i = 0 ; $i <= $maxkey ; $i++)