Suite module action/agenda

This commit is contained in:
Laurent Destailleur 2008-03-02 18:47:42 +00:00
parent 9519e26fd9
commit ee144f32c8
30 changed files with 553 additions and 234 deletions

View File

@ -94,9 +94,17 @@ class ActionComm
global $langs,$conf; global $langs,$conf;
// Clean parameters // Clean parameters
$this->label=trim($this->label);
$this->note=trim($this->note);
if (! $this->percentage) $this->percentage = 0; if (! $this->percentage) $this->percentage = 0;
if (! $this->priority) $this->priority = 0; if (! $this->priority) $this->priority = 0;
if ($this->percentage > 100) $this->percentage = 100;
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep);
if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
$now=time(); $now=time();
if (! $this->type_id && $this->type_code) if (! $this->type_id && $this->type_code)
{ {
@ -113,8 +121,6 @@ class ActionComm
return -1; return -1;
} }
} }
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep);
if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
// Check parameters // Check parameters
if (! $this->type_id) if (! $this->type_id)
@ -300,7 +306,14 @@ class ActionComm
// Clean parameters // Clean parameters
$this->label=trim($this->label); $this->label=trim($this->label);
$this->note=trim($this->note); $this->note=trim($this->note);
if (! $this->percentage) $this->percentage = 0;
if (! $this->priority) $this->priority = 0;
if ($this->percentage > 100) $this->percentage = 100; if ($this->percentage > 100) $this->percentage = 100;
if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep);
if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
// Check parameters // Check parameters
if ($this->percentage == 0 && $this->userdone->id > 0) if ($this->percentage == 0 && $this->userdone->id > 0)
@ -313,7 +326,9 @@ class ActionComm
$sql.= " SET percent='".$this->percentage."'"; $sql.= " SET percent='".$this->percentage."'";
$sql.= ", label = ".($this->label ? "'".addslashes($this->label)."'":"null"); $sql.= ", label = ".($this->label ? "'".addslashes($this->label)."'":"null");
$sql.= ", datep = ".($this->datep ? "'".$this->db->idate($this->datep)."'" : 'null'); $sql.= ", datep = ".($this->datep ? "'".$this->db->idate($this->datep)."'" : 'null');
$sql.= ", datep2 = ".($this->datef ? "'".$this->db->idate($this->datef)."'" : 'null');
$sql.= ", datea = ".($this->date ? "'".$this->db->idate($this->date)."'" : 'null'); $sql.= ", datea = ".($this->date ? "'".$this->db->idate($this->date)."'" : 'null');
$sql.= ", datea2 = ".($this->dateend ? "'".$this->db->idate($this->dateend)."'" : 'null');
$sql.= ", note = ".($this->note ? "'".addslashes($this->note)."'":"null"); $sql.= ", note = ".($this->note ? "'".addslashes($this->note)."'":"null");
$sql.= ", fk_contact =". ($this->contact->id > 0 ? "'".$this->contact->id."'":"null"); $sql.= ", fk_contact =". ($this->contact->id > 0 ? "'".$this->contact->id."'":"null");
$sql.= ", priority = '".$this->priority."'"; $sql.= ", priority = '".$this->priority."'";

119
htdocs/admin/agenda.php Normal file
View File

@ -0,0 +1,119 @@
<?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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.
*/
/**
\file htdocs/admin/agenda.php
\ingroup agenda
\brief Page de configuration du module agenda
\version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/lib/agenda.lib.php');
if (!$user->admin)
accessforbidden();
$langs->load("admin");
$langs->load("other");
$langs->load("agenda");
$def = array();
$actionsave=$_POST["save"];
// Sauvegardes parametres
if ($actionsave)
{
$i=0;
$db->begin();
$i+=dolibarr_set_const($db,'MAIN_PASSWORD_VCALEXPORT',trim($_POST["MAIN_PASSWORD_VCALEXPORT"]),'chaine',0);
if ($i > 0)
{
$db->commit();
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
else
{
$db->rollback();
$mesg = "<font class=\"error\">".$langs->trans("SaveFailed")."</font>";
}
}
/**
* Vies
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
print '<br>';
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td width=\"30%\">".$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Value")."</td>";
//print "<td>".$langs->trans("Examples")."</td>";
print "<td>&nbsp;</td>";
print "</tr>";
print "<tr class=\"impair\">";
print "<td>".$langs->trans("PasswordTogetVCalExport")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"MAIN_PASSWORD_VCALEXPORT\" value=\"". ($_POST["MAIN_PASSWORD_VCALEXPORT"]?$_POST["MAIN_PASSWORD_VCALEXPORT"]:$conf->global->MAIN_PASSWORD_VCALEXPORT) . "\" size=\"40\"></td>";
print "<td>&nbsp;</td>";
print "</tr>";
print '</table>';
print '<br><center>';
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
print "</center>";
print "</form>\n";
clearstatcache();
if ($mesg) print "<br>$mesg<br>";
print "<br>";
// Show message
$message='';
$urlwithouturlroot=eregi_replace(DOL_URL_ROOT.'$','',$dolibarr_main_url_root);
$urlvcal='<a href="'.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=vcal&exportkey=..." target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=vcal&exportkey=...'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
$message.='<br>';
$urlical='<a href="'.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=ical&type=event&exportkey=..." target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/comm/action/agendaexport.php?format=ical&type=event&exportkey=...'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
print info_admin($message);
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@ -136,17 +136,6 @@ print '</div>';
if ($mesg) print "<br>$mesg<br>"; if ($mesg) print "<br>$mesg<br>";
print "<br>"; print "<br>";
// Show message
/*
$message='';
$urlwithouturlroot=eregi_replace(DOL_URL_ROOT.'$','',$dolibarr_main_url_root);
$urlvcal='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
$message.='<br>';
$urlical='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
print info_admin($message);
*/
$db->close(); $db->close();

View File

@ -334,7 +334,7 @@ foreach ($orders as $key => $value)
print "</td>\n"; print "</td>\n";
print ' <td valign="top" width="14" align="center">'; print ' <td valign="top" width="14" align="center">';
print $objMod->picto?img_object('',$objMod->picto):img_object('','generic'); print $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
print '</td><td valign="top" nowrap="nowrap">'.$objMod->getName(); print '</td><td valign="top">'.$objMod->getName();
print "</td>\n <td valign=\"top\">"; print "</td>\n <td valign=\"top\">";
print nl2br($objMod->getDesc()); print nl2br($objMod->getDesc());
print "</td>\n <td align=\"center\" valign=\"top\">"; print "</td>\n <td align=\"center\" valign=\"top\">";

View File

@ -15,16 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/admin/phenix.php \file htdocs/admin/phenix.php
\ingroup phenix \ingroup phenix
\brief Page de configuration du module Phenix \brief Page de configuration du module Phenix
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -224,7 +221,7 @@ print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("PhenixSyncro")."</td>"; print "<td colspan=\"2\">".$langs->trans("PhenixSyncro")."</td>";
print "</tr>"; print "</tr>";
if ($conf->societe->enabled) if ($conf->aganda->enabled)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 <EFBFBD>ric Seigne <erics@rycks.com> * Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
@ -203,15 +203,21 @@ print '<td>';
print '&nbsp;</td>'; print '&nbsp;</td>';
print "</tr>"; print "</tr>";
print "<tr class=\"impair\">";
print "<td>".$langs->trans("PasswordTogetVCalExport")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"PHPWEBCALENDAR_PASSWORD_VCALEXPORT\" value=\"". ($_POST["PHPWEBCALENDAR_PASSWORD_VCALEXPORT"]?$_POST["PHPWEBCALENDAR_PASSWORD_VCALEXPORT"]:$conf->global->PHPWEBCALENDAR_PASSWORD_VCALEXPORT) . "\" size=\"40\"></td>";
print "<td>&nbsp;</td>";
print "</tr>";
print "</table>"; print "</table>";
print "<br>"; print "<br>";
$var=true; $var=true;
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("WebCalSyncro")."</td>"; print "<td colspan=\"3\">".$langs->trans("WebCalSyncro")."</td>";
print "</tr>"; print "</tr>";
if ($conf->societe->enabled) if ($conf->agenda->enabled)
{ {
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
@ -305,10 +311,10 @@ print "<br>";
// Show message // Show message
$message=''; $message='';
$urlwithouturlroot=eregi_replace(DOL_URL_ROOT.'$','',$dolibarr_main_url_root); $urlwithouturlroot=eregi_replace(DOL_URL_ROOT.'$','',$dolibarr_main_url_root);
$urlvcal='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal'.'</a>'; $urlvcal='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal&exportkey=..." target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal&exportkey=...'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal); $message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
$message.='<br>'; $message.='<br>';
$urlical='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event'.'</a>'; $urlical='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event&exportkey=..." target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event&exportkey=...'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical); $message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
print info_admin($message); print info_admin($message);

View File

@ -28,6 +28,7 @@
require_once("./pre.inc.php"); require_once("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
$page = $_GET["page"]; $page = $_GET["page"];
$sortfield=$_GET["sortfield"]; $sortfield=$_GET["sortfield"];
@ -45,6 +46,8 @@ if ($user->societe_id > 0)
$socid = $user->societe_id; $socid = $user->societe_id;
} }
$year=isset($_GET["year"])?$_GET["year"]:date("Y");
$month=isset($_GET["month"])?$_GET["month"]:date("m");
/* /*
@ -71,10 +74,96 @@ if ($action=='delete_action')
llxHeader(); llxHeader();
print $langs->trans("FeatureNotYetAvailable"); //print $langs->trans("FeatureNotYetAvailable");
$now=mktime(0,0,0);
$prev = dol_get_prev_month($month, $year);
$prev_year = $prev['year'];
$prev_month = $prev['month'];
$next = dol_get_next_month($month, $year);
$next_year = $next['year'];
$next_month = $next['month'];
$max_day_in_month = date("t",dolibarr_mktime(0,0,0,$month,1,$year));
$max_day_in_prev_month = date("t",dolibarr_mktime(0,0,0,$prev_month,1,$prev_year));
$day = -date("w",dolibarr_mktime(0,0,0,$month,1,$year))+2;
if ($day > 1) $day -= 7;
// Show navigation bar
$nav ="<a href=\"?year=".$prev_year."&amp;month=".$prev_month."&amp;region=".$region."\">".img_previous($langs->trans("Previous"))."</a>\n";
$nav.=" <span id=\"month_name\">".dolibarr_print_date(dolibarr_mktime(0,0,0,$month,1,$year),"%b");
$nav.=" <a href=\"?year=".$year."&amp;region=".$region."\">".$year."</a>"."</span>\n";
$nav.=" <a href=\"?year=".$next_year."&amp;month=".$next_month."&amp;region=".$region."\">".img_next($langs->trans("Next"))."</a>\n";
print_fiche_titre($langs->trans("Calendar"),$nav,'');
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
echo ' <td align="center">'.$langs->trans("Monday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Tuesday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Wednesday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Thirday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Friday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Saturday")."</td>\n";
echo ' <td align="center">'.$langs->trans("Sunday")."</td>\n";
echo " </tr>\n";
for($iter_week = 0; $iter_week < 6 ; $iter_week++)
{
echo " <tr>\n";
for($iter_day = 0; $iter_day < 7; $iter_day++)
{
/* Show days before the beginning of the current month
(previous month) */
if($day <= 0)
{
$style='cal_other_month';
echo ' <td class="'.$style.'" width="14%">';
show_day_events ($db, $max_day_in_prev_month + $day, $prev_month, $prev_year, $style);
echo " </td>\n";
}
/* Show days of the current month */
elseif(($day <= $max_day_in_month))
{
$curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year);
if ($curtime < $now)
$style='cal_past_month';
else if($curtime == $now)
$style='cal_today';
else
$style='cal_current_month';
echo ' <td class="'.$style.'" width="14%">';
show_day_events ($db, $day, $month, $year, $style);
echo " </td>\n";
}
/* Show days after the current month (next month) */
else
{
$style='cal_other_month';
echo ' <td class="'.$style.'" width="14%">';
show_day_events ($db, $day - $max_day_in_month, $next_month, $next_year, $style);
echo "</td>\n";
}
$day++;
}
echo " </tr>\n";
}
echo "</table>\n";
$db->close(); $db->close();
llxFooter('$Date$ - $Revision$'); llxFooter('$Date$ - $Revision$');
function show_day_events($db, $day, $month, $year, $style)
{
print '<table class="border" width="100%">';
print '<tr><td align="left">'.$day.'</td></tr>';
print '<tr height="60"><td>&nbsp;</td></tr>';
print '</table>';
}
?> ?>

View File

@ -82,6 +82,7 @@ print '<table border="0" width="100%" class="notopnoleftnoright">';
print '<tr><td valign="top" width="30%" class="notopnoleft">'; print '<tr><td valign="top" width="30%" class="notopnoleft">';
// Search actions // Search actions
/*
$var=false; $var=false;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/action/listactions.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/comm/action/listactions.php">';
@ -90,13 +91,40 @@ print '<tr '.$bc[$var].'><td>';
print $langs->trans("Keyword").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Keyword").':</td><td><input type="text" class="flat" name="sf_ref" size="18"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '</tr>'; print '</tr>';
print "</form></table><br>\n"; print "</form></table><br>\n";
*/
$var=true;
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/action/listactions.php">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Calendar").'</td></tr>';
// All my actions
$var=!$var;
print '<tr '.$bc[$var].'><td><a href="'.DOL_URL_ROOT.'/comm/action/index.php?filtera='.$user->id.'&amp;filtert='.$user->id.'&amp;filterd='.$user->id.'">';
print img_picto('','object_calendar').' '.$langs->trans("AllMyActions").'</a></td></tr>';
// Actions i asked
$var=!$var;
print '<tr '.$bc[$var].'><td> &nbsp; &nbsp; &nbsp; <a href="'.DOL_URL_ROOT.'/comm/action/index.php?filtera='.$user->id.'">';
print img_picto('','object_calendar').' '.$langs->trans("MyActionsAsked").'</a></td></tr>';
// Actions affected to me
$var=!$var;
print '<tr '.$bc[$var].'><td> &nbsp; &nbsp; &nbsp; <a href="'.DOL_URL_ROOT.'/comm/action/index.php?filtert='.$user->id.'">';
print img_picto('','object_calendar').' '.$langs->trans("MyActionsToDo").'</a></td></tr>';
// Actions done by me
$var=!$var;
print '<tr '.$bc[$var].'><td> &nbsp; &nbsp; &nbsp; <a href="'.DOL_URL_ROOT.'/comm/action/index.php?filterd='.$user->id.'">';
print img_picto('','object_calendar').' '.$langs->trans("MyActionsDone").'</a></td></tr>';
// All actions of everybody
$var=!$var;
print '<tr '.$bc[$var].'><td><a href="'.DOL_URL_ROOT.'/comm/action/index.php">';
print img_picto('','object_calendar').' '.$langs->trans("AllActions").'</a></td></tr>';
print "</table></form><br>\n";
print '</td><td valign="top" width="70%" class="notopnoleftnoright">'; print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
show_array_actions_to_do(0); if ($conf->agenda->enabled) show_array_actions_to_do(10);
show_array_last_actions_done(5); if ($conf->agenda->enabled) show_array_last_actions_done(10);
print '</td></tr></table>'; print '</td></tr></table>';

View File

@ -42,6 +42,8 @@ $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
$page = isset($_GET["page"])?$_GET["page"]:$_POST["page"]; $page = isset($_GET["page"])?$_GET["page"]:$_POST["page"];
$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"];
// Security check // Security check
$socid = isset($_GET["socid"])?$_GET["socid"]:''; $socid = isset($_GET["socid"])?$_GET["socid"]:'';
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
@ -49,23 +51,33 @@ $result = restrictedArea($user, 'societe', $socid,'');
$canedit=1; $canedit=1;
if (! $user->rights->agenda->myactions->read) access_forbidden(); if (! $user->rights->agenda->myactions->read) access_forbidden();
if (! $user->rights->agenda->allactions->read) if (! $user->rights->agenda->allactions->read) $canedit=0;
if (! $user->rights->agenda->allactions->read || $_GET["filter"]=='mine')
{ {
$canedit=0; $filtera=$user->id;
$filtera="on"; $filtert=$user->id;
$filtert="on"; $filterd=$user->id;
$filterd="on";
} }
if ($page == -1) { $page = 0 ; } if ($page == -1) { $page = 0 ; }
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$offset = $limit * $page ; $offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC"; if (! $sortorder)
if (! $sortfield) $sortfield="a.datep"; {
$sortorder="ASC";
$status=isset($_GET["status"])?$_GET["status"]:$_POST["status"]; if ($status == 'todo') $sortorder="DESC";
if ($status == 'done') $sortorder="DESC";
}
if (! $sortfield)
{
$sortfield="a.percent";
if ($status == 'todo') $sortfield="a.datep";
if ($status == 'done') $sortfield="a.datea2";
}
llxHeader(); llxHeader();
$form=new Form($db);
/* /*
* Affichage liste des actions * Affichage liste des actions
@ -73,7 +85,9 @@ llxHeader();
*/ */
$sql = "SELECT s.nom as societe, s.rowid as socid, s.client,"; $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.= " a.id, ".$db->pdate("a.datep")." as dp, ".$db->pdate("a.datep2")." as dp2,";
$sql.= " ".$db->pdate("a.datea")." as da, ".$db->pdate("a.datea2")." as da2,";
$sql.= " a.fk_contact, a.note, a.label, a.percent as percent,";
$sql.= " c.code as acode, c.libelle,"; $sql.= " c.code as acode, c.libelle,";
$sql.= " ua.login as loginauthor, ua.rowid as useridauthor,"; $sql.= " ua.login as loginauthor, ua.rowid as useridauthor,";
$sql.= " ut.login as logintodo, ut.rowid as useridtodo,"; $sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
@ -92,7 +106,7 @@ if ($_GET["type"])
{ {
$sql .= " AND c.id = ".$_GET["type"]; $sql .= " AND c.id = ".$_GET["type"];
} }
if ($_GET["time"] == "today") if ($_REQUEST["time"] == "today")
{ {
$sql .= " AND date_format(a.datep, '%d%m%Y') = ".strftime("%d%m%Y",time()); $sql .= " AND date_format(a.datep, '%d%m%Y') = ".strftime("%d%m%Y",time());
} }
@ -106,12 +120,12 @@ if (!$user->rights->societe->client->voir && !$socid) //restriction
} }
if ($status == 'done') { $sql.= " AND a.percent = 100"; } if ($status == 'done') { $sql.= " AND a.percent = 100"; }
if ($status == 'todo') { $sql.= " AND a.percent < 100"; } if ($status == 'todo') { $sql.= " AND a.percent < 100"; }
if ($filtera || $filtert || $filterd) if ($filtera > 0 || $filtert > 0 || $filterd > 0)
{ {
$sql.= " AND ("; $sql.= " AND (";
if ($filtera) $sql.= " a.fk_user_author = ".$user->id; if ($filtera > 0) $sql.= " a.fk_user_author = ".$filtera;
if ($filtert) $sql.= ($filtera?" OR ":"")." a.fk_user_action = ".$user->id; if ($filtert > 0) $sql.= ($filtera>0?" OR ":"")." a.fk_user_action = ".$filtert;
if ($filterd) $sql.= ($filtera||$filtert?" OR ":"")." a.fk_user_done = ".$user->id; if ($filterd > 0) $sql.= ($filtera>0||$filtert>0?" OR ":"")." a.fk_user_done = ".$filterd;
$sql.= ")"; $sql.= ")";
} }
$sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= " ORDER BY ".$sortfield." ".$sortorder;
@ -142,28 +156,45 @@ if ($resql)
print_barre_liste($langs->trans($title), $page, "index.php",$param,$sortfield,$sortorder,'',$num); print_barre_liste($langs->trans($title), $page, "index.php",$param,$sortfield,$sortorder,'',$num);
} }
print '<br>'; //print '<br>';
if ($canedit)
{
print '<form name="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<form name="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<table class="border" width="100%"><tr>'; print '<input type="hidden" name="status" value="'.$status.'">';
print '<input type="hidden" name="time" value="'.$_REQUEST["time"].'">';
print '<table class="border" width="100%">';
print '<tr>';
print '<td>'; print '<td>';
print $langs->trans("Filter"); //print '<input type="checkbox" name="userasked" '.($canedit?'':'disabled="true" ').($filtera?'checked="true"':'').'> ';
print $langs->trans("ActionsAskedBy");
print '</td><td>';
print $form->select_users($filtera,'userasked',1,'',!$canedit);
print '</td>'; print '</td>';
print '<td><input type="checkbox" name="userasked" '.($canedit?'':'disabled="true" ').($filtera?'checked="true"':'').'> '; print '<td rowspan="3" align="center" valign="middle">';
print $langs->trans("MyActionsAsked"); print '<input type="submit" class="button" value="'.$langs->trans("Search").'" '.($canedit?'':'disabled="true"') .'>';
print '</td>'; print '</td>';
print '<td><input type="checkbox" name="usertodo" '.($canedit?'':'disabled="true" ').($filtert?'checked="true"':'').'> '; print '</tr>';
print $langs->trans("MyActionsToDo");
print '</td>'; print '<tr>';
print '<td><input type="checkbox" name="userdone" '.($canedit?'':'disabled="true" ').($filterd?'checked="true"':'').'> '; print '<td>';
print $langs->trans("MyActionsDone"); //print '<input type="checkbox" name="usertodo" '.($canedit?'':'disabled="true" ').($filtert?'checked="true"':'').'> ';
print '</td>'; print $langs->trans("ActionsToDoBy");
print '<td align="center">'; print '</td><td>';
print '<input type="submit" class="button" value="'.$langs->trans("ToFilter").'" '.($canedit?'':'disabled="true"') .'>'; print $form->select_users($filtert,'usertodo',1,'',!$canedit);
print '</td>'; print '</td></tr>';
print '</tr></table>';
print '<tr>';
print '<td>';
//print '<input type="checkbox" name="userdone" '.($canedit?'':'disabled="true" ').($filterd?'checked="true"':'').'> ';
print $langs->trans("ActionsDoneBy");
print '</td><td>';
print $form->select_users($filterd,'userdone',1,'',!$canedit);
print '</td></tr>';
print '</table>';
print '</form><br>'; print '</form><br>';
}
$i = 0; $i = 0;
@ -171,7 +202,7 @@ if ($resql)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"acode",$param,"","",$sortfield,$sortorder); 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("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("DateRealShort"),$_SERVER["PHP_SELF"],"a.datea2",$param,'','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$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("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("Contact"),$_SERVER["PHP_SELF"],"a.fk_contact",$param,"","",$sortfield,$sortorder);
@ -205,7 +236,7 @@ if ($resql)
print '</td>'; print '</td>';
print '<td align="left" nowrap="nowrap">'; print '<td align="left" nowrap="nowrap">';
print dolibarr_print_date($obj->da,"day"); print dolibarr_print_date($obj->da2,"day");
print '</td>'; print '</td>';
// Titre // Titre

View File

@ -283,7 +283,7 @@ print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
* Actions to do * Actions to do
* *
*/ */
show_array_actions_to_do(0); show_array_actions_to_do(10);
/* /*

View File

@ -16,19 +16,17 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/comm/prospect/index.php \file htdocs/comm/prospect/index.php
\ingroup commercial \ingroup commercial
\brief Page accueil de la zone prospection \brief Page accueil de la zone prospection
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
$langs->load("propal"); $langs->load("propal");
@ -160,57 +158,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
*/ */
print '</td><td valign="top" width="70%" class="notopnoleftnoright">'; print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
if ($conf->agenda->enabled) if ($conf->agenda->enabled) show_array_actions_to_do(10);
{
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, a.fk_user_author, a.percent,";
$sql.= " c.code, c.libelle,";
$sql.= " s.nom as sname, s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".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 .= " WHERE c.id = a.fk_action AND a.percent < 100 AND s.rowid = a.fk_soc AND a.fk_user_action = ".$user->id;
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql .= " ORDER BY a.datea DESC";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
if ($num > 0)
{
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4">'.$langs->trans("ActionsToDo").'</td>';
print "</tr>\n";
$i = 0;
while ($i < $num )
{
$obj = $db->fetch_object($resql);
$var=!$var;
print "<tr $bc[$var]><td>".dolibarr_print_date($obj->da)."</td>";
// Action
$transcode=$langs->trans("Action".$obj->code);
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle);
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$obj->id."\">".img_object($langs->trans("ShowAction"),"task").' '.$libelle.'</a></td>';
// Tiers
print '<td><a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->sname.'</a></td>';
$i++;
}
print "</table><br>";
}
$db->free($resql);
}
else
{
dolibarr_print_error($db);
}
}
/* /*
* Dernieres propales ouvertes * Dernieres propales ouvertes

View File

@ -791,12 +791,13 @@ class Form
/** /**
* \brief Retourne la liste déroulante des utilisateurs * \brief Retourne la liste déroulante des utilisateurs
* \param selected Id contact pré-sélectionné * \param selected Id user preselected
* \param htmlname Nom champ formulaire * \param htmlname Field name in form
* \param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue * \param show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
* \param disabled If select list must be disabled
* \param exclude Liste des id utilisateurs à exclure * \param exclude Liste des id utilisateurs à exclure
*/ */
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='') function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0)
{ {
// Permettre l'exclusion d'utilisateurs // Permettre l'exclusion d'utilisateurs
if (is_array($exclude)) if (is_array($exclude))
@ -813,7 +814,7 @@ class Form
dolibarr_syslog("Form::select_users sql=".$sql); dolibarr_syslog("Form::select_users sql=".$sql);
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
print '<select class="flat" name="'.$htmlname.'">'; print '<select class="flat" name="'.$htmlname.'"'.($disabled?' disabled="true"':'').'>';
if ($show_empty) print '<option value="-1"'.($id==-1?' selected="true"':'').'>&nbsp;</option>'."\n"; if ($show_empty) print '<option value="-1"'.($id==-1?' selected="true"':'').'>&nbsp;</option>'."\n";
$num = $this->db->num_rows(); $num = $this->db->num_rows();
$i = 0; $i = 0;

View File

@ -271,12 +271,14 @@ class MenuLeft {
$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."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;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", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); if ($user->rights->agenda->allactions->read)
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); {
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
}
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->allactions->read);
} }
// Prospects // Prospects
@ -720,22 +722,21 @@ class MenuLeft {
{ {
$langs->load("agenda"); $langs->load("agenda");
// Calendar
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->myactions->read);
// Actions // 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."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;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", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); if ($user->rights->agenda->allactions->read)
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); {
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
}
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
// Events // Calendar
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->allactions->read);
} }
} }

View File

@ -252,12 +252,14 @@ class MenuLeft {
$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."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;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", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); if ($user->rights->agenda->myactions->read)
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); {
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
}
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->allactions->read);
} }
// Prospects // Prospects
@ -692,20 +694,18 @@ class MenuLeft {
{ {
$langs->load("agenda"); $langs->load("agenda");
// Calendar
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->myactions->read);
// Actions // 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."/comm/action/indexactions.php?leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?leftmenu=agenda&amp;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", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
//$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?leftmenu=agenda&amp;time=today", $langs->trans("Today"), 2, $user->rights->agenda->myactions->read);
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
// Events // Calendar
$newmenu->add_submenu(DOL_URL_ROOT."/comm/action/listevents.php?leftmenu=agenda", $langs->trans("Events"), 0, $user->rights->agenda->events->read); $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?leftmenu=agenda", $langs->trans("Calendar"), 0, $user->rights->agenda->allactions->read);
} }
} }
*/ */

View File

@ -67,7 +67,7 @@ class modAgenda extends DolibarrModules
// Config pages // Config pages
//------------- //-------------
$this->config_page_url = array(); $this->config_page_url = array("agenda.php");
// Dependances // Dependances
//------------ //------------
@ -130,14 +130,6 @@ class modAgenda extends DolibarrModules
$this->rights[$r][5] = 'create'; $this->rights[$r][5] = 'create';
$r++; $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 // Menus
//------ //------
$r=0; $r=0;

View File

@ -15,13 +15,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/ */
/** /**
\defgroup bookmark Module Bookmark \defgroup bookmark Module Bookmark
\brief Module pour g<EFBFBD>rer les Bookmarks \brief Module pour g<EFBFBD>rer les Bookmarks
\version $Id$
*/ */
/** /**
@ -50,14 +49,14 @@ class modBookmark extends DolibarrModules
$this->db = $DB ; $this->db = $DB ;
$this->numero = 330; $this->numero = 330;
$this->family = "technic"; $this->family = "other";
$this->name = "Bookmarks"; $this->name = "Bookmarks";
$this->description = "Gestion des Bookmarks"; $this->description = "Gestion des Bookmarks";
$this->revision = explode(' ','$Revision$'); $this->revision = explode(' ','$Revision$');
$this->version = $this->revision[1]; $this->version = $this->revision[1];
$this->const_name = 'MAIN_MODULE_BOOKMARK'; $this->const_name = 'MAIN_MODULE_BOOKMARK';
$this->special = 0; $this->special = 2;
$this->picto='bookmark'; $this->picto='bookmark';
// Dir // Dir

View File

@ -51,7 +51,7 @@ class modBoutique extends DolibarrModules
$this->numero = 800; $this->numero = 800;
$this->family = "products"; $this->family = "products";
$this->name = "OSCommerce 1"; $this->name = "OSCommerce direct";
$this->description = "Interface de visualisation d'une boutique OSCommerce"; $this->description = "Interface de visualisation d'une boutique OSCommerce";
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_BOUTIQUE'; $this->const_name = 'MAIN_MODULE_BOUTIQUE';

View File

@ -52,7 +52,7 @@ class modOSCommerce2 extends DolibarrModules
$this->numero = 900; $this->numero = 900;
$this->family = "products"; $this->family = "products";
$this->name = "OSCommerce 2"; $this->name = "OSCommerce by WS";
$this->description = "Interface de visualisation d'une boutique OSCommerce via des Web services.\nCe module requiert d'installer les composants dans /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server"; $this->description = "Interface de visualisation d'une boutique OSCommerce via des Web services.\nCe module requiert d'installer les composants dans /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server";
$this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version
$this->const_name = 'MAIN_MODULE_OSCOMMERCEWS'; $this->const_name = 'MAIN_MODULE_OSCOMMERCEWS';

View File

@ -14,13 +14,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/ */
/** \defgroup phenix Module Phenix /** \defgroup phenix Module Phenix
\brief Module to include Phenix into Dolibarr and \brief Module to include Phenix into Dolibarr and
add Dolibarr events directly inside a Phenix database. add Dolibarr events directly inside a Phenix database.
\version $Id$
*/ */
/** /**

View File

@ -14,14 +14,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/ */
/** /**
\file htdocs/includes/triggers/interface_modWebcalendar_webcalsynchro.class.php \file htdocs/includes/triggers/interface_modWebcalendar_webcalsynchro.class.php
\ingroup webcalendar \ingroup webcalendar
\brief Fichier de gestion des triggers webcalendar \brief Fichier de gestion des triggers webcalendar
\version $Id$
*/ */
include_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php'); include_once(DOL_DOCUMENT_ROOT.'/webcal/webcal.class.php');

View File

@ -171,7 +171,7 @@ ModuleFamilyProducts=Products Management
ModuleFamilyHr=Human Ressource Management ModuleFamilyHr=Human Ressource Management
ModuleFamilyProjects=Projects/Collaborative work ModuleFamilyProjects=Projects/Collaborative work
ModuleFamilyOther=Other ModuleFamilyOther=Other
ModuleFamilyTechnic=Tools or System Modules ModuleFamilyTechnic=Tools mutli-modules
ModuleFamilyExperimental=Experimental modules ModuleFamilyExperimental=Experimental modules
ModuleFamilyFinancial=Financial Modules (Accountancy/Treasury) ModuleFamilyFinancial=Financial Modules (Accountancy/Treasury)
ModuleFamilyECM=ECM ModuleFamilyECM=ECM
@ -260,9 +260,9 @@ Module600Name=Notifications
Module600Desc=Send notifications (by email) on Dolibarr business events Module600Desc=Send notifications (by email) on Dolibarr business events
Module700Name=Donations Module700Name=Donations
Module700Desc=Donations' management Module700Desc=Donations' management
Module800Name=OSCommerce 1 Module800Name=OSCommerce direct
Module800Desc=Interface to show an OSCommerce shop via direct database access Module800Desc=Interface to show an OSCommerce shop via direct database access
Module900Name=OSCommerce 2 Module900Name=OSCommerce by WS
Module900Desc=Interface to show an OSCommerce shop via Web services.\nThis module requiere you to install components from /oscommerce_ws/ws_server into your OSCommerce server. See README file in /oscommerce_ws/ws_server. Module900Desc=Interface to show an OSCommerce shop via Web services.\nThis module requiere you to install components from /oscommerce_ws/ws_server into your OSCommerce server. See README file in /oscommerce_ws/ws_server.
Module1200Name=Mantis Module1200Name=Mantis
Module1200Desc=Mantis integration Module1200Desc=Mantis integration
@ -273,7 +273,7 @@ Module2200Desc=Gestion du droit de pr
Module2300Name=Menus Module2300Name=Menus
Module2300Desc=Menus' management Module2300Desc=Menus' management
Module2400Name=Agenda Module2400Name=Agenda
Module2400Desc=Agenda and actions management Module2400Desc=Actions/tasks and agenda management
Module2500Name=Electronic Content Management Module2500Name=Electronic Content Management
Module2500Desc=Save and share documents Module2500Desc=Save and share documents
Permission11=Read invoices Permission11=Read invoices
@ -523,7 +523,7 @@ LogEvents=Events
Audit=Audit Audit=Audit
ListEvents=Audit events ListEvents=Audit events
ListOfEvents=List of events ListOfEvents=List of events
LogEventDesc=You can enable here log for some common events in the dolibarr event table. LogEventDesc=You can enable here log for some common events in the Dolibarr events table. Administrators can then see its content via menu <b>System tools - Audit</b>. Warning, this feature can consume a large amount of datas in database.
AreaForAdminOnly=Those features can be used by <b>administrator users</b> only. Administrator features and help are identified in Dolibarr by the following picto: AreaForAdminOnly=Those features can be used by <b>administrator users</b> only. Administrator features and help are identified in Dolibarr by the following picto:
SystemInfoDesc=System information is miscellanous technical information you get in read only mode and visible for administrators only. SystemInfoDesc=System information is miscellanous technical information you get in read only mode and visible for administrators only.
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit. SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
@ -872,3 +872,13 @@ DeleteMenu=Delete menu entry
ConfirmDeleteMenu=Are you sure you want to delete menu entry <b>%s</b> ? ConfirmDeleteMenu=Are you sure you want to delete menu entry <b>%s</b> ?
DeleteLine=Delete line DeleteLine=Delete line
ConfirmDeleteLine=Are you sure you want to delete this line ? ConfirmDeleteLine=Are you sure you want to delete this line ?
##### Tax #####
TaxSetup=Taxes, social contributions and dividends module setup
OptionVatMode=Option d'exigibilité de TVA
OptionVATDefault=Standard
OptionVATDebitOption=Option services sur debit
OptionVatDefaultDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur paiement pour les services
OptionVatDebitOptionDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur facturation (débit) pour les services
##### Agenda #####
AgendaSetup=Actions/Tasks and agenda module setup
PasswordTogetVCalExport=Key to authorize vcal export link

View File

@ -1,5 +1,6 @@
# Dolibarr language file - en_US - agenda # Dolibarr language file - en_US - agenda
ActionsArea=Actions area Actions=Actions/Tasks
ActionsArea=Actions/Tasks area
Agenda=Agenda Agenda=Agenda
Agendas=Agendas Agendas=Agendas
Calendar=Calendar Calendar=Calendar
@ -7,7 +8,14 @@ Calendars=Calendars
AffectedTo=Affected to AffectedTo=Affected to
DoneBy=Done by DoneBy=Done by
Events=Events Events=Events
SearchAnAction=Search an action SearchAnAction=Search an action/task
MenuDoneActions=Terminated actions MenuToDoActions=All uncomplete actions
MenuDoneActions=All terminated actions
MenuToDoMyActions=My incomplete actions
MenuDoneMyActions=My terminated actions
ListOfEvents=List of Dolibarr events ListOfEvents=List of Dolibarr events
ActionsAskedBy=Actions recorded by
ActionsToDoBy=Actions affected to
ActionsDoneBy=Actions done by
AllMyActions=All my actions/tasks
AllActions=Toutes les actions/tasks

View File

@ -7,10 +7,10 @@ Customer=Customer
Customers=Customers Customers=Customers
Prospect=Prospect Prospect=Prospect
Prospects=Prospects Prospects=Prospects
DeleteAction=Delete a task DeleteAction=Delete an action/task
NewAction=New action NewAction=New action/task
AddAction=Add action AddAction=Add action/task
AddAnAction=Add an action AddAnAction=Add an action/task
AddActionRendezVous=Add a Rendez-Vous task AddActionRendezVous=Add a Rendez-Vous task
ConfirmDeleteAction=Are you sure you want to delete this task ? ConfirmDeleteAction=Are you sure you want to delete this task ?
CardAction=Action card CardAction=Action card
@ -35,11 +35,11 @@ ListOfProspects=List of prospects
ListOfCustomers=List of customers ListOfCustomers=List of customers
LastDoneTasks=Last %s done tasks LastDoneTasks=Last %s done tasks
LastRecordedTasks=Last recorded tasks LastRecordedTasks=Last recorded tasks
LastActionsToDo=Last %s oldest actions not completed
DoneAndToDoActionsFor=Done and To do tasks for %s DoneAndToDoActionsFor=Done and To do tasks for %s
DoneAndToDoActions=Done and To do tasks DoneAndToDoActions=Done and To do tasks
DoneActions=Done actions DoneActions=Done actions
DoneActionsFor=Done actions for %s DoneActionsFor=Done actions for %s
MenuToDoActions=Uncomplete actions
ToDoActions=Uncomplete actions ToDoActions=Uncomplete actions
ToDoActionsFor=Uncomplete actions for %s ToDoActionsFor=Uncomplete actions for %s
SendPropalRef=Send commercial proposal %s SendPropalRef=Send commercial proposal %s
@ -47,7 +47,7 @@ SendOrderRef=Send order %s
NoRecordedProspects=No prospect recorded NoRecordedProspects=No prospect recorded
StatusActionToDo=To do StatusActionToDo=To do
StatusActionDone=Done StatusActionDone=Done
MyActionsAsked=Actions I have asked MyActionsAsked=Actions I have recorded
MyActionsToDo=Actions I have to do MyActionsToDo=Actions I have to do
MyActionsDone=Actions affected to me MyActionsDone=Actions affected to me
StatusActionInProcess=In process StatusActionInProcess=In process
@ -57,12 +57,12 @@ LastProspectNeverContacted=Never contacted
LastProspectToContact=To contact LastProspectToContact=To contact
LastProspectContactInProcess=Contact in process LastProspectContactInProcess=Contact in process
LastProspectContactDone=Contact done LastProspectContactDone=Contact done
DateActionPlanned=Date planned DateActionPlanned=Date action planned for
DateActionDone=Date done DateActionDone=Date action done
ActionAskedBy=Action asked by ActionAskedBy=Action asked by
ActionAffectedTo=Action affected to ActionAffectedTo=Action affected to
ActionDoneBy=Action done by ActionDoneBy=Action done by
ActionUserAsk=Requerent ActionUserAsk=Recorded by
ErrorStatusCantBeZeroIfStarted=If field '<b>Date done</b>' is filled, action is started (or finished), so field '<b>Status</b>' can't be 0%%. ErrorStatusCantBeZeroIfStarted=If field '<b>Date done</b>' is filled, action is started (or finished), so field '<b>Status</b>' can't be 0%%.
ActionAC_TEL=Phone call ActionAC_TEL=Phone call
ActionAC_FAX=Send fax ActionAC_FAX=Send fax

View File

@ -170,7 +170,7 @@ ModuleFamilyProducts=Gestion produits
ModuleFamilyHr=Ressources humaines ModuleFamilyHr=Ressources humaines
ModuleFamilyProjects=Projets/Travail collaboratif ModuleFamilyProjects=Projets/Travail collaboratif
ModuleFamilyOther=Autre ModuleFamilyOther=Autre
ModuleFamilyTechnic=Modules outils ou système ModuleFamilyTechnic=Outils multi-modules
ModuleFamilyExperimental=Modules expérimentaux (ne pas utiliser en production) ModuleFamilyExperimental=Modules expérimentaux (ne pas utiliser en production)
ModuleFamilyFinancial=Modules financiers (Compta/trésorerie) ModuleFamilyFinancial=Modules financiers (Compta/trésorerie)
ModuleFamilyECM=GED ModuleFamilyECM=GED
@ -259,9 +259,9 @@ Module600Name=Notifications
Module600Desc=Envoi de notifications (par mail) sur les évênements métiers Dolibarr Module600Desc=Envoi de notifications (par mail) sur les évênements métiers Dolibarr
Module700Name=Dons Module700Name=Dons
Module700Desc=Gestion des dons Module700Desc=Gestion des dons
Module800Name=OSCommerce 1 Module800Name=OSCommerce direct
Module800Desc=Interface de visualisation d'une boutique OSCommerce par accès direct en base. Module800Desc=Interface de visualisation d'une boutique OSCommerce par accès direct en base.
Module900Name=OSCommerce 2 Module900Name=OSCommerce by WS
Module900Desc=Interface de visualisation d'une boutique OSCommerce par accès via des Web services.\nCe module requiert d'installer les fichiers de /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server. Module900Desc=Interface de visualisation d'une boutique OSCommerce par accès via des Web services.\nCe module requiert d'installer les fichiers de /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server.
Module1200Name=Mantis Module1200Name=Mantis
Module1200Desc=Interface avec le bug tracking Mantis Module1200Desc=Interface avec le bug tracking Mantis
@ -272,7 +272,7 @@ Module2200Desc=Gestion du droit de pr
Module2300Name=Menus Module2300Name=Menus
Module2300Desc=Administration des menus par base de données Module2300Desc=Administration des menus par base de données
Module2400Name=Agenda Module2400Name=Agenda
Module2400Desc=Gestion de l'agenda et des actions Module2400Desc=Gestion des actions/taches et de l'agenda
Module2500Name=Gestion Electronique de Document Module2500Name=Gestion Electronique de Document
Module2500Desc=Permet de stocker et administrer une base de documents Module2500Desc=Permet de stocker et administrer une base de documents
Permission11=Consulter les factures Permission11=Consulter les factures
@ -522,7 +522,7 @@ LogEvents=Ev
Audit=Audit Audit=Audit
ListEvents=Audit évènements ListEvents=Audit évènements
ListOfEvents=Liste des évènements ListOfEvents=Liste des évènements
LogEventDesc=Vous pouvez activer ici, le traçage de l'historique des evènements dans la table des evènements Dolibarr. LogEventDesc=Vous pouvez activer ici, le traçage de l'historique des evènements dans la table des evènements Dolibarr. Cet historique est consultable aux administrateurs dans le menu <b>Outils systèmes - Audit</b>. Attention, cette fonctionnalité peut consommer un gros volume de données.
AreaForAdminOnly=Ces fonctions ne sont accessibles qu'à un utilisateur administrateur. La fonction d'administrateur et les aides pour les administrateurs sont identifiées dans Dolibarr par le picto suivant: AreaForAdminOnly=Ces fonctions ne sont accessibles qu'à un utilisateur administrateur. La fonction d'administrateur et les aides pour les administrateurs sont identifiées dans Dolibarr par le picto suivant:
SystemInfoDesc=Les informations systèmes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement. SystemInfoDesc=Les informations systèmes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement.
SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type administrateurs. Aucune permission Dolibarr ne permet d'étendre le cercle des utilisateurs autorisés à cet espace. SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type administrateurs. Aucune permission Dolibarr ne permet d'étendre le cercle des utilisateurs autorisés à cet espace.
@ -583,7 +583,7 @@ WebCalAddEventOnStatusPropal=Ajouter
WebCalAddEventOnStatusContract=Ajouter évênement dans calendrier sur changement de statut des contrats WebCalAddEventOnStatusContract=Ajouter évênement dans calendrier sur changement de statut des contrats
WebCalAddEventOnStatusBill=Ajouter évênement dans calendrier sur changement de statut des factures WebCalAddEventOnStatusBill=Ajouter évênement dans calendrier sur changement de statut des factures
WebCalAddEventOnStatusMember=Ajouter évênement dans calendrier sur changement de statut des adhérents WebCalAddEventOnStatusMember=Ajouter évênement dans calendrier sur changement de statut des adhérents
WebCalUrlForVCalExport=Un lien d'export du calendrier au format <b>%s</b> sera disponible à l'url: %s WebCalUrlForVCalExport=Un lien d'export du calendrier au format <b>%s</b> sera disponible à l'url:<br>%s
WebCalCheckWebcalSetup=La configuration du module Webcal est peut-être incorrecte. WebCalCheckWebcalSetup=La configuration du module Webcal est peut-être incorrecte.
##### Invoices ##### ##### Invoices #####
BillsSetup=Configuration du module Factures BillsSetup=Configuration du module Factures
@ -884,3 +884,7 @@ OptionVATDefault=Standard
OptionVATDebitOption=Option services sur debit OptionVATDebitOption=Option services sur debit
OptionVatDefaultDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur paiement pour les services OptionVatDefaultDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur paiement pour les services
OptionVatDebitOptionDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur facturation (débit) pour les services OptionVatDebitOptionDesc=L'exigibilité de la TVA est:<br>- sur livraison pour les biens<br>- sur facturation (débit) pour les services
##### Agenda #####
AgendaSetup=Configuration du module actions/taches et agenda
PasswordTogetVCalExport=Clé pour autoriser export vcal

View File

@ -1,5 +1,6 @@
# Dolibarr language file - fr_FR - agenda # Dolibarr language file - fr_FR - agenda
ActionsArea=Espaces actions Actions=Actions/Taches
ActionsArea=Espace actions/taches
Agenda=Agenda Agenda=Agenda
Agendas=Agendas Agendas=Agendas
Calendar=Calendrier Calendar=Calendrier
@ -7,7 +8,14 @@ Calendars=Calendriers
AffectedTo=Affecté à AffectedTo=Affecté à
DoneBy=Réalisé par DoneBy=Réalisé par
Events=Evênements Events=Evênements
SearchAnAction=Rechercher une action SearchAnAction=Rechercher une action/tache
MenuDoneActions=Actions terminées MenuToDoActions=Les actions incomplètes
MenuDoneActions=Les actions terminées
MenuToDoMyActions=Mes actions incomplètes
MenuDoneMyActions=Mes actions terminées
ListOfEvents=Liste des évènements Dolibarr ListOfEvents=Liste des évènements Dolibarr
ActionsAskedBy=Actions enregistrées par
ActionsToDoBy=Actions affectées à
ActionsDoneBy=Actions réalisées par
AllMyActions=Toutes mes actions/taches
AllActions=Toutes les actions/taches

View File

@ -7,10 +7,10 @@ Customer=Client
Customers=Clients Customers=Clients
Prospect=Prospect Prospect=Prospect
Prospects=Prospects Prospects=Prospects
DeleteAction=Effacer une action DeleteAction=Effacer une action/tache
NewAction=Nouvelle action NewAction=Nouvelle action/tache
AddAction=Créer action AddAction=Créer action/tache
AddAnAction=Créer une action AddAnAction=Créer une action/tache
AddActionRendezVous=Créer un Rendez-Vous AddActionRendezVous=Créer un Rendez-Vous
ConfirmDeleteAction=Êtes-vous sûr de vouloir effacer cet action ? ConfirmDeleteAction=Êtes-vous sûr de vouloir effacer cet action ?
CardAction=Fiche action CardAction=Fiche action
@ -34,10 +34,10 @@ ShowProspect=Afficher prospect
ListOfProspects=Liste des prospects ListOfProspects=Liste des prospects
ListOfCustomers=Liste des clients ListOfCustomers=Liste des clients
LastDoneTasks=Les %s dernières actions effectuées LastDoneTasks=Les %s dernières actions effectuées
LastActionsToDo=Les %s plus anciennes actions incomplètes
LastRecordedTasks=Dernières actions enregistrées LastRecordedTasks=Dernières actions enregistrées
DoneActions=Liste des actions réalisées DoneActions=Liste des actions réalisées
DoneActionsFor=Liste des actions réalisées pour %s DoneActionsFor=Liste des actions réalisées pour %s
MenuToDoActions=Actions incomplètes
ToDoActions=Liste des actions incomplètes ToDoActions=Liste des actions incomplètes
ToDoActionsFor=Liste des actions incomplètes pour %s ToDoActionsFor=Liste des actions incomplètes pour %s
DoneAndToDoActionsFor=Liste des actions réalisées ou à faire pour %s DoneAndToDoActionsFor=Liste des actions réalisées ou à faire pour %s
@ -48,7 +48,7 @@ NoRecordedProspects=Aucun prospect enregistr
StatusActionToDo=À faire StatusActionToDo=À faire
StatusActionDone=Réalisé StatusActionDone=Réalisé
StatusActionInProcess=En cours StatusActionInProcess=En cours
MyActionsAsked=Actions que j'ai demandées MyActionsAsked=Actions que j'ai enregistrées
MyActionsToDo=Actions qui me sont affectées MyActionsToDo=Actions qui me sont affectées
MyActionsDone=Actions que j'ai faites MyActionsDone=Actions que j'ai faites
TasksHistoryForThisContact=Actions vis à vis de contact TasksHistoryForThisContact=Actions vis à vis de contact
@ -57,12 +57,12 @@ LastProspectNeverContacted=Non contact
LastProspectToContact=A contacter LastProspectToContact=A contacter
LastProspectContactInProcess=Contact en cours LastProspectContactInProcess=Contact en cours
LastProspectContactDone=Prospects contactés LastProspectContactDone=Prospects contactés
DateActionPlanned=Date planification DateActionPlanned=Date réalisation prévue
DateActionDone=Date réalisation DateActionDone=Date réalisation effective
ActionAskedBy=Action saisie par ActionAskedBy=Action enregistrée par
ActionAffectedTo=Action affectée à ActionAffectedTo=Action affectée à
ActionDoneBy=Action faite par ActionDoneBy=Action faite par
ActionUserAsk=Demandeur ActionUserAsk=Enregistré par
ErrorStatusCantBeZeroIfStarted=Si le champ '<b>Date de réalisation</b>' est renseigné alors l'action est commencée voire finie, aussi le champ 'Etat' ne peut etre 0%%. ErrorStatusCantBeZeroIfStarted=Si le champ '<b>Date de réalisation</b>' est renseigné alors l'action est commencée voire finie, aussi le champ 'Etat' ne peut etre 0%%.
ActionAC_TEL=Appel téléphonique ActionAC_TEL=Appel téléphonique
ActionAC_FAX=Envoi fax ActionAC_FAX=Envoi fax

View File

@ -28,11 +28,14 @@
\brief Show actions to do array \brief Show actions to do array
\param max Max nb of records \param max Max nb of records
*/ */
function show_array_actions_to_do($max) function show_array_actions_to_do($max=5)
{ {
global $langs, $conf, $user, $db, $bc, $socid; global $langs, $conf, $user, $db, $bc, $socid;
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, a.fk_user_author,"; include_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
include_once(DOL_DOCUMENT_ROOT.'/client.class.php');
$sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, a.fk_user_author, a.percent,";
$sql.= " c.code, c.libelle,"; $sql.= " c.code, c.libelle,";
$sql.= " s.nom as sname, s.rowid, s.client"; $sql.= " s.nom as sname, s.rowid, s.client";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
@ -45,6 +48,7 @@ function show_array_actions_to_do($max)
$sql .= " AND s.rowid = ".$socid; $sql .= " AND s.rowid = ".$socid;
} }
$sql .= " ORDER BY a.datep DESC, a.id DESC"; $sql .= " ORDER BY a.datep DESC, a.id DESC";
$sql .= $db->plimit($max, 0);
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
@ -53,7 +57,9 @@ function show_array_actions_to_do($max)
if ($num > 0) if ($num > 0)
{ {
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="9">'.$langs->trans("ActionsToDo").'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastActionsToDo",$max).'</td>';
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
print '</tr>';
$var = true; $var = true;
$i = 0; $i = 0;
@ -94,8 +100,6 @@ function show_array_actions_to_do($max)
$i++; $i++;
} }
// TODO Ajouter rappel pour "il y a des contrats à mettre en service"
// TODO Ajouter rappel pour "il y a des contrats qui arrivent à expiration"
print "</table><br>"; print "</table><br>";
} }
$db->free($resql); $db->free($resql);
@ -111,11 +115,11 @@ function show_array_actions_to_do($max)
\brief Show last actions array \brief Show last actions array
\param max Max nb of records \param max Max nb of records
*/ */
function show_array_last_actions_done($max) function show_array_last_actions_done($max=5)
{ {
global $langs, $conf, $user, $db, $bc, $socid; global $langs, $conf, $user, $db, $bc, $socid;
$sql = "SELECT a.id, a.percent, ".$db->pdate("a.datea")." as da, a.fk_user_author,"; $sql = "SELECT a.id, a.percent, ".$db->pdate("a.datea")." as da, ".$db->pdate("a.datea2")." as da2, a.fk_user_author, a.label,";
$sql.= " c.code, c.libelle,"; $sql.= " c.code, c.libelle,";
$sql.= " s.rowid, s.nom as sname, s.client"; $sql.= " s.rowid, s.nom as sname, s.client";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
@ -130,7 +134,7 @@ function show_array_last_actions_done($max)
{ {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
} }
$sql .= " ORDER BY a.datea DESC"; $sql .= " ORDER BY a.datea2 DESC";
$sql .= $db->plimit($max, 0); $sql .= $db->plimit($max, 0);
$resql=$db->query($sql); $resql=$db->query($sql);
@ -139,7 +143,9 @@ function show_array_last_actions_done($max)
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("LastDoneTasks",$max).'</td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("LastDoneTasks",$max).'</td>';
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
print '</tr>';
$var = true; $var = true;
$i = 0; $i = 0;
@ -152,11 +158,13 @@ function show_array_last_actions_done($max)
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td><a href=\"".DOL_URL_ROOT."/comm/action/fiche.php?id=$obj->id\">".img_object($langs->trans("ShowTask"),"task");
$transcode=$langs->trans("Action".$obj->code); $staticaction->code=$obj->code;
$libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle); $staticaction->libelle=$obj->libelle;
print $libelle; $staticaction->id=$obj->id;
print '</a></td>'; print '<td>'.$staticaction->getNomUrl(1,12).'</td>';
print '<td>'.dolibarr_trunc($obj->label,24).'</td>';
$customerstatic->id=$obj->rowid; $customerstatic->id=$obj->rowid;
$customerstatic->nom=$obj->sname; $customerstatic->nom=$obj->sname;
@ -164,7 +172,7 @@ function show_array_last_actions_done($max)
print '<td>'.$customerstatic->getNomUrl(1,'',24).'</td>'; print '<td>'.$customerstatic->getNomUrl(1,'',24).'</td>';
// Date // Date
print '<td width="100" align="right">'.dolibarr_print_date($obj->da,'day'); print '<td width="100" align="right">'.dolibarr_print_date($obj->da2,'day');
print "</td>"; print "</td>";
// Statut // Statut

66
htdocs/lib/date.lib.php Normal file
View File

@ -0,0 +1,66 @@
<?php
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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.
* or see http://www.gnu.org/
*/
/**
\file htdocs/lib/date.lib.php
\brief Ensemble de fonctions de base de dolibarr sous forme d'include
\version $Id$
*/
/** \brief Return previous month
* \param month Month
* \param year Year
* \return array Previous year,month
*/
function dol_get_prev_month($month, $year)
{
if ($month == 1)
{
$prev_month = 12;
$prev_year = $year - 1;
}
else
{
$prev_month = $month-1;
$prev_year = $year;
}
return array('year' => $prev_year, 'month' => $prev_month);
}
/** \brief Return next month
* \param month Month
* \param year Year
* \return array Next year,mont
*/
function dol_get_next_month ($month, $year)
{
if ($month == 12)
{
$next_month = 1;
$next_year = $year + 1;
}
else
{
$next_month = $month + 1;
$next_year = $year;
}
return array('year' => $next_year, 'month' => $next_month);
}
?>

View File

@ -565,6 +565,7 @@ function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
} }
/** /**
\brief Returns formated date \brief Returns formated date
\param fmt Format (Exemple: 'Y-m-d H:i:s') \param fmt Format (Exemple: 'Y-m-d H:i:s')
@ -1754,10 +1755,10 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
/** /**
\brief Fonction servant a afficher les fleches de navigation dans les pages de listes \brief Fonction servant a afficher les fleches de navigation dans les pages de listes
\param page numéro de la page \param page Numéro de la page
\param file lien \param file Lien
\param options autres parametres d'url a propager dans les liens ("" par defaut) \param options Autres parametres d'url a propager dans les liens ("" par defaut)
\param nextpage faut-il une page suivante \param nextpage Faut-il une page suivante
*/ */
function print_fleche_navigation($page,$file,$options='',$nextpage) function print_fleche_navigation($page,$file,$options='',$nextpage)
{ {

View File

@ -220,4 +220,5 @@ insert into llx_c_prospectlevel (code,label,sortorder) values ('PL_HIGH', '
alter table llx_societe add column fk_prospectlevel varchar(12) after fournisseur; 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; update llx_actioncomm set datea = datep where datea is null and percent = 100;
update llx_actioncomm set datea2 = datea where datea2 is null and percent = 100;