Add create events on project card when MAIN_ADD_EVENT_ON_ELEMENT_CARD is

enabled like for propal, order and invoice
The new event is linked to the project
This commit is contained in:
philippe-opendsi 2016-10-18 22:23:03 +02:00
parent 19532c9965
commit 9ee61d20e3

View File

@ -970,7 +970,16 @@ else
{
if ($action != "edit" )
{
// Modify
// 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 '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '&amp;projectid=' . $object->id . '">' . $langs->trans("AddAction") . '</a></div>';
}
// Modify
if ($object->statut != 2 && $user->rights->projet->creer)
{
if ($userWrite > 0)