New : add button to create event on supplier order or invoice with MAIN_ADD_EVENT_ON_ELEMENT_CARD

This commit is contained in:
Maxime Kohlhaas 2016-03-04 10:38:33 +01:00
parent fba3970835
commit db656ea4ca
2 changed files with 11 additions and 0 deletions

View File

@ -2755,6 +2755,11 @@ elseif (! empty($object->id))
print '</a>';
}
}
// 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 . '">' . $langs->trans("AddAction") . '</a></div>';
}
// Modify
if ($object->statut == 1)

View File

@ -2321,6 +2321,12 @@ else
}
}
}
// 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 . '">' . $langs->trans("AddAction") . '</a></div>';
}
// Clone
if ($action != 'edit' && $user->rights->fournisseur->facture->creer)