diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 07bc820e7e1..1389572a67b 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -509,9 +509,12 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
print '
| ';
print ''.dol_print_date($curtime,'%a %d').'';
print ' | ';
- print '';
- print img_picto($langs->trans("NewAction"),'edit_add.png');
- print '';
+ if ($user->agenda->myactions->create || $user->agenda->actions->create)
+ {
+ print '';
+ print img_picto($langs->trans("NewAction"),'edit_add.png');
+ print '';
+ }
print ' |
';
print '| '; // Minimum 60px height
diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php
index 5f3928ddcca..e25f5e69247 100644
--- a/htdocs/includes/menus/barre_left/eldy_backoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php
@@ -732,7 +732,7 @@ class MenuLeft {
// Actions
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
- $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
+ $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->actions->create));
// Calendar
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
index 097095768c3..5aea77761f0 100644
--- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005-2009 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -701,7 +701,7 @@ class MenuLeft {
// Actions
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
- $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
+ $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, ($user->rights->agenda->myactions->create||$user->rights->agenda->actions->create));
// Calendar
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
|