From 9ee61d20e3c79d964d6c00e3ccfbc7af2d99b8b1 Mon Sep 17 00:00:00 2001
From: philippe-opendsi
Date: Tue, 18 Oct 2016 22:23:03 +0200
Subject: [PATCH] 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
---
htdocs/projet/card.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index cc3a97fac5b..5817f44db65 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -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 '';
+ }
+
+ // Modify
if ($object->statut != 2 && $user->rights->projet->creer)
{
if ($userWrite > 0)