diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 6c7bf2939df..d175879237a 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -61,7 +61,8 @@ if ($_POST["action"] == 'add_action') if ($_POST['cancel']) { - header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']); + if ($_POST['socid'] > 0) header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']); + else header("Location: ".DOL_URL_ROOT.'/comm/action/indexactions.php'); exit; } diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index de9348292dc..227cd3bbe9c 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -47,8 +47,15 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe', $socid,''); -if (! $user->rights->agenda->actions->read) $filter="mine"; - +$canedit=1; +if (! $user->rights->agenda->myactions->read) access_forbidden(); +if (! $user->rights->agenda->allactions->read) +{ + $canedit=0; + $filtera="on"; + $filtert="on"; + $filterd="on"; +} if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; @@ -99,6 +106,14 @@ if (!$user->rights->societe->client->voir && !$socid) //restriction } if ($status == 'done') { $sql.= " AND a.percent = 100"; } if ($status == 'todo') { $sql.= " AND a.percent < 100"; } +if ($filtera || $filtert || $filterd) +{ + $sql.= " AND ("; + if ($filtera) $sql.= " a.fk_user_author = ".$user->id; + if ($filtert) $sql.= ($filtera?" OR ":"")." a.fk_user_action = ".$user->id; + if ($filterd) $sql.= ($filtera||$filtert?" OR ":"")." a.fk_user_done = ".$user->id; + $sql.= ")"; +} $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit( $limit + 1, $offset); @@ -133,16 +148,17 @@ if ($resql) print ''; print $langs->trans("Filter"); print ''; - print ' '; + print ' '; print $langs->trans("MyActionsAsked"); print ''; - print ' '; + print ' '; print $langs->trans("MyActionsToDo"); print ''; - print ' '; + print ' '; print $langs->trans("MyActionsDone"); print ''; - print ''; + print ''; + print ''; print ''; print ''; print '
'; diff --git a/htdocs/comm/action/listevents.php b/htdocs/comm/action/listevents.php index 5eedb8279eb..f193714b909 100644 --- a/htdocs/comm/action/listevents.php +++ b/htdocs/comm/action/listevents.php @@ -44,188 +44,92 @@ if ($page == -1) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="a.datep"; +if (! $sortfield) $sortfield="e.dateevent"; $status=isset($_GET["status"])?$_GET["status"]:$_POST["status"]; llxHeader(); +$userstatic=new User($db); -print $langs->trans("FeatureNotYetAvailable"); +$sql = "SELECT e.rowid, e.type, ".$db->pdate("e.dateevent")." as dateevent,"; +$sql.= " e.fk_user, e.label, e.description,"; +$sql.= " u.login"; +$sql.= " FROM ".MAIN_DB_PREFIX."events as e"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user"; +$sql.= " ORDER BY $sortfield $sortorder"; +$sql.= $db->plimit($conf->liste_limit+1, $offset); + +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows($result); + $i = 0; + + print_barre_liste($langs->trans("ListOfEvents"), $page, "listevents.php","",$sortfield,$sortorder,'',$num); + + print ''; + print ''; + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"e.type","","",'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"u.login","","",'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"e.label","","",'align="left"',$sortfield,$sortorder); + print ''; + print "\n"; /* - * Affichage liste des actions - * - */ -/* -$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,"; -$sql.= " a.id,".$db->pdate("a.datep")." as dp, ".$db->pdate("a.datea")." as da, a.fk_contact, a.note, a.label, a.percent as percent,"; -$sql.= " c.code as acode, c.libelle,"; -$sql.= " ut.login as logintodo, ut.rowid as useridtodo,"; -$sql.= " ud.login as logindone, ud.rowid as useriddone,"; -$sql.= " sp.name, sp.firstname"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; -$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s,"; -if (!$user->rights->societe->client->voir && !$socid) $sql .= " ".MAIN_DB_PREFIX."societe_commerciaux as sc,"; -$sql.= " ".MAIN_DB_PREFIX."actioncomm as a"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ut ON a.fk_user_action = ut.rowid"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ud ON a.fk_user_done = ud.rowid"; -$sql.= " WHERE a.fk_soc = s.rowid AND c.id = a.fk_action"; -if ($_GET["type"]) -{ - $sql .= " AND c.id = ".$_GET["type"]; -} -if ($_GET["time"] == "today") -{ - $sql .= " AND date_format(a.datep, '%d%m%Y') = ".strftime("%d%m%Y",time()); -} -if ($socid) -{ - $sql .= " AND s.rowid = ".$socid; -} -if (!$user->rights->societe->client->voir && !$socid) //restriction -{ - $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -} -if ($status == 'done') { $sql.= " AND a.percent = 100"; } -if ($status == 'todo') { $sql.= " AND a.percent < 100"; } -$sql .= " ORDER BY ".$sortfield." ".$sortorder; -$sql .= $db->plimit( $limit + 1, $offset); + // Lignes des champs de filtre + print ''; + print ''; -dolibarr_syslog("comm/action/index.php sql=".$sql); -$resql=$db->query($sql); -if ($resql) -{ - $actionstatic=new ActionComm($db); - $societestatic=new Societe($db); - - $num = $db->num_rows($resql); - $title="DoneAndToDoActions"; - if ($status == 'done') $title="DoneActions"; - if ($status == 'todo') $title="ToDoActions"; - $param="&status=".$status; + print ''; - if ($socid) - { - $societe = new Societe($db); - $societe->fetch($socid); + print ''; - print_barre_liste($langs->trans($title."For",$societe->nom), $page, "index.php",$param,$sortfield,$sortorder,'',$num); - } - else - { - print_barre_liste($langs->trans($title), $page, "index.php",$param,$sortfield,$sortorder,'',$num); - } - $i = 0; - print "
 
  
"; - print ''; - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"acode",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DatePlanShort"),$_SERVER["PHP_SELF"],"a.datep",$param,'','',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateRealShort"),$_SERVER["PHP_SELF"],"a.datea",$param,'','',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AffectedTo"),$_SERVER["PHP_SELF"],"ut.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DoneBy"),$_SERVER["PHP_SELF"],"ud.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder); - print "\n"; + print ''; + + print ''; + + print ''; - $contactstatic = new Contact($db); + print "\n"; + print ''; +*/ + $var=True; - $var=true; - while ($i < min($num,$limit)) - { - $obj = $db->fetch_object($resql); - - $var=!$var; - - print ""; - - // Action (type) - print ''; - - print ''; - - print ''; - - // Titre - print ''; - - // Société - print ''; - - // Contact - print ''; - - // User to do - print ''; - - // User did - print ''; - - // Status/Percent - print ''; - - print "\n"; - $i++; - } - print "
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; - $actionstatic->id=$obj->id; - $actionstatic->code=$obj->acode; - $actionstatic->libelle=$obj->libelle; - print $actionstatic->getNomUrl(1,12); - print ''; - print dolibarr_print_date($obj->dp,"dayhour"); - print ''; - print dolibarr_print_date($obj->da,"dayhour"); - print ''; - print $obj->label; - print ''; - $societestatic->id=$obj->socid; - $societestatic->client=$obj->client; - $societestatic->nom=$obj->societe; - print $societestatic->getNomUrl(1,'',16); - print ''; - if ($obj->fk_contact > 0) - { - $contactstatic->name=$obj->name; - $contactstatic->firstname=$obj->firstname; - $contactstatic->id=$obj->fk_contact; - print $contactstatic->getNomUrl(1,'',16); - } - else - { - print " "; - } - print ''; - if ($obj->useridtodo) - { - $userstatic=new User($db,$obj->useridtodo); - $userstatic->id=$obj->useridtodo; - $userstatic->login=$obj->logintodo; - print $userstatic->getLoginUrl(1); - } - else print ' '; - print ''; - if ($obj->useriddone) - { - $userstatic=new User($db,$obj->useriddone); - $userstatic->id=$obj->useriddone; - $userstatic->login=$obj->logindone; - print $userstatic->getLoginUrl(1); - } - else print ' '; - print ''.$actionstatic->LibStatut($obj->percent,5).'
"; - $db->free($resql); + while ($i < min($num,$conf->liste_limit)) + { + $obj = $db->fetch_object(); + + $var=!$var; + print ""; + print ''.dolibarr_print_date($obj->dateevent,'dayhour').''; + print ''.$obj->type.''; + $userstatic->id=$obj->fk_user; + $userstatic->login=$obj->login; + print ''.$userstatic->getLoginUrl(1).''; + print ''.$obj->label.''; +// print ''.$obj->description.''; + print ' '; + print "\n"; + $i++; + } + print ""; + $db->free(); } else { - dolibarr_print_error($db); + dolibarr_print_error($db); } -*/ + $db->close(); diff --git a/htdocs/comm/action/pre.inc.php b/htdocs/comm/action/pre.inc.php index 34d4b06a8b6..819c94b64f5 100644 --- a/htdocs/comm/action/pre.inc.php +++ b/htdocs/comm/action/pre.inc.php @@ -46,7 +46,7 @@ function llxHeader($head = "", $urlp = "") // Actions $menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); @@ -54,7 +54,7 @@ function llxHeader($head = "", $urlp = "") $menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); // Events - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); if ($conf->societe->enabled) { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 38a0d90c7f7..7e7478a55b2 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -1,7 +1,7 @@ - * Copyright (C) 2003 Éric Seigne - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2008 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 @@ -16,16 +16,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * $Id$ - * $Source$ */ /** \file htdocs/comm/action/rapport/index.php \ingroup commercial \brief Page accueil des rapports des actions - \version $Revision$ + \version $Id$ */ require_once("./pre.inc.php"); diff --git a/htdocs/comm/action/rapport/pre.inc.php b/htdocs/comm/action/rapport/pre.inc.php index 1ec96c4ea1e..7c32abdb330 100644 --- a/htdocs/comm/action/rapport/pre.inc.php +++ b/htdocs/comm/action/rapport/pre.inc.php @@ -43,14 +43,15 @@ function llxHeader($head = "", $urlp = "") // Actions $menu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $menu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read); $menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); // Events - $menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); if ($conf->societe->enabled) { diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 5df4caa57ed..dbbafd9385b 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -269,7 +269,7 @@ class MenuLeft { // Actions $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); @@ -725,7 +725,7 @@ class MenuLeft { // Actions $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); @@ -735,7 +735,7 @@ class MenuLeft { $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); // Events - $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); } } diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php index 5945331825c..044dc5fa920 100644 --- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php @@ -250,7 +250,7 @@ class MenuLeft { // Actions $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo&filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); //$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done&filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); @@ -697,7 +697,7 @@ class MenuLeft { // Actions $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read); - $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=agenda", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); @@ -705,7 +705,7 @@ class MenuLeft { $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); // Events - $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->myactions->read); + $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); } } */ diff --git a/htdocs/includes/modules/modAgenda.class.php b/htdocs/includes/modules/modAgenda.class.php index 5da96742981..c44a3f1041c 100644 --- a/htdocs/includes/modules/modAgenda.class.php +++ b/htdocs/includes/modules/modAgenda.class.php @@ -99,7 +99,7 @@ class modAgenda extends DolibarrModules // $r++; $this->rights[$r][0] = 2401; - $this->rights[$r][1] = 'Lire les actions liees a son compte'; + $this->rights[$r][1] = 'Read actions/tasks linked to his account'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'myactions'; @@ -107,7 +107,7 @@ class modAgenda extends DolibarrModules $r++; $this->rights[$r][0] = 2402; - $this->rights[$r][1] = 'Creer/modifier/supprimer les actions liees a son compte'; + $this->rights[$r][1] = 'Create/modify/delete actions/tasks linked to his account'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'myactions'; @@ -115,7 +115,7 @@ class modAgenda extends DolibarrModules $r++; $this->rights[$r][0] = 2403; - $this->rights[$r][1] = 'Lire les actions des autres'; + $this->rights[$r][1] = 'Read actions/tasks of others'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'allactions'; @@ -123,13 +123,21 @@ class modAgenda extends DolibarrModules $r++; $this->rights[$r][0] = 2405; - $this->rights[$r][1] = 'Creer/modifier/supprimer les actions pour les autres'; + $this->rights[$r][1] = 'Create/modify/delete actions/tasks of others'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'allactions'; $this->rights[$r][5] = 'create'; $r++; + $this->rights[$r][0] = 2410; + $this->rights[$r][1] = 'Read Dolibarr audit events'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'events'; + $this->rights[$r][5] = 'read'; + $r++; + // Menus //------ $r=0; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index cecc516a889..39ae151fd56 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -399,6 +399,11 @@ Permission1101=Read delivery orders Permission1102=Create/modify delivery orders Permission1104=Validate delivery orders Permission1109=Delete delivery orders +Permission2401=Read actions/tasks linked to his account +Permission2402=Create/modify/delete actions/tasks linked to his account +Permission2403=Read actions/tasks of others +Permission2405=Create/modify/delete actions/tasks of others +Permission2410=Read Dolibarr audit events DictionnaryCompanyType=Company types DictionnaryCompanyJuridicalType=Juridical kinds of company DictionnaryCanton=Cantons diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 2a87173fb70..b430225bcb0 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -9,3 +9,5 @@ DoneBy=Done by Events=Events SearchAnAction=Search an action MenuDoneActions=Terminated actions +ListOfEvents=List of Dolibarr events + diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index b587398f448..8ef7c40b767 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -49,7 +49,7 @@ StatusActionToDo=To do StatusActionDone=Done MyActionsAsked=Actions I have asked MyActionsToDo=Actions I have to do -MyActionsDone=Actions I have done +MyActionsDone=Actions affected to me StatusActionInProcess=In process TasksHistoryForThisContact=Actions for this contact LastProspectDoNotContact=Do not contact diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index ae93aeea6bb..6daadf3ba56 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -398,6 +398,11 @@ Permission1101=Consulter les bons de livraison Permission1102=Créer/modifier les bons de livraison Permission1104=Valider les bons de livraison Permission1109=Supprimer les bons de livraison +Permission2401=Lire les actions/taches liees a son compte +Permission2402=Creer/modifier/supprimer les actions/taches liees a son compte +Permission2403=Lire les actions/taches des autres +Permission2405=Creer/modifier/supprimer les actions/taches pour les autres +Permission2410=Voir l'audit des évenements Dolibarr DictionnaryCompanyType=Types de sociétés DictionnaryCompanyJuridicalType=Formes juridiques DictionnaryCanton=Départements/Provinces/Cantons diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index e807e6152b7..7f764b506f8 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -9,3 +9,5 @@ DoneBy=R Events=Evênements SearchAnAction=Rechercher une action MenuDoneActions=Actions terminées +ListOfEvents=Liste des évènements Dolibarr + diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index 29640857fcf..2884ba067f7 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -48,9 +48,9 @@ NoRecordedProspects=Aucun prospect enregistr StatusActionToDo=À faire StatusActionDone=Réalisé StatusActionInProcess=En cours -MyActionsAsked=Actions que j'ai demandé -MyActionsToDo=Actions que j'ai à faire -MyActionsDone=Actions que j'ai faite +MyActionsAsked=Actions que j'ai demandées +MyActionsToDo=Actions qui me sont affectées +MyActionsDone=Actions que j'ai faites TasksHistoryForThisContact=Actions vis à vis de contact LastProspectDoNotContact=A ne pas contacter LastProspectNeverContacted=Non contactés diff --git a/mysql/migration/2.2.0-2.4.0.sql b/mysql/migration/2.2.0-2.4.0.sql index 0c984ee1715..79db861f2ae 100644 --- a/mysql/migration/2.2.0-2.4.0.sql +++ b/mysql/migration/2.2.0-2.4.0.sql @@ -218,3 +218,6 @@ insert into llx_c_prospectlevel (code,label,sortorder) values ('PL_HIGH', ' alter table llx_societe add column fk_prospectlevel varchar(12) after fournisseur; + +update llx_actioncomm set datea = datep where datea is null and percent = 100; +