Add hidden option MAIN_ADD_EVENT_ON_ELEMENT_CARD because the new feature

to have a button to create an event is not a "workflow" action so should
not appears with action buttons but somewhere else on page.
This commit is contained in:
Laurent Destailleur 2013-09-26 14:06:15 +02:00
parent ca24b45aa9
commit 8e72727163
2 changed files with 4 additions and 6 deletions

View File

@ -2106,11 +2106,10 @@ else
if (count($object->lines) > 0) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=validate">'.$langs->trans('Validate').'</a></div>';
//else print '<a class="butActionRefused" href="#">'.$langs->trans('Validate').'</a>';
}
//Creer un evenement
if ($conf->agenda->enabled)
// Create event
if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddAction").'</a>';
}
// Edit
if ($object->statut == 1 && $user->rights->propal->creer)

View File

@ -2391,11 +2391,10 @@ else
{
print '<div class="inline-block divButAction"><a class="butAction" href="fiche.php?id='.$object->id.'&amp;action=modif">'.$langs->trans('Modify').'</a></div>';
}
//Creer un evenement
if ($conf->agenda->enabled)
// Create event
if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("AddAction").'</a>';
}
// Send
if ($object->statut > 0)