diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index c8df98e0267..13a7015059b 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -338,6 +338,17 @@ if ($resql) if ($usergroup) $nav.=''; print $nav; + if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) + { + $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + + //$param='month='.$monthshown.'&year='.$year; + $hourminsec='100000'; + $link = ''; + $link.= $langs->trans("NewAction"); + $link.= ''; + } + print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit); $moreforfilter=''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 4e9b458c3d0..5ac0982a3a0 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -85,7 +85,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { include_once DOL_DOCUMENT_ROOT . '/resource/class/html.formresource.class.php'; $formresource=new FormResource($db); - + // Resource print ''; print ''; @@ -94,7 +94,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print $formresource->select_resource_list($resourceid, "resourceid", '', 1, 0, 0, null, '', 2); print ''; } - + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions=new FormActions($db); @@ -251,7 +251,7 @@ function show_array_actions_to_do($max=5) while ($i < $num) { $obj = $db->fetch_object($resql); - + print ''; @@ -347,7 +347,7 @@ function show_array_last_actions_done($max=5) while ($i < $num) { $obj = $db->fetch_object($resql); - + print ''; @@ -458,7 +458,7 @@ function actions_prepare_head($object) { include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; $resource=new DolResource($db); - + $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=action&element_id='.$object->id; $listofresourcelinked = $resource->getElementResources($object->element, $object->id); $nbResources=count($listofresourcelinked); @@ -506,6 +506,11 @@ function calendars_prepare_head($param) $h = 0; $head = array(); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:''); + $head[$h][1] = $langs->trans("ViewList"); + $head[$h][2] = 'cardlist'; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_day'.($param?'&'.$param:''); $head[$h][1] = $langs->trans("ViewDay"); $head[$h][2] = 'cardday'; @@ -529,16 +534,12 @@ function calendars_prepare_head($param) $head[$h][2] = 'cardpertype'; $h++; } - + $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:''); $head[$h][1] = $langs->trans("ViewPerUser"); $head[$h][2] = 'cardperuser'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:''); - $head[$h][1] = $langs->trans("ViewList"); - $head[$h][2] = 'cardlist'; - $h++; $object=new stdClass(); diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index de7b42ef1a6..dc8b16fecc8 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -235,7 +235,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', - 'position'=>102, + 'position'=>140, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -247,7 +247,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', 'langs'=>'agenda', - 'position'=>103, + 'position'=>141, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -259,7 +259,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', 'langs'=>'agenda', - 'position'=>104, + 'position'=>142, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -271,7 +271,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', - 'position'=>105, + 'position'=>143, 'perms'=>'$user->rights->agenda->allactions->read', 'enabled'=>'$user->rights->agenda->allactions->read', 'target'=>'', @@ -283,7 +283,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', - 'position'=>106, + 'position'=>144, 'perms'=>'$user->rights->agenda->allactions->read', 'enabled'=>'$user->rights->agenda->allactions->read', 'target'=>'', @@ -296,7 +296,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', - 'position'=>112, + 'position'=>110, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -308,7 +308,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', 'langs'=>'agenda', - 'position'=>113, + 'position'=>111, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -320,7 +320,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', 'langs'=>'agenda', - 'position'=>114, + 'position'=>112, 'perms'=>'$user->rights->agenda->myactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'', @@ -332,7 +332,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', - 'position'=>115, + 'position'=>113, 'perms'=>'$user->rights->agenda->allactions->read', 'enabled'=>'$user->rights->agenda->allactions->read', 'target'=>'', @@ -344,7 +344,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', - 'position'=>116, + 'position'=>114, 'perms'=>'$user->rights->agenda->allactions->read', 'enabled'=>'$user->rights->agenda->allactions->read', 'target'=>'', @@ -357,7 +357,7 @@ class modAgenda extends DolibarrModules 'mainmenu'=>'agenda', 'url'=>'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', - 'position'=>120, + 'position'=>160, 'perms'=>'$user->rights->agenda->allactions->read', 'enabled'=>'$conf->agenda->enabled', 'target'=>'',