';
print '';
- print "| ".$langs->trans("Phone")." | ".dolibarr_print_phone($societe->tel)." | fax | ".dolibarr_print_phone($societe->fax)." | ";
+ print "| ".$langs->trans("Phone")." | ".dolibarr_print_phone($societe->tel)." | ".$langs->trans("Fax")." | ".dolibarr_print_phone($societe->fax)." | ";
print '| '.$langs->trans("Address").' | '.nl2br($societe->address)." $societe->cp $societe->ville | ";
print '| Siret | '.$societe->siret.' | ';
print 'Capital | '.$societe->capital.' | ';
- print "| ".$langs->trans("Type")." | $societe->typent | Effectif | $societe->effectif | ";
+ print '| '.$langs->trans("Type")." | ".$societe->typent.' | '.$langs->trans("Staff").' | '.$societe->effectif.' | ';
if ($societe->url)
{
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 2ab97b01d8f..9fb1decb9b0 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -244,7 +244,7 @@ if ($_GET["action"] == 'create')
print '';
print '| '.$langs->trans("Date").' : | ';
- $html->select_date()
+ $html->select_date();
print " | ";
print '| '.$langs->trans("Ref").' : | Provisoire | ';
diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php
index 84e6ffb6f46..fa03f822908 100644
--- a/htdocs/compta/bank/virement.php
+++ b/htdocs/compta/bank/virement.php
@@ -38,6 +38,8 @@ if (!$user->rights->banque->modifier)
llxHeader();
+$html=new Form($db);
+
/*
* Action ajout d'un virement
@@ -105,7 +107,7 @@ $result = $db->query($sql);
if ($result)
{
$var=True;
- $num = $db->num_rows();
+ $num = $db->num_rows($result);
$i = 0; $total = 0;
while ($i < $num)
@@ -136,7 +138,7 @@ if ($result)
print "\n";
print "";
-print_date_select();
+$html->select_date();
print " | \n";
print ' | ';
print ' | ';
diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php
index 210be49adcc..bf36b0584cd 100644
--- a/htdocs/compta/dons/fiche.php
+++ b/htdocs/compta/dons/fiche.php
@@ -152,6 +152,8 @@ if ($_GET["action"] == 'set_encaisse')
llxHeader();
+$html=new Form($db);
+
/* ************************************************************************** */
/* */
@@ -169,7 +171,7 @@ if ($_GET["action"] == 'create') {
print '';
print "".'| '.$langs->trans("Date").' | ';
- print_date_select();
+ $html->select_date();
print ' | ';
print ''.$langs->trans("Comments").' : ';
@@ -255,7 +257,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
print '';
print " | ".'| '.$langs->trans("Date").' | ';
- print_date_select($don->date);
+ $html->select_date($don->date);
print ' | ';
print ''.$langs->trans("Comments").' : ';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 7ddceeea1b7..2a9cfceda9b 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -507,7 +507,7 @@ if ($_GET["action"] == 'create')
print ' | ';
print '| '.$langs->trans("Date").' : | ';
- print_date_select(time());
+ $html->select_date();
print ' | ';
print '| '.$langs->trans("Ref").' : | Provisoire | ';
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 29dfae7a340..6cecc0689e3 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -21,7 +21,7 @@
*
*/
-/*!
+/**
\file htdocs/compta/paiement.php
\ingroup compta
\brief Page de création d'un paiement
@@ -143,6 +143,9 @@ if ($user->societe_id > 0)
llxHeader();
+$html=new Form($db);
+
+
if ($_GET["action"] == 'create')
{
$facture = new Facture($db);
@@ -155,7 +158,7 @@ if ($_GET["action"] == 'create')
$result = $db->query($sql);
if ($result)
{
- $num = $db->num_rows();
+ $num = $db->num_rows($result);
if ($num)
{
$obj = $db->fetch_object($result);
@@ -176,7 +179,7 @@ if ($_GET["action"] == 'create')
print "nom\">";
print "| ".$langs->trans("Date")." : | ";
- print_date_select();
+ $html->select_date();
print ' | ';
print ''.$langs->trans("Comments").' | ';
@@ -187,7 +190,7 @@ if ($_GET["action"] == 'create')
$result = $db->query($sql);
if ($result)
{
- $num = $db->num_rows();
+ $num = $db->num_rows($result);
$i = 0;
while ($i < $num)
{
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 427e5df21bc..1e4d5d7acb8 100755
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -134,6 +134,9 @@ if ($user->societe_id > 0)
llxHeader();
+$html=new Form($db);
+
+
if ($fiche_erreur_message)
{
print "$fiche_erreur_message ";
@@ -183,7 +186,7 @@ if ($_GET["action"] == 'create')
print "";
print '| '.$langs->trans("Date").' : | ';
- print_date_select();
+ $html->select_date();
print " | ";
print ''.$langs->trans("Comments").' | ';
@@ -194,7 +197,7 @@ if ($_GET["action"] == 'create')
$result = $db->query($sql);
if ($result)
{
- $num = $db->num_rows();
+ $num = $db->num_rows($result);
$i = 0;
while ($i < $num)
{
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index 3cc93ae35c7..269f7059b88 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -251,13 +251,11 @@ if ($_GET["action"] == 'create')
}
print '';
- print "| Date : | ";
-
- print_date_select(time());
-
+ print ' | | '.$langs->trans("Date").' : | ';
+ $html->select_date();
print " | ";
- print "| Projet : | ";
+ print ' | | '.$langs->trans("Project").' : | ';
$proj = new Project($db);
$html->select_array("projetid",$proj->liste_array($soc->id),0,1);
print " | ";
diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 4b3bd8dbd64..159422d2189 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -258,6 +258,8 @@ if ($_GET["action"] == 'create')
}
+$sel = new Form($db);
+
/*
*
* Mode update
@@ -286,11 +288,7 @@ if ($_GET["action"] == 'edit')
print '';
print "| ".$langs->trans("Date")." | ";
- /*
- * set $reday, $remonth, $reyear
- */
- print_date_select($fichinter->date);
-
+ $sel->select_date($fichinter->date);
print " | ";
print '| '.$langs->trans("Ref").' | '.$fichinter->ref.' | ';
@@ -300,7 +298,6 @@ if ($_GET["action"] == 'edit')
// Projet associé
print '| '.$langs->trans("Project").' | ';
- $sel = new Form($db);
$sel->select_array("projetidp",$listeprj,$fichinter->projet_id);
if (sizeof($listeprj) == 0)
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index f1748c973ed..b1d4141bbc1 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -327,9 +327,7 @@ else
print ' | '.price($fac->total_ttc).' | ';
print '| '.$langs->trans("Date").' | ';
-
- print_date_select($fac->datep);
-
+ $html->select_date($fac->datep);
print " | ";
$authorfullname=" ";
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 4a10a7e3dcd..ccd96a6f7a0 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -23,16 +23,16 @@
* $Source$
*/
-/*!
- \file htdocs/html.form.class.php
- \brief Fichier de la classe des fonctions prédéfinie de composants html
- \version $Revision$
+/**
+ \file htdocs/html.form.class.php
+ \brief Fichier de la classe des fonctions prédéfinie de composants html
+ \version $Revision$
*/
-/*!
- \class Form
- \brief Classe permettant la génération de composants html
+/**
+ \class Form
+ \brief Classe permettant la génération de composants html
*/
class Form
@@ -40,8 +40,9 @@ class Form
var $db;
var $errorstr;
- /*! \brief Constructeur
- \param DB handler d'accès base de donnée
+ /**
+ \brief Constructeur
+ \param DB handler d'accès base de donnée
*/
function Form($DB)
@@ -51,7 +52,7 @@ class Form
return 1;
}
- /*
+ /**
* \brief Retourne la liste déroulante des départements/province/cantons tout pays confondu ou pour un pays donné.
* \remarks Dans le cas d'une liste tout pays confondus, l'affichage fait une rupture sur le pays.
* \remarks La cle de la liste est le code (il peut y avoir plusieurs entrée pour
@@ -60,7 +61,7 @@ class Form
* \param selected code forme juridique a présélectionné
* \param pays_code 0=liste tous pays confondus, sinon code du pays à afficher
*/
-
+
function select_departement($selected='',$pays_code=0)
{
global $conf,$langs;
@@ -123,7 +124,7 @@ class Form
}
}
- /*
+ /**
* \brief Retourne la liste déroulante des regions actives dont le pays est actif
* \remarks La cle de la liste est le code (il peut y avoir plusieurs entrée pour
* un code donnée mais dans ce cas, le champ pays et lang diffère).
@@ -179,7 +180,7 @@ class Form
}
}
- /*
+ /**
* \brief Retourne la liste déroulante des pays actifs, dans la langue de l'utilisateur
* \param selected code pays pré-sélectionné
* \param htmlname nom de la liste deroulante
@@ -232,7 +233,7 @@ class Form
}
- /*
+ /**
* \brief Retourne la liste déroulante des langues disponibles
* \param
*/
@@ -265,7 +266,7 @@ class Form
}
- /*
+ /**
* \brief Retourne la liste déroulante des sociétés
* \param
*/
@@ -305,7 +306,7 @@ class Form
}
}
- /*
+ /**
* \brief Retourne la liste déroulante des contacts d'une société donnée
*
*/
@@ -349,7 +350,7 @@ class Form
}
- /*
+ /**
* \brief Retourne le nom d'un pays
* \param id id du pays
*/
@@ -377,7 +378,7 @@ class Form
}
- /*
+ /**
* \brief Retourne la liste déroulante des civilite actives
* \param selected civilite pré-sélectionnée
*/
@@ -423,7 +424,7 @@ class Form
}
- /*
+ /**
* \brief Retourne la liste déroulante des formes juridiques tous pays confondu ou pour un pays donné.
* \remarks Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays
* \param selected code forme juridique a présélectionné
@@ -490,7 +491,7 @@ class Form
}
}
- /*
+ /**
* \brief Affiche formulaire de demande de confirmation
* \param page page
* \param title title
@@ -517,7 +518,7 @@ class Form
print "\n";
}
- /*
+ /**
* \brief Selection du taux de tva
*
*/
@@ -565,7 +566,7 @@ class Form
print '';
}
- /*
+ /**
* \brief Affiche zone de selection de date
* Liste deroulante pour les jours, mois, annee et eventuellement heurs et minutes
* Les champs sont présélectionnées avec:
@@ -575,23 +576,25 @@ class Form
*/
function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0)
{
+ global $langs;
+
if (! $set_time && ! $empty)
{
$set_time = time();
}
- $strmonth[1] = "Janvier";
- $strmonth[2] = "Février";
- $strmonth[3] = "Mars";
- $strmonth[4] = "Avril";
- $strmonth[5] = "Mai";
- $strmonth[6] = "Juin";
- $strmonth[7] = "Juillet";
- $strmonth[8] = "Août";
- $strmonth[9] = "Septembre";
- $strmonth[10] = "Octobre";
- $strmonth[11] = "Novembre";
- $strmonth[12] = "Décembre";
+ $strmonth[1] = $langs->trans("January");
+ $strmonth[2] = $langs->trans("February");
+ $strmonth[3] = $langs->trans("March");
+ $strmonth[4] = $langs->trans("April");
+ $strmonth[5] = $langs->trans("May");
+ $strmonth[6] = $langs->trans("June");
+ $strmonth[7] = $langs->trans("July");
+ $strmonth[8] = $langs->trans("August");
+ $strmonth[9] = $langs->trans("September");
+ $strmonth[10] = $langs->trans("October");
+ $strmonth[11] = $langs->trans("November");
+ $strmonth[12] = $langs->trans("December");
// Analyse de la date de préselection
if (eregi('^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?',$set_time,$reg)) {
@@ -727,7 +730,7 @@ class Form
}
}
- /*
+ /**
* \brief Affiche liste déroulante
*
*/
@@ -776,8 +779,8 @@ class Form
}
- /*!
- \brief Affiche un select à partir d'un tableau
+ /**
+ \brief Affiche un select à partir d'un tableau
\param name nom de la zone select
\param array tableau de key+valeur
\param id key présélectionnée
@@ -819,10 +822,11 @@ class Form
print ">$value\n";
}
}
-
+
print "";
}
- /*
+
+ /**
* \brief Renvoie la chaîne de caractère décrivant l'erreur
*
*/
@@ -833,8 +837,8 @@ class Form
}
- /*
- * \brief Selection de oui/non en caractere (renvoi yes/no)
+ /**
+ * \brief Selection de oui/non en chaine (renvoie yes/no)
* \param name nom du select
* \param value valeur présélectionnée
* \param option 0 retourne yes/no, 1 retourne 1/0
@@ -866,8 +870,8 @@ class Form
print ''."\n";
}
- /*
- * \brief Selection de oui/non en chiffre (renvoi 1/0)
+ /**
+ * \brief Selection de oui/non en chiffre (renvoie 1/0)
* \param name nom du select
* \param value valeur présélectionnée
*/
@@ -876,7 +880,7 @@ class Form
$this->selectyesno($name,$value,1);
}
- /*
+ /**
* \brief Checkbox
*
*/
diff --git a/htdocs/includes/menus/barre_left/eldy.php b/htdocs/includes/menus/barre_left/eldy.php
index 79bc99bfcd0..ff735bf07a7 100644
--- a/htdocs/includes/menus/barre_left/eldy.php
+++ b/htdocs/includes/menus/barre_left/eldy.php
@@ -141,6 +141,13 @@ class MenuLeft {
}
}
+ /*
+ * Menu SOCIETES
+ */
+ if ($mainmenu == 'companies') {
+
+ }
+
/*
* Menu COMMERCIAL
*/
@@ -148,54 +155,48 @@ class MenuLeft {
$langs->load("companies");
// Prospects
- $newmenu->add(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("Prospects"));
+ $newmenu->add(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("Prospects"), 0, $user->rights->societe->lire);
- if ($user->rights->societe->creer)
- {
- $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"));
- }
- $newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=p", $langs->trans("Contacts"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 1, $user->rights->societe->creer);
+ $newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=p", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
// Clients
- $newmenu->add(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("Customers"));
- if ($user->rights->societe->creer)
- {
- $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=c", $langs->trans("MenuNewCustomer"));
- }
- $newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=c", $langs->trans("Contacts"));
+ $newmenu->add(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("Customers"), 0, $user->rights->societe->lire);
+ $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=c", $langs->trans("MenuNewCustomer"), 1, $user->rights->societe->creer);
+ $newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=c", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
// Actions
- $newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=actions", $langs->trans("Actions"));
- if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?time=today", $langs->trans("Today"));
- if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php", $langs->trans("Reporting"));
+ $newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=actions", $langs->trans("Actions"), 0);
+ if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?time=today", $langs->trans("Today"), 1);
+ if ($leftmenu=="actions") $newmenu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php", $langs->trans("Reporting"), 1);
// Propal
- if ($conf->propal->enabled && $user->rights->propale->lire)
+ if ($conf->propal->enabled)
{
$langs->load("propal");
- $newmenu->add(DOL_URL_ROOT."/comm/propal.php?leftmenu=propals", $langs->trans("Prop"));
- if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft"));
- if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened"));
- if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics"));
+ $newmenu->add(DOL_URL_ROOT."/comm/propal.php?leftmenu=propals", $langs->trans("Prop"), 0 ,$user->rights->propale->lire);
+ if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft"), 1, $user->rights->propale->lire);
+ if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened"), 1, $user->rights->propale->lire);
+ if ($leftmenu=="propals") $newmenu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics"), 1, $user->rights->propale->lire);
}
if ($conf->contrat->enabled)
{
$langs->load("contracts");
- $newmenu->add(DOL_URL_ROOT."/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"));
- if ($leftmenu=="contracts") $newmenu->add_submenu(DOL_URL_ROOT."/contrat/liste.php", $langs->trans("List"));
- if ($leftmenu=="contracts") $newmenu->add_submenu(DOL_URL_ROOT."/contrat/enservice.php", "En service");
+ $newmenu->add(DOL_URL_ROOT."/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"), 0 ,$user->rights->contrat->lire);
+ if ($leftmenu=="contracts") $newmenu->add_submenu(DOL_URL_ROOT."/contrat/liste.php", $langs->trans("List"), 1 ,$user->rights->contrat->lire);
+ if ($leftmenu=="contracts") $newmenu->add_submenu(DOL_URL_ROOT."/contrat/enservice.php", "En service", 1 ,$user->rights->contrat->lire);
}
if ($conf->commande->enabled )
{
$langs->load("orders");
- $newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("Orders"));
- if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"));
+ $newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("Orders"), 0 ,$user->rights->commande->lire);
+ if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"), 1 ,$user->rights->commande->lire);
if ($conf->expedition->enabled) {
if ($leftmenu=="orders") $newmenu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings"));
}
- if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"));
+ if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire);
}
if ($conf->fichinter->enabled )
@@ -353,33 +354,33 @@ class MenuLeft {
if ($conf->produit->enabled)
{
- $newmenu->add(DOL_URL_ROOT."/product/index.php?type=0", $langs->trans("Products"));
- $newmenu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("List"));
-
- if ($user->societe_id == 0 && $user->rights->produit->creer)
+ $newmenu->add(DOL_URL_ROOT."/product/index.php?type=0", $langs->trans("Products"), 0, $user->rights->produit->lire);
+ if ($user->societe_id == 0)
{
- $newmenu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=0", $langs->trans("NewProduct"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
}
+ $newmenu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
}
if ($conf->service->enabled)
{
- $newmenu->add(DOL_URL_ROOT."/product/index.php?type=1", $langs->trans("Services"));
- $newmenu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=1", $langs->trans("List"));
- if ($user->societe_id == 0 && $user->rights->produit->creer)
+ $newmenu->add(DOL_URL_ROOT."/product/index.php?type=1", $langs->trans("Services"), 0, $user->rights->produit->lire);
+ if ($user->societe_id == 0)
{
- $newmenu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=1", $langs->trans("NewService"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/product/fiche.php?action=create&type=1", $langs->trans("NewService"), 1, $user->rights->produit->creer);
}
+ $newmenu->add_submenu(DOL_URL_ROOT."/product/liste.php?type=1", $langs->trans("List"), 1, $user->rights->produit->lire);
}
- $newmenu->add(DOL_URL_ROOT."/product/stats/", $langs->trans("Statistics"));
+ $newmenu->add(DOL_URL_ROOT."/product/stats/", $langs->trans("Statistics"), 0, $user->rights->produit->lire);
if ($conf->propal->enabled)
{
- $newmenu->add_submenu(DOL_URL_ROOT."/product/popuprop.php", $langs->trans("Popularity"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/product/popuprop.php", $langs->trans("Popularity"), 0, $user->rights->propale->lire);
}
if ($conf->stock->enabled)
{
+ // \todo mettre droits pour module stock
$newmenu->add(DOL_URL_ROOT."/product/stock/", $langs->trans("Stock"));
$newmenu->add_submenu(DOL_URL_ROOT."/product/stock/fiche.php?action=create", $langs->trans("NewWarehouse"));
$newmenu->add_submenu(DOL_URL_ROOT."/product/stock/mouvement.php", $langs->trans("Movements"));
@@ -471,6 +472,7 @@ class MenuLeft {
}
+ // Affichage du menu
$alt=0;
for ($i = 0 ; $i < sizeof($this->menu_array) ; $i++)
{
@@ -487,13 +489,22 @@ class MenuLeft {
}
if ($this->menu_array[$i]['level']==0) {
- print ' ';
+ if ($this->menu_array[$i]['enabled'])
+ print ' ';
+ else
+ print ' ';
}
if ($this->menu_array[$i]['level']==1) {
- print ' ';
+ if ($this->menu_array[$i]['enabled'])
+ print ' ';
+ else
+ print ' ';
}
if ($this->menu_array[$i]['level']==2) {
- print ' ';
+ if ($this->menu_array[$i]['enabled'])
+ print ' ';
+ else
+ print ' ';
}
if ($i == (sizeof($this->menu_array)-1) || $this->menu_array[$i+1]['level']==0) {
diff --git a/htdocs/includes/menus/barre_top/eldy.php b/htdocs/includes/menus/barre_top/eldy.php
index b8e665ef9e5..f32c3606869 100644
--- a/htdocs/includes/menus/barre_top/eldy.php
+++ b/htdocs/includes/menus/barre_top/eldy.php
@@ -127,8 +127,10 @@ class MenuTop {
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.="Services"; }
- print 'atarget?" target=$this->atarget":"").'>'.$chaine.'';
-
+ if ($user->rights->produit->lire)
+ print 'atarget?" target=$this->atarget":"").'>'.$chaine.'';
+ else
+ print '';
}
// Supplier
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 39882d01080..6f89d7ed5ea 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -187,4 +187,16 @@ Late=Late
Photo=Picture
Photos=Pictures
AddPhoto=Add picture
-CurrentLogin=Current login
\ No newline at end of file
+CurrentLogin=Current login
+January=January
+February=February
+March=March
+April=April
+May=May
+June=June
+July=July
+August=August
+September=September
+October=October
+November=November
+December=December
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index db245142342..3e47bd4e631 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -188,4 +188,16 @@ Late=Retard
Photo=Photo
Photos=Photos
AddPhoto=Ajouter photo
-CurrentLogin=Login courant
\ No newline at end of file
+CurrentLogin=Login courant
+January=Janvier
+February=Février
+March=Mars
+April=Avril
+May=Mai
+June=Juin
+July=Juillet
+August=Aout
+September=Septembre
+October=Octobre
+November=Novembre
+December=Decembre
\ No newline at end of file
diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php
index f295acf01cb..12e672e9db3 100644
--- a/htdocs/lib/functions.inc.php
+++ b/htdocs/lib/functions.inc.php
@@ -1131,84 +1131,7 @@ function print_type_paiement_select($db,$nomselect,$value=-1)
print "\n";
}
-/**
- \brief Fonction servant a afficher les mois dans un liste déroulante
- \param set_time ("" par defaut)
-*/
-function print_date_select($set_time='')
-{
- if (! $set_time)
- {
- $set_time = time();
- }
- $strmonth[1] = "Janvier";
- $strmonth[2] = "Février";
- $strmonth[3] = "Mars";
- $strmonth[4] = "Avril";
- $strmonth[5] = "Mai";
- $strmonth[6] = "Juin";
- $strmonth[7] = "Juillet";
- $strmonth[8] = "Août";
- $strmonth[9] = "Septembre";
- $strmonth[10] = "Octobre";
- $strmonth[11] = "Novembre";
- $strmonth[12] = "Décembre";
-
- $smonth = 1; $endmonth = 12;
- $sday = 1; $endday = 31;
-
- $cday = date("d", $set_time);
- $cmonth = date("n", $set_time);
- $syear = date("Y", $set_time);
-
- print "";
-
-
- print "";
-
- print "\n";
-
-}
/**
\brief Fonction servant a afficher les heures/minutes dans un liste déroulante
\param prefix
diff --git a/htdocs/lolix/societe/fiche.php b/htdocs/lolix/societe/fiche.php
index ef455939476..ff1f3d29072 100644
--- a/htdocs/lolix/societe/fiche.php
+++ b/htdocs/lolix/societe/fiche.php
@@ -89,8 +89,11 @@ if ($_GET["action"] == 'edit')
print $html->select_array("forme_juridique_id",$soc->forme_juridique_array(), $soc->forme_juridique_id,0,1);
print '';
- print '| Effectif | ';
- print $html->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id);
+ print ' | | '.$langs->trans("Type").' | ';
+ $form->select_array("typent_id",$soc->typent_array(), $soc->typent_id);
+ print ' | ';
+ print ''.$langs->trans("Staff").' | ';
+ $form->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id);
print ' | ';
print '';
@@ -126,7 +129,8 @@ else
print 'Siren | '.$soc->siren.' | ';
print '| Forme juridique | '.$soc->forme_juridique.' | ';
- print '| Effectif | '.$soc->effectif.' | ';
+
+ print ' | '.$langs->trans("Staff").' | '.$soc->effectif.' | ';
print 'Création | '.strftime("%d %B %Y",$soc->date_creation).' | ';
print '| Contact | '.$socdet->contact_nom.' '.$socdet->contact_email.' | ';
diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php
index 75e67c72f75..df2976638a3 100644
--- a/htdocs/pre.inc.php
+++ b/htdocs/pre.inc.php
@@ -36,7 +36,7 @@ function llxHeader($head = "") {
$menu = new Menu();
- if ($conf->societe->enabled)
+ if ($conf->societe->enabled && $user->rights->societe->lire)
{
$langs->load("companies");
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
@@ -46,7 +46,7 @@ function llxHeader($head = "") {
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewCompany"));
}
if(is_dir("societe/groupe"))
- $menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
+ $menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
}
diff --git a/htdocs/product/concert/fiche.php b/htdocs/product/concert/fiche.php
index 964ed1ff843..59becd6fbb9 100644
--- a/htdocs/product/concert/fiche.php
+++ b/htdocs/product/concert/fiche.php
@@ -73,7 +73,7 @@ if ($action == 'create')
$ga = new Groupart($db);
print " | Date | ";
- print_date_select();
+ $htmls->select_date();
print " | ";
print "| Lieu | ";
diff --git a/htdocs/theme/eldy/eldy.css b/htdocs/theme/eldy/eldy.css
index 1c8d3254448..36bc7d27c0a 100644
--- a/htdocs/theme/eldy/eldy.css
+++ b/htdocs/theme/eldy/eldy.css
@@ -167,6 +167,18 @@ a.tmenu:hover
text-decoration: none;
}
+font.tmenudisabled
+{
+ color: #93a5aa;
+ padding: 0em 1em;
+ margin: 0em 0em 1.5em 0em;
+ border: 1px solid #b3c5cc;
+ font-weight:bold;
+ font-size:12px;
+}
+
+/* Login */
+
a.login
{
position: absolute;
@@ -202,20 +214,22 @@ img.login
* Barre de gauche
*/
-a.vmenu:link { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
-a.vmenu:visited { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
-a.vmenu:active { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
-a.vmenu:hover { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
+a.vmenu:link { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
+a.vmenu:visited { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
+a.vmenu:active { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
+a.vmenu:hover { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; }
+font.vmenudisabled { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: bold; color: #93a5aa; }
-a.vsmenu:link { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
-a.vsmenu:visited { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
-a.vsmenu:active { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
-a.vsmenu:hover { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
+a.vsmenu:link { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
+a.vsmenu:visited { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
+a.vsmenu:active { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
+a.vsmenu:hover { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #202020; margin: 1em 1em 1em 1em; }
+font.vsmenudisabled { font-size:12px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; color: #93a5aa; margin: 1em 1em 1em 1em; }
-a.help:link { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
-a.help:visited { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
-a.help:active { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
-a.help:hover { font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
+a.help:link { font-size:11px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
+a.help:visited { font-size:11px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
+a.help:active { font-size:11px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
+a.help:hover { font-size:11px; font: helvetica, verdana, arial, sans-serif; text-align:left; font-weight: normal; }
div.blockvmenupair
{
@@ -257,6 +271,7 @@ div.help
}
+
.flat {
font-family: arial,verdana,helvetica, sans-serif;
font-size: 100%;
@@ -666,8 +681,8 @@ textarea
td.valeur
{
- font-weight: bold;
- }
+ color: #001122;
+}
td.delete {
background: red;
diff --git a/htdocs/user/addon.php b/htdocs/user/addon.php
index 60b8d61c4e8..94f2d72c201 100644
--- a/htdocs/user/addon.php
+++ b/htdocs/user/addon.php
@@ -121,7 +121,7 @@ if ($_GET["id"])
if ($bk4u->uid == 0)
{
- print "Pas de login";
+ print $langs->trans("NoLogin");
}
else
{
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index c5b6208e8f9..6a36f81a96a 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -380,14 +380,14 @@ else
print " | \n";
print "".'| '.$langs->trans("ContactCard").' | ';
- print '';
+ print ' | ';
if ($fuser->contact_id)
{
print ''.$langs->trans("ContactCard").'';
}
else
{
- print $langs->trans("NoContactCard");
+ print $langs->trans("ThisUserIsNot");
}
print ' | ';
print " \n";
|