commit
3801884e3c
@ -186,25 +186,16 @@ if ($id > 0 || $ref) {
|
|||||||
$objcon = new stdClass();
|
$objcon = new stdClass();
|
||||||
|
|
||||||
$out = '';
|
$out = '';
|
||||||
$permok = $user->rights->agenda->myactions->create;
|
|
||||||
if ((!empty($objproduct->id) || !empty($objcon->id)) && $permok) {
|
|
||||||
//$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
|
||||||
if (get_class($objproduct) == 'Product') {
|
|
||||||
$out .= '&prodid='.$objproduct->id.'&origin=product&originid='.$id;
|
|
||||||
}
|
|
||||||
$out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage='.$_SERVER["PHP_SELF"].'?id='.$object->id.'&percentage=-1';
|
|
||||||
//$out.=$langs->trans("AddAnAction").' ';
|
|
||||||
//$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
|
||||||
//$out.="</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//print '<div class="tabsAction">';
|
|
||||||
//print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
$morehtmlcenter = '';
|
$morehtmlcenter = '';
|
||||||
if (!empty($conf->agenda->enabled)) {
|
if (!empty($conf->agenda->enabled)) {
|
||||||
|
$permok = $user->rights->agenda->myactions->create;
|
||||||
|
if ((!empty($objproduct->id) || !empty($objcon->id)) && $permok) {
|
||||||
|
if (get_class($objproduct) == 'Product') {
|
||||||
|
$out .= '&prodid='.$objproduct->id.'&origin=product&originid='.$id;
|
||||||
|
}
|
||||||
|
$out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&backtopage='.$_SERVER["PHP_SELF"].'?id='.$object->id.'&percentage=-1';
|
||||||
|
}
|
||||||
|
|
||||||
$linktocreatetimeBtnStatus = !empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create);
|
$linktocreatetimeBtnStatus = !empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create);
|
||||||
$morehtmlcenter = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', $linktocreatetimeBtnStatus);
|
$morehtmlcenter = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out, '', $linktocreatetimeBtnStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user