diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php
index ae6c9942762..07e1a6b306b 100644
--- a/dev/skeletons/modMyModule.class.php
+++ b/dev/skeletons/modMyModule.class.php
@@ -70,12 +70,15 @@ class modMyModule extends DolibarrModules
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
$this->picto='generic';
- // Data directories to create when module is enabled
+ // Data directories to create when module is enabled.
$this->dirs = array();
//$this->dirs[0] = DOL_DATA_ROOT.'/mymodule;
//$this->dirs[1] = DOL_DATA_ROOT.'/mymodule/temp;
- // Config pages. Put here list of php page names stored in admmin directory used to setup module
+ // Relative path to module style sheet if exists. Example: '/mymodule/mycss.css'.
+ $this->style_sheet = '';
+
+ // Config pages. Put here list of php page names stored in admmin directory used to setup module.
$this->config_page_url = array("mymodulesetuppage.php");
// Dependencies
diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php
index efc88f5610d..f0f437d73bc 100644
--- a/htdocs/conf/conf.class.php
+++ b/htdocs/conf/conf.class.php
@@ -65,6 +65,8 @@ class Conf
var $propal;
var $categorie;
var $oscommerce2;
+ var $css;
+ var $css_modules=array();
/**
@@ -100,6 +102,8 @@ class Conf
{
if (! defined("$key")) define ("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_FILE during install)
$this->global->$key=$value;
+ // If this is constant for a css file activated by a module
+ if (eregi('MAIN_MODULE_([A-Z_]+)_CSS',$key)) $this->css_modules[]=$value;
}
$i++;
}
diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php
index 989584b27ad..1d32bc3c00d 100644
--- a/htdocs/contact.class.php
+++ b/htdocs/contact.class.php
@@ -93,15 +93,16 @@ class Contact extends CommonObject
$this->name=trim($this->name);
if (! $this->socid) $this->socid = 0;
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user_creat)";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user_creat, priv)";
$sql.= " VALUES (now(),";
if ($this->socid > 0) $sql.= " ".$this->socid.",";
else $sql.= "null,";
$sql.= "'".addslashes($this->name)."',";
- $sql.= $user->id;
+ $sql.= $user->id.",";
+ $sql.= $this->priv;
$sql.= ")";
- dolibarr_syslog("Contact.class::create sql=".$sql);
+ dolibarr_syslog("Contact::create sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
@@ -127,7 +128,7 @@ class Contact extends CommonObject
else
{
$this->error=$this->db->error();
- dolibarr_syslog("Contact.class::create ".$this->error);
+ dolibarr_syslog("Contact::create ".$this->error);
return -1;
}
}
@@ -177,10 +178,11 @@ class Contact extends CommonObject
$sql .= ", phone_perso = '".addslashes($this->phone_perso)."'";
$sql .= ", phone_mobile = '".addslashes($this->phone_mobile)."'";
$sql .= ", jabberid = '".addslashes($this->jabberid)."'";
+ $sql .= ", priv = '".$this->priv."'";
if ($user) $sql .= ", fk_user_modif=".$user->id;
$sql .= " WHERE rowid=".$id;
- dolibarr_syslog("Contact.class::update sql=".$sql,LOG_DEBUG);
-
+
+ dolibarr_syslog("Contact::update sql=".$sql,LOG_DEBUG);
$result = $this->db->query($sql);
if (! $result)
{
@@ -371,7 +373,8 @@ class Contact extends CommonObject
$sql.= " c.address, c.cp, c.ville,";
$sql.= " c.fk_pays, p.libelle as pays, p.code as pays_code,";
$sql.= " c.birthday,";
- $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.note,";
+ $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,";
+ $sql.= " c.priv, c.note,";
$sql.= " u.rowid as user_id, u.login as user_login";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid";
@@ -413,6 +416,7 @@ class Contact extends CommonObject
$this->email = $obj->email;
$this->jabberid = $obj->jabberid;
+ $this->priv = $obj->priv;
$this->mail = $obj->email;
$this->birthday = $obj->birthday;
@@ -505,7 +509,7 @@ class Contact extends CommonObject
$sql.=" AND fk_socpeople = ". $this->id;
$sql.=" GROUP BY tc.element";
- dolibarr_syslog("Contact.class::load_ref_elements sql=".$sql);
+ dolibarr_syslog("Contact::load_ref_elements sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
@@ -526,7 +530,7 @@ class Contact extends CommonObject
else
{
$this->error=$this->db->error()." - ".$sql;
- dolibarr_syslog("Contact.class::load_ref_elements Error ".$this->error);
+ dolibarr_syslog("Contact::load_ref_elements Error ".$this->error);
return -1;
}
}
@@ -822,6 +826,19 @@ class Contact extends CommonObject
}
+ /**
+ * \brief Return translated label of Public or Private
+ * \param type Type (0 = public, 1 = private)
+ * \return string Label translated
+ */
+ function LibPubPriv($statut)
+ {
+ global $langs;
+ if ($statut=='1') return $langs->trans('ContactPrivate');
+ else return $langs->trans('ContactPublic');
+ }
+
+
/**
* \brief Initialise le contact avec valeurs fictives aléatoire
*/
diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php
index fa5319b970c..057f15b366e 100644
--- a/htdocs/contact/fiche.php
+++ b/htdocs/contact/fiche.php
@@ -98,6 +98,7 @@ if ($user->rights->societe->contact->creer)
$contact->phone_mobile = $_POST["phone_mobile"];
$contact->fax = $_POST["fax"];
$contact->jabberid = $_POST["jabberid"];
+ $contact->priv = $_POST["priv"];
$contact->note = $_POST["note"];
@@ -167,6 +168,7 @@ if ($user->rights->societe->contact->creer)
$contact->phone_mobile = $_POST["phone_mobile"];
$contact->fax = $_POST["fax"];
$contact->jabberid = $_POST["jabberid"];
+ $contact->priv = $_POST["priv"];
$contact->note = $_POST["note"];
@@ -307,10 +309,19 @@ if ($user->rights->societe->contact->creer)
print '
| '.$langs->trans("PhoneMobile").' | | ';
print ''.$langs->trans("Fax").' | |
';
+ // EMail
print '| '.$langs->trans("Email").' | |
';
+ // Jabberid
print '| Jabberid | |
';
+ // Visibility
+ print '| '.$langs->trans("ContactVisibility").' | ';
+ $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
+ $form->select_array('priv',$selectarray,$contact->priv,0);
+ print ' |
';
+
+ // Note
print '| '.$langs->trans("Note").' | |
';
print ' |
';
@@ -392,8 +403,15 @@ if ($user->rights->societe->contact->creer)
}
print '';
+ // Jabberid
print '| Jabberid | |
';
+ // Visibility
+ print '| '.$langs->trans("ContactVisibility").' | ';
+ $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
+ $form->select_array('priv',$selectarray,$contact->priv,0);
+ print ' |
';
+
print '| '.$langs->trans("Note").' | ';
print ' |
';
+ // Jabberid
print '| Jabberid | '.$contact->jabberid.' |
';
+ print '| '.$langs->trans("ContactVisibility").' | ';
+ print $contact->LibPubPriv($contact->priv);
+ print ' |
';
+
print '| '.$langs->trans("Note").' | ';
print nl2br($contact->note);
print ' |
';
@@ -592,7 +615,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
print ''.$langs->trans('Modify').'';
}
- if (! $contact->user_id && $user->rights->user->user->creer && $contact->socid > 0)
+ if (! $contact->user_id && $user->rights->user->user->creer)
{
print ''.$langs->trans("CreateDolibarrLogin").'';
}
diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php
index a50c497c841..5ede80da901 100644
--- a/htdocs/contact/index.php
+++ b/htdocs/contact/index.php
@@ -40,8 +40,10 @@ $search_nom=isset($_GET["search_nom"])?$_GET["search_nom"]:$_POST["search_nom"];
$search_prenom=isset($_GET["search_prenom"])?$_GET["search_prenom"]:$_POST["search_prenom"];
$search_societe=isset($_GET["search_societe"])?$_GET["search_societe"]:$_POST["search_societe"];
$search_email=isset($_GET["search_email"])?$_GET["search_email"]:$_POST["search_email"];
+$search_priv=isset($_GET["search_priv"])?$_GET["search_priv"]:(isset($_POST["search_priv"])?$_POST["search_priv"]:'');
$type = isset($_GET["type"])?$_GET["type"]:$_POST["type"];
+
$view=isset($_GET["view"])?$_GET["view"]:$_POST["view"];
$sall=isset($_GET["contactname"])?$_GET["contactname"]:$_POST["contactname"];
@@ -71,9 +73,13 @@ if ($type == "f") {
$titre=$langs->trans("ListOfContacts").' ('.$langs->trans("ThirdPartySuppliers").')';
$urlfiche="fiche.php";
}
-if ($view == 'phone') { $text="( Vue T�l�phones)"; }
+if ($type == "o") {
+ $titre=$langs->trans("ListOfContacts").' ('.$langs->trans("OthersNotLinkedToThirdParty").')';
+ $urlfiche="";
+}
+if ($view == 'phone') { $text="( Vue Telephones)"; }
if ($view == 'mail') { $text=" (Vue EMail)"; }
-if ($view == 'recent') { $text=" (R�cents)"; }
+if ($view == 'recent') { $text=" (Recents)"; }
$titre = $titre." $text";
if ($_POST["button_removefilter"])
@@ -82,9 +88,10 @@ if ($_POST["button_removefilter"])
$search_prenom="";
$search_societe="";
$search_email="";
+ $search_priv="";
$sall="";
}
-
+if ($search_priv < 0) $search_priv='';
@@ -95,8 +102,10 @@ if ($_POST["button_removefilter"])
llxHeader();
+$form=new Form($db);
+
$sql = "SELECT s.rowid as socid, s.nom, ";
-$sql.= " p.rowid as cidp, p.name, p.firstname, p.email, p.phone, p.phone_mobile, p.fax,";
+$sql.= " p.rowid as cidp, p.name, p.firstname, p.email, p.phone, p.phone_mobile, p.fax, p.priv,";
$sql.= " ".$db->pdate("p.tms")." as tms";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
@@ -106,10 +115,22 @@ if (!$user->rights->societe->client->voir && !$socid) //restriction
{
$sql .= " AND IFNULL(sc.fk_user, ".$user->id.") = " .$user->id;
}
-if ($_GET["userid"]) // statut commercial
+if ($_GET["userid"]) // propre au commercial
{
$sql .= " AND p.fk_user_creat=".$_GET["userid"];
}
+
+// Filter to exclude not owned private contacts
+if ($search_priv != '0' && $search_priv != '1')
+{
+ $sql .= " AND (p.priv='0' OR (p.priv='1' AND p.fk_user_creat=".$user->id."))";
+}
+else
+{
+ if ($search_priv == '0') $sql .= " AND p.priv='0'";
+ if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")";
+}
+
if ($search_nom) // filtre sur le nom
{
$sql .= " AND p.name like '%".addslashes($search_nom)."%'";
@@ -126,6 +147,10 @@ if ($search_email) // filtre sur l'email
{
$sql .= " AND p.email like '%".addslashes($search_email)."%'";
}
+if ($type == "o") // filtre sur type
+{
+ $sql .= " AND p.fk_soc IS NULL";
+}
if ($type == "f") // filtre sur type
{
$sql .= " AND fournisseur = 1";
@@ -167,7 +192,6 @@ else
dolibarr_syslog("contact/index.php sql=".$sql);
$result = $db->query($sql);
-
if ($result)
{
$contactstatic=new Contact($db);
@@ -191,13 +215,15 @@ if ($result)
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")." ".$langs->trans("or")." ".$langs->trans("EMail")."): ".$sall;
}
+ $param="&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email";
+ if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=$search_priv";
+
// Ligne des titres
print '';
- print_liste_field_titre($langs->trans("Lastname"),"index.php","p.name", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", '', $sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Firstname"),"index.php","p.firstname", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", '', $sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Company"),"index.php","s.nom", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", '', $sortfield,$sortorder);
- print '| '.$langs->trans("Phone").' | ';
-
+ print_liste_field_titre($langs->trans("Lastname"),"index.php","p.name", $begin, $param, '', $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Firstname"),"index.php","p.firstname", $begin, $param, '', $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Company"),"index.php","s.nom", $begin, $param, '', $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Phone"),"index.php","p.phone", $begin, $param, '', $sortfield,$sortorder);
if ($_GET["view"] == 'phone')
{
print ''.$langs->trans("Mobile").' | ';
@@ -205,22 +231,23 @@ if ($result)
}
else
{
- print_liste_field_titre($langs->trans("EMail"),"index.php","p.email", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", "", $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("EMail"),"index.php","p.email", $begin, $param, '', $sortfield,$sortorder);
}
- print_liste_field_titre($langs->trans("DateModification"),"index.php","p.tms", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", 'align="center"', $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("DateModification"),"index.php","p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("ContactVisibility"),"index.php","p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
print ' | ';
print "
\n";
// Ligne des champs de filtres
print '';
print '| ';
- print '';
+ print '';
print ' | ';
print '';
print '';
print ' | ';
print '';
- print '';
+ print '';
print ' | ';
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
{
@@ -246,6 +273,10 @@ if ($result)
}
print ' | ';
+ print '';
+ $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
+ $form->select_array('search_priv',$selectarray,$search_priv,1);
+ print ' | ';
print '';
print '';
print ' ';
@@ -315,6 +346,9 @@ if ($result)
// Date
print ' | '.dolibarr_print_date($obj->tms,"day").' | ';
+ // Private/Public
+ print ''.$contactstatic->LibPubPriv($obj->priv).' | ';
+
// Link export vcard
print '';
print '';
diff --git a/htdocs/contact/pre.inc.php b/htdocs/contact/pre.inc.php
index 21ef0b30514..55b44ab9253 100644
--- a/htdocs/contact/pre.inc.php
+++ b/htdocs/contact/pre.inc.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 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
@@ -14,40 +15,51 @@
* 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/contact/pre.inc.php
+ \brief File to manage left menu for contact area
+ \version $Id$
+*/
require("../main.inc.php");
+
+
function llxHeader($head = "", $urlp = "")
{
- global $langs, $user, $conf;
+ global $langs, $user, $conf;
- $langs->load("companies");
- $langs->load("commercial");
+ $langs->load("companies");
+ $langs->load("commercial");
- top_menu($head);
+ top_menu($head);
- $menu = new Menu();
+ $menu = new Menu();
- $menu->add(DOL_URL_ROOT."/contact/index.php", $langs->trans("Contacts"));
- if ($user->rights->societe->contact->creer)
- {
- $menu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?action=create", $langs->trans("NewContact"));
- }
+ if ($user->rights->societe->contact->lire)
+ {
+ $menu->add(DOL_URL_ROOT."/contact/index.php", $langs->trans("Contacts"));
+ }
+ if ($user->rights->societe->contact->creer)
+ {
+ $menu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?action=create", $langs->trans("NewContact"));
+ }
+ if ($user->rights->societe->contact->lire)
+ {
+ $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
+ $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
+ $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+ $menu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
- $menu->add(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts"));
+ $menu->add(DOL_URL_ROOT."/contact/index.php?view=recent", $langs->trans("LastContacts"));
+ $menu->add(DOL_URL_ROOT."/contact/index.php?view=phone", $langs->trans("Phones"));
+ $menu->add(DOL_URL_ROOT."/contact/index.php?view=mail", $langs->trans("EMails"));
- $menu->add(DOL_URL_ROOT."/contact/index.php?view=recent", $langs->trans("LastContacts"));
-
- $menu->add(DOL_URL_ROOT."/contact/index.php?view=phone", $langs->trans("Phones"));
-
- $menu->add(DOL_URL_ROOT."/contact/index.php?view=mail", $langs->trans("EMails"));
-
- left_menu($menu->liste);
+ $menu->add(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts"));
+ }
+
+ left_menu($menu->liste);
}
?>
diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php
index 2609d0efea2..cc76387030f 100644
--- a/htdocs/includes/menus/barre_left/eldy_backoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php
@@ -202,7 +202,7 @@ class MenuLeft {
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
}
$newmenu->add_submenu(DOL_URL_ROOT."/fourn/liste.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/fourn/stats.php",$langs->trans("Statistics"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire);
}
@@ -213,7 +213,7 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("Prospects"), 1, $user->rights->societe->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
// Clients
@@ -223,13 +223,18 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("Customers"), 1, $user->rights->societe->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
// Contacts
$newmenu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("Contacts"), 0, $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->contact->creer);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire);
// Catégories
if ($conf->categorie->enabled)
@@ -287,6 +292,10 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("Contacts"), 0, $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->contact->creer);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
// Propal
if ($conf->propal->enabled)
diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
index 020eec83d96..49c99b37247 100644
--- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
@@ -205,7 +205,7 @@ class MenuLeft {
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 2, $user->rights->societe->creer && $user->rights->fournisseur->lire);
}
$newmenu->add_submenu(DOL_URL_ROOT."/fourn/liste.php?leftmenu=suppliers", $langs->trans("List"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=suppliers&type=f",$langs->trans("Contacts"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire && $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/fourn/stats.php",$langs->trans("Statistics"), 2, $user->rights->societe->lire && $user->rights->fournisseur->lire);
}
@@ -216,7 +216,7 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("Prospects"), 2, $user->rights->societe->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
// Clients
@@ -226,14 +226,18 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("Customers"), 1, $user->rights->societe->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer);
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
}
// Contacts
$newmenu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("Contacts"), 0, $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->contact->creer);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
-
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
+ //$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire);
}
/*
@@ -271,7 +275,12 @@ class MenuLeft {
$newmenu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("Contacts"), 0, $user->rights->societe->contact->lire);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->contact->creer);
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
*/
+
// Propal
if ($conf->propal->enabled)
{
diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php
index 909fd735969..3de9a2ec56b 100644
--- a/htdocs/includes/modules/DolibarrModules.class.php
+++ b/htdocs/includes/modules/DolibarrModules.class.php
@@ -18,13 +18,12 @@
* 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$
*/
/**
- \file htdocs/includes/modules/DolibarrModules.class.php
- \brief Fichier de description et activation des modules Dolibarr
+ \file htdocs/includes/modules/DolibarrModules.class.php
+ \brief Fichier de description et activation des modules Dolibarr
+ \version $Id$
*/
@@ -36,16 +35,20 @@ class DolibarrModules
{
//! Database handler
var $db;
+ //! Relative path to module style sheet
+ var $style_sheet = '';
+ //! Path to create when module activated
+ var $dirs = array();
//! Tableau des boites
var $boxes;
//! Tableau des constantes
var $const;
//! Tableau des droits
var $rights;
- //! Tableau des documents
- var $docs;
//! Tableau des menus
var $menu=array();
+ //! Tableau des documents ???
+ var $docs;
var $dbversion;
@@ -79,6 +82,9 @@ class DolibarrModules
// Insere la constante d'activation module
if (! $err) $err+=$this->_active();
+ // Insere le nom de la feuille de style
+ if (! $err) $err+=$this->insert_style_sheet();
+
// Insere les constantes associees au module dans llx_const
if (! $err) $err+=$this->insert_const();
@@ -173,6 +179,9 @@ class DolibarrModules
// Supprime la constante d'activation du module
$err+=$this->_unactive();
+ // Supprime les boites de la liste des boites disponibles
+ $err+=$this->delete_style_sheet();
+
// Supprime les boites de la liste des boites disponibles
$err+=$this->delete_boxes();
@@ -484,42 +493,89 @@ class DolibarrModules
}
- /**
- \brief Supprime les boites
- \return int Nombre d'erreurs (0 si ok)
- */
- function delete_boxes()
- {
- $err=0;
-
- if (is_array($this->boxes))
- {
- foreach ($this->boxes as $key => $value)
- {
- //$titre = $this->boxes[$key][0];
- $file = $this->boxes[$key][1];
- //$note = $this->boxes[$key][2];
-
- $sql = "DELETE ".MAIN_DB_PREFIX."boxes";
- $sql.= " FROM ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def";
- $sql.= " WHERE ".MAIN_DB_PREFIX."boxes.box_id = ".MAIN_DB_PREFIX."boxes_def.rowid";
- $sql.= " AND ".MAIN_DB_PREFIX."boxes_def.file = '".addslashes($file)."'";
- dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql);
- $this->db->query($sql);
-
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
- $sql.= " WHERE file = '".addslashes($file)."'";
- dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql);
- if (! $this->db->query($sql))
- {
- $err++;
- }
- }
- }
-
- return $err;
- }
+ /**
+ \brief Supprime les boites
+ \return int Nombre d'erreurs (0 si ok)
+ */
+ function delete_boxes()
+ {
+ $err=0;
+
+ if (is_array($this->boxes))
+ {
+ foreach ($this->boxes as $key => $value)
+ {
+ //$titre = $this->boxes[$key][0];
+ $file = $this->boxes[$key][1];
+ //$note = $this->boxes[$key][2];
+
+ $sql = "DELETE ".MAIN_DB_PREFIX."boxes";
+ $sql.= " FROM ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def";
+ $sql.= " WHERE ".MAIN_DB_PREFIX."boxes.box_id = ".MAIN_DB_PREFIX."boxes_def.rowid";
+ $sql.= " AND ".MAIN_DB_PREFIX."boxes_def.file = '".addslashes($file)."'";
+ dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql);
+ $this->db->query($sql);
+
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
+ $sql.= " WHERE file = '".addslashes($file)."'";
+ dolibarr_syslog("DolibarrModules::delete_boxes sql=".$sql);
+ if (! $this->db->query($sql))
+ {
+ $err++;
+ }
+ }
+ }
+
+ return $err;
+ }
+ /**
+ \brief Desactive feuille de style du module par suppression ligne dans llx_const
+ \return int Nombre d'erreurs (0 si ok)
+ */
+ function delete_style_sheet()
+ {
+ $err=0;
+
+ if ($this->style_sheet)
+ {
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."const";
+ $sql.= " WHERE name = '".$this->const_name."_CSS'";
+ dolibarr_syslog("DolibarrModules::delete_style_sheet sql=".$sql);
+ if (! $this->db->query($sql))
+ {
+ $err++;
+ }
+ }
+
+ return $err;
+ }
+
+ /**
+ \brief Active la feuille de style associee au module par insertion ligne dans llx_const
+ \return int Nombre d'erreurs (0 si ok)
+ */
+ function insert_style_sheet()
+ {
+ $err=0;
+
+ if ($this->style_sheet)
+ {
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible)";
+ $sql.= " VALUES ('".$this->const_name."_CSS','chaine','".$this->style_sheet."','Style sheet for module ".$this->name."','0')";
+ dolibarr_syslog("DolibarrModules::insert_style_sheet sql=".$sql);
+ $resql=$this->db->query($sql);
+ /* Allow duplicate key
+ if (! $resql)
+ {
+ $err++;
+ }
+ */
+ }
+
+ return $err;
+ }
+
/**
\brief Insere les constantes associees au module dans llx_const
\return int Nombre d'erreurs (0 si ok)
@@ -548,17 +604,18 @@ class DolibarrModules
if (! $visible) $visible='0';
if (strlen($note))
{
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible) VALUES ('$name','$type','$val','$note','$visible');";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible) VALUES ('$name','$type','$val','$note','$visible')";
}
elseif (strlen($val))
{
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,visible) VALUES ('$name','$type','$val','$visible');";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,visible) VALUES ('$name','$type','$val','$visible')";
}
else
{
- $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,visible) VALUES ('$name','$type','$visible');";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,visible) VALUES ('$name','$type','$visible')";
}
+ dolibarr_syslog("DolibarrModules::insert_const sql=".$sql);
if (! $this->db->query($sql) )
{
$err++;
@@ -585,7 +642,7 @@ class DolibarrModules
//print $this->rights_class." ".sizeof($this->rights)." ";
// Test si module actif
- $sql_del = "SELECT value FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."';";
+ $sql_del = "SELECT value FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."'";
$resql=$this->db->query($sql_del);
if ($resql) {
@@ -610,14 +667,14 @@ class DolibarrModules
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ";
$sql .= " (id, libelle, module, type, bydefault, perms, subperms)";
$sql .= " VALUES ";
- $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."','".$r_subperms."');";
+ $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."','".$r_subperms."')";
}
else
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ";
$sql .= " (id, libelle, module, type, bydefault, perms)";
$sql .= " VALUES ";
- $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."');";
+ $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."')";
}
}
else
@@ -625,9 +682,10 @@ class DolibarrModules
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ";
$sql .= " (id, libelle, module, type, bydefault)";
$sql .= " VALUES ";
- $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.");";
+ $sql .= "(".$r_id.",'".addslashes($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")";
}
+ dolibarr_syslog("DolibarrModules::insert_permissions sql=".$sql);
$resql=$this->db->query($sql);
if (! $resql)
{
@@ -651,7 +709,8 @@ class DolibarrModules
{
$err=0;
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = '".$this->rights_class."';";
+ $sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = '".$this->rights_class."'";
+ dolibarr_syslog("DolibarrModules::delete_permissions sql=".$sql);
if (!$this->db->query($sql))
{
$err++;
diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php
index 1a53a0ae087..767ef85fe85 100644
--- a/htdocs/includes/modules/modSociete.class.php
+++ b/htdocs/includes/modules/modSociete.class.php
@@ -200,9 +200,9 @@ class modSociete extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='ExportDataset_company_2';
$this->export_permission[$r]=array(array("societe","contact","export"));
- $this->export_fields_array[$r]=array('c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode");
- $this->export_entities_array[$r]=array('c.civilite'=>"contact",'c.name'=>'contact','c.firstname'=>'contact','c.datec'=>"contact",'c.tms'=>"contact",'c.address'=>"contact",'c.cp'=>"contact",'c.ville'=>"contact",'c.phone'=>"contact",'c.fax'=>"contact",'c.email'=>"contact",'p.libelle'=>"contact",'p.code'=>"contact",'s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company");
- $this->export_alias_array[$r]=array('c.civilite'=>"civilitycode",'c.name'=>'lastname','c.firstname'=>'firstname','c.datec'=>"datecreation",'c.tms'=>"datelastmodification",'c.address'=>"address",'c.cp'=>"zip",'c.ville'=>"town",'c.phone'=>"phone",'c.fax'=>"fax",'c.email'=>"email",'p.libelle'=>"country",'p.code'=>"countrycode",'s.rowid'=>"socid",'s.nom'=>"companyname",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode");
+ $this->export_fields_array[$r]=array('c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode");
+ $this->export_entities_array[$r]=array('c.civilite'=>"contact",'c.name'=>'contact','c.firstname'=>'contact','c.datec'=>"contact",'c.tms'=>"contact",'c.priv'=>"contact",'c.address'=>"contact",'c.cp'=>"contact",'c.ville'=>"contact",'c.phone'=>"contact",'c.fax'=>"contact",'c.email'=>"contact",'p.libelle'=>"contact",'p.code'=>"contact",'s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company");
+ $this->export_alias_array[$r]=array('c.civilite'=>"civilitycode",'c.name'=>'lastname','c.firstname'=>'firstname','c.datec'=>"datecreation",'c.tms'=>"datelastmodification",'c.priv'=>"private",'c.address'=>"address",'c.cp'=>"zip",'c.ville'=>"town",'c.phone'=>"phone",'c.fax'=>"fax",'c.email'=>"email",'p.libelle'=>"country",'p.code'=>"countrycode",'s.rowid'=>"socid",'s.nom'=>"companyname",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode");
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_pays as p, '.MAIN_DB_PREFIX.'socpeople as c LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid';
$this->export_sql_end[$r].=' WHERE c.fk_pays = p.rowid';
diff --git a/htdocs/index.php b/htdocs/index.php
index 810ed7960b1..87c8a257c8f 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2007 Laurent Destailleur
+ * Copyright (C) 2004-2008 Laurent Destailleur
* Copyright (C) 2005-2007 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
@@ -16,14 +16,12 @@
* 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$
*/
/**
\file htdocs/index.php
\brief Page accueil par defaut
- \version $Revision$
+ \version $Id$
*/
require("./pre.inc.php");
@@ -229,7 +227,7 @@ print ' | ';
/*
- * Dolibarr Work Board
+ * Dolibarr Working Board
*/
print '';
print '';
@@ -240,6 +238,7 @@ print '| | ';
print ' | ';
print ' ';
+$nboflate=0;
$var=true;
//
// Ne pas inclure de sections sans gestion de permissions
@@ -264,7 +263,7 @@ if ($conf->commercial->enabled || $conf->compta->enabled || $conf->comptaexpert-
print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -288,7 +287,7 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
print ' (>'.ceil($conf->commande->traitement->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -314,7 +313,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print ' (>'.ceil($conf->propal->cloture->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -339,7 +338,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print ' (>'.ceil($conf->propal->facturation->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -365,7 +364,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
print ' (>'.ceil($conf->contrat->services->inactifs->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -391,7 +390,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
print ' (>'.ceil($conf->contrat->services->expires->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -417,7 +416,7 @@ if ($conf->fournisseur->enabled && $conf->facture->enabled && $user->rights->fac
print ' (>'.ceil($conf->facture->fournisseur->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -443,7 +442,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
print ' (>'.ceil($conf->facture->client->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -469,7 +468,7 @@ if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id
print ' (>'.ceil($conf->bank->rappro->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -495,7 +494,7 @@ if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id
print ' (>'.ceil($conf->bank->cheque->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -521,7 +520,7 @@ if ($conf->adherent->enabled && $user->rights->adherent->lire && ! $user->societ
print ' (>'.ceil($conf->adherent->cotisation->warning_delay/60/60/24).' '.$langs->trans("days").')';
print '';
print '';
- if ($board->nbtodolate > 0) print img_picto($langs->trans("Late"),"warning");
+ if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; }
else print ' ';
print ' | ';
print '';
@@ -530,6 +529,11 @@ print "\n";
print ' ';
+if ($nboflate > 0)
+{
+ print '
| '.img_picto($langs->trans("Alert"),'warning').' '.$langs->trans("WarningYouHaveAtLeastOneTaskLate").' | ';
+}
+
print ' |
';
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 32bc1876890..88c5bee5f87 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -187,6 +187,10 @@ JuridicalStatus=Juridical status
Staff=Staff
ProspectLevelShort=Potentiel
ProspectLevel=Prospect potential
+ContactPrivate=Private
+ContactPublic=Shared
+ContactVisibility=Visibility
+OthersNotLinkedToThirdParty=Others, not linked to a third party
PL_UNKNOWN=Unknown
PL_LOW=Low
PL_MEDIUM=Medium
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index b461009d6ea..b3673ca12f0 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -60,6 +60,7 @@ NotePrivate=Note (private)
PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to %s decimals.
DoTest=Test
ToFilter=Filter
+WarningYouHaveAtLeastOneTaskLate=Warning, you at least on element that has exceded tolerance delay.
yes=yes
Yes=Yes
no=no
@@ -277,6 +278,7 @@ to=to
and=and
or=or
Other=Other
+Others=Others
Quantity=Quantity
Qty=Qty
ChangedBy=Changed by
diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang
index a9e2abda71e..1baa107bbfd 100644
--- a/htdocs/langs/fr_FR/commercial.lang
+++ b/htdocs/langs/fr_FR/commercial.lang
@@ -51,7 +51,7 @@ StatusActionInProcess=En cours
MyActionsAsked=Actions que j'ai enregistrées
MyActionsToDo=Actions qui me sont affectées
MyActionsDone=Actions que j'ai faites
-TasksHistoryForThisContact=Actions vis à vis de contact
+TasksHistoryForThisContact=Actions vis à vis de ce contact
LastProspectDoNotContact=A ne pas contacter
LastProspectNeverContacted=Non contactés
LastProspectToContact=A contacter
diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang
index becd2f137ea..d7361b1e3f0 100644
--- a/htdocs/langs/fr_FR/companies.lang
+++ b/htdocs/langs/fr_FR/companies.lang
@@ -27,7 +27,7 @@ CountryIsInEEC=Pays de la Communaut
ThirdParty=Tiers
ThirdParties=Tiers
ThirdPartyAll=Tiers (tous)
-ThirdPartyProspects=Prospets
+ThirdPartyProspects=Prospects
ThirdPartyCustomers=Clients
ThirdPartyCustomersWithIdProf12=Clients avec %s ou %s
ThirdPartySuppliers=Fournisseurs
@@ -187,6 +187,10 @@ JuridicalStatus=Forme juridique
Staff=Effectif
ProspectLevelShort=Potentiel
ProspectLevel=Potentiel du prospect
+ContactPrivate=Privé
+ContactPublic=Partagé
+ContactVisibility=Visibilité
+OthersNotLinkedToThirdParty=Autres, non liés à un tiers
PL_UNKNOWN=Indéterminé
PL_LOW=Faible
PL_MEDIUM=Moyen
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index c66fce79ed3..05da8d1ad58 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -60,6 +60,7 @@ NotePrivate=Note (priv
PrecisionUnitIsLimitedToXDecimals=Dolibarr a été configuré pour limiter la précision des prix unitaires à %s décimals.
DoTest=Tester
ToFilter=Filtrer
+WarningYouHaveAtLeastOneTaskLate=Attention, vous avez au moins un élément qui a dépassé le délai de tolérance de retard.
yes=oui
Yes=Oui
no=non
@@ -279,6 +280,7 @@ To=
and=et
or=ou
Other=Autre
+Others=Autres
Quantity=Quantité
Qty=Qté
ChangedBy=Modifié par
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 3a0e517a62b..60f4cb1af1e 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -653,7 +653,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
global $user, $conf, $langs, $db;
- if (! $conf->css) $conf->css ='/theme/eldy/eldy.css.php';
+ if (empty($conf->css)) $conf->css ='/theme/eldy/eldy.css.php';
//header("Content-type: text/html; charset=UTF-8");
header("Content-type: text/html; charset=".$conf->character_set_client);
@@ -694,6 +694,15 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Output style sheets
print ''."\n";
print ''."\n";
+ // CSS forced by modules
+ if (is_array($conf->css_modules))
+ {
+ foreach($conf->css_modules as $cssfile)
+ { // cssfile is an absolute path
+ print ''."\n";
+ }
+ }
+ // CSS forced by page
if (is_array($arrayofcss))
{
foreach($arrayofcss as $cssfile)
diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php
index 1911bcd99d6..02e7c55702e 100644
--- a/htdocs/theme/auguria/auguria.css.php
+++ b/htdocs/theme/auguria/auguria.css.php
@@ -88,7 +88,7 @@ textarea.flat
}
select.flat
{
-
+ font-weight: normal;
border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php
index fcefa8a18c8..e95cac39083 100644
--- a/htdocs/theme/eldy/eldy.css.php
+++ b/htdocs/theme/eldy/eldy.css.php
@@ -94,6 +94,7 @@ select.flat
{
font-size: px;
font-family: helvetica, verdana, arial, sans-serif;
+ font-weight: normal;
border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
diff --git a/htdocs/theme/freelug/freelug.css.php b/htdocs/theme/freelug/freelug.css.php
index ebbd911c7ce..f3143a28863 100644
--- a/htdocs/theme/freelug/freelug.css.php
+++ b/htdocs/theme/freelug/freelug.css.php
@@ -96,6 +96,7 @@ select.flat
{
font-size: px;
font-family: helvetica, verdana, arial, sans-serif;
+ font-weight: normal;
border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
diff --git a/htdocs/theme/yellow/yellow.css.php b/htdocs/theme/yellow/yellow.css.php
index 62a9fa92116..c1c61de9b18 100644
--- a/htdocs/theme/yellow/yellow.css.php
+++ b/htdocs/theme/yellow/yellow.css.php
@@ -89,6 +89,7 @@ select.flat
{
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif;
+ font-weight: normal;
border: 1px solid #cccccc;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
diff --git a/mysql/migration/2.2.0-2.4.0.sql b/mysql/migration/2.2.0-2.4.0.sql
index 562ce79f475..c661867a7ea 100644
--- a/mysql/migration/2.2.0-2.4.0.sql
+++ b/mysql/migration/2.2.0-2.4.0.sql
@@ -238,3 +238,5 @@ update llx_rights_def set module='societe' where module='commercial' and perms='
insert into llx_c_chargesociales (id, libelle, deductible, active, actioncompta) values (25, 'Impots revenus', 0,1,'TAXREV');
+alter table llx_socpeople add priv smallint NOT NULL DEFAULT 0 after jabberid;
+
diff --git a/mysql/tables/llx_socpeople.sql b/mysql/tables/llx_socpeople.sql
index 4ef6db980e7..885ec6016f2 100644
--- a/mysql/tables/llx_socpeople.sql
+++ b/mysql/tables/llx_socpeople.sql
@@ -1,5 +1,6 @@
-- ============================================================================
-- Copyright (C) 2001-2004 Rodolphe Quiedeville
+-- Copyright (C) 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
@@ -39,6 +40,7 @@ create table llx_socpeople
fax varchar(30),
email varchar(255),
jabberid varchar(255),
+ priv smallint NOT NULL DEFAULT 0,
fk_user_creat integer DEFAULT 0, -- user qui a créé l'enregistrement
fk_user_modif integer,
note text