diff --git a/htdocs/comm/action/pre.inc.php b/htdocs/comm/action/pre.inc.php index 9a9ff046fc4..5f950d70c0b 100644 --- a/htdocs/comm/action/pre.inc.php +++ b/htdocs/comm/action/pre.inc.php @@ -19,10 +19,17 @@ * $Source$ * */ + +/*! \file htdocs/admin/pre.inc.php + \brief Fichier gestionnaire du menu de gauche de l'espace configuration + \version $Revision$ +*/ + require("../../main.inc.php"); + function llxHeader($head = "", $urlp = "") { - global $conf; + global $conf,$langs; /* * @@ -32,23 +39,37 @@ function llxHeader($head = "", $urlp = "") { $menu = new Menu(); - $menu->add(DOL_URL_ROOT."/comm/action/", "Actions"); + $menu->add(DOL_URL_ROOT."/comm/action/", $langs->trans("Actions")); - $menu->add_submenu(DOL_URL_ROOT."/comm/action/?time=today", "Aujourd'hui"); + $menu->add_submenu(DOL_URL_ROOT."/comm/action/?time=today", $langs->trans("Today")); - $menu->add(DOL_URL_ROOT."/comm/clients.php", "Clients"); + if ($conf->societe->enabled) { + $langs->load("companies"); - $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php", "Contacts"); + $menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customer")); - $menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", "Prospects"); + $menu->add_submenu(DOL_URL_ROOT."/comm/contact.php", $langs->trans("Contacts")); + } + + if ($conf->commercial->enabled) { + $langs->load("commercial"); - $menu->add(DOL_URL_ROOT."/comm/propal.php", "Propales"); + $menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects")); + } + + if ($conf->propal->enabled) { + $langs->load("propal"); + $menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Propales")); + } + if ($conf->projet->enabled) { - $menu->add(DOL_URL_ROOT."/projet/index.php", "Projets"); + $langs->load("projects"); + + $menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects")); } - $menu->add(DOL_URL_ROOT."/comm/action/rapport/", "Rapport"); + $menu->add(DOL_URL_ROOT."/comm/action/rapport/", $langs->trans("Reporting")); left_menu($menu->liste); diff --git a/htdocs/comm/mailing.php b/htdocs/comm/mailing.php index d9bff888a64..0cf3b894a85 100644 --- a/htdocs/comm/mailing.php +++ b/htdocs/comm/mailing.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2004 Guillaume Delecourt * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 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 @@ -24,9 +25,9 @@ /*! \file htdocs/comm/mailing.php - \ingroup \brief Page pour faire des mailing */ + require("./pre.inc.php"); $langs->load("admin"); @@ -34,6 +35,7 @@ $langs->load("commercial"); $langs->load("users"); $langs->load("bills"); $langs->load("companies"); +$langs->load("other"); /* * Modules optionnels diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 52db2e88d9d..80945b52b21 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -29,7 +29,10 @@ require("./pre.inc.php"); +$langs->load("companies"); + $user->getrights('propale'); + if (!$user->rights->propale->lire) accessforbidden(); @@ -109,7 +112,7 @@ if ($_POST["action"] == 'add') } } -if ($action == 'pdf') +if ($_GET["action"] == 'pdf') { $propal = new Propal($db); $propal->fetch($propalid); @@ -218,15 +221,13 @@ if ($_GET["valid"] == 1 && $user->rights->propale->valider) } + + llxHeader(); -/******************************************************************************/ -/* Fin des Actions */ -/******************************************************************************/ + /* - * - * Mode fiche - * + * Affichage fiche propal en mode visu * */ if ($_GET["propalid"]) @@ -244,10 +245,10 @@ if ($_GET["propalid"]) $h = 1; $a = 0; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; - $head[$h][1] = "Note"; + $head[$h][1] = $langs->trans("Note"); $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; - $head[$h][1] = "Info"; + $head[$h][1] = $langs->trans("Info"); dolibarr_fiche_head($head, $a, $societe->nom); @@ -290,9 +291,9 @@ if ($_GET["propalid"]) print ''; } - print ""; + print "
"; - print ''; print ''; - print '"; - print '"; + print '"; if ($propal->projet_id) { + $langs->load("projects"); + $projet = new Project($db); $projet->fetch($propal->projet_id); - print ''; } @@ -336,7 +339,7 @@ if ($_GET["propalid"]) { print ''; print ''; - print ''; + print ''; } else @@ -349,8 +352,8 @@ if ($_GET["propalid"]) /* * */ - print ''; - print ''; + print ''; + print ''; /* * @@ -806,21 +809,12 @@ if ($_GET["propalid"]) } else { - print "Num rows = " . $db->num_rows(); - print "

$sql"; + dolibarr_print_error($db); } - } - else - { - print $db->error(); - print "

$sql"; - } - /* - * - * - * - */ -} else { + +} +else +{ /**************************************************************************** * * * * @@ -937,7 +931,7 @@ if ($_GET["propalid"]) print " "; print strftime("%B",$objp->dp)."\n"; print " "; - print strftime("%Y",$objp->dp)."\n"; + print strftime("%Y",$objp->dp)."\n"; print "

\n"; print "\n"; @@ -954,9 +948,11 @@ if ($_GET["propalid"]) } else { - print $db->error(); + dolibarr_print_error($db); } } $db->close(); + llxFooter("Dernière modification $Date$ révision $Revision$"); + ?> diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index d4728460177..aebfd6afbee 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -141,4 +141,5 @@ Qty=Qty ChangedBy=Changed by ReCalculate=Rebuild ResultOk=Success -ResultKo=Failure \ No newline at end of file +ResultKo=Failure +Reporting=Reporting \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index f72cd06fe81..54cc50c3eaf 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -1,4 +1,13 @@ # Dolibarr language file - en_US - other Calendar=Calendar LoginWebcal=Login for Webcalendar -AddCalendarEntry=Add entry in calendar \ No newline at end of file +AddCalendarEntry=Add entry in calendar +Mailing=Mailing +MailingDesc=This page allows you to send mailings to a group of people. +MailingResult=Sending mails result +MailFrom=Sender +MailReply=Reply to +MailTo=Receiver(s) +MailTopic=Subject +MailText=Message +MailFile=Attach a file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index d3438b58af9..16a1c28d255 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -142,4 +142,5 @@ Qty=Qt ChangedBy=Modifié par ReCalculate=Re-calculer ResultOk=Succès -ResultKo=Echec \ No newline at end of file +ResultKo=Echec +Reporting=Rapports \ No newline at end of file diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 71ab7060f55..53a57b0f685 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -2,11 +2,12 @@ Calendar=Calendrier LoginWebcal=Login Webcalendar AddCalendarEntry=Ajouter entrée dans le calendrier -MailingDesc=Cette écran vous permet d'envoyer des mailing à un groupe de personne. +Mailing=Mailing +MailingDesc=Cet écran vous permet d'envoyer des mailing à un groupe de personne. MailingResult=Résultat de l'envoi du mailing MailFrom=Emetteur MailReply=Répondre à MailTo=Destinataire(s) MailTopic=Sujet MailText=Message -MailFile=Joindre un fichier \ No newline at end of file +MailFile=Joindre un fichier
Société'; + print '
'.$langs->trans("Companies").''; if ($societe->client == 1) { $url ='fiche.php?socid='.$societe->id; @@ -304,7 +305,7 @@ if ($_GET["propalid"]) print ''.$societe->nom.''.$langs->trans("Status").''.$obj->lst.'
Date'.strftime("%A %d %B %Y",$propal->date); + print '
'.$langs->trans("Date").''.strftime("%A %d %B %Y",$propal->date); if ($propal->fin_validite) { print " (".strftime("%d %B %Y",$propal->fin_validite).")"; @@ -318,13 +319,15 @@ if ($_GET["propalid"]) print "
Destinataire$obj->firstname $obj->name <$obj->email>Note :
'. nl2br($propal->note)."
'.$langs->trans("Note").' :
'. nl2br($propal->note)."
Projet'; + print '
'.$langs->trans("Projects").''; print ''; print $projet->title.'
Remise ?%
Montant HT'.price($obj->price + $obj->remise).' eurosTVA'.price($propal->total_tva).' euros
'.$langs->trans("AmountHT").''.price($obj->price + $obj->remise).' euros'.$langs->trans("VAT").''.price($propal->total_tva).' euros
".price($objp->price)."$objp->statut