From 721e1086ba6a67a65b25ff80ea3aa69cecff53bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Mon, 4 Apr 2005 19:38:17 +0000 Subject: [PATCH] Trad: Traduction du module expedition --- htdocs/expedition/index.php | 25 ++++++++------- htdocs/expedition/liste.php | 38 +++++++++++++---------- htdocs/expedition/stats/index.php | 10 ++++-- htdocs/includes/menus/barre_left/eldy.php | 13 +++++--- htdocs/langs/en_US/sendings.lang | 5 +++ htdocs/langs/fr_FR/sendings.lang | 14 ++++++--- 6 files changed, 64 insertions(+), 41 deletions(-) diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index ae42db2e3e5..1869c21cc13 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2005 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 @@ -21,25 +21,28 @@ * */ -/*! \file htdocs/expedition/index.php +/** + \file htdocs/expedition/index.php \ingroup expedition \brief Page accueil du module expedition \version $Revision$ */ - require("./pre.inc.php"); +$langs->load("sendings"); + + llxHeader('','Exp�ditions','ch-expedition.html',$form_search); -print_titre("Expeditions"); +print_titre($langs->trans("Sendings")); -print '<table border="0" width="100%" cellspacing="0" cellpadding="4">'; +print '<table border="0" width="100%">'; print '<tr><td valign="top" width="30%">'; print '<form method="post" action="liste.php">'; -print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; +print '<table class="noborder" width="100%">'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>'; print "<tr $bc[1]><td>"; print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; @@ -60,7 +63,7 @@ if ( $db->query($sql) ) $num = $db->num_rows(); if ($num) { - print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; + print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="3">Expeditions � valider</td></tr>'; $i = 0; @@ -97,7 +100,7 @@ if ( $db->query($sql) ) $langs->load("orders"); $i = 0; - print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; + print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>'; $var = True; @@ -139,7 +142,7 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; + print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="2">'.$langs->trans("OrdersInProcess").'</td></tr>'; $var = True; @@ -175,9 +178,9 @@ if ( $db->query($sql) ) if ($num) { $i = 0; - print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; + print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; - print '<td colspan="3">5 derni�res exp�ditions</td></tr>'; + print '<td colspan="3">'.$langs->trans("LastSendings",$max).'</td></tr>'; $var = True; while ($i < $num) { diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 0c239538f0d..d712793c6da 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -1,6 +1,6 @@ <?php /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2004-2005 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 @@ -21,17 +21,21 @@ * */ -/*! \file htdocs/expedition/liste.php +/** + \file htdocs/expedition/liste.php \ingroup expedition \brief Page de la liste des propositions commerciales */ require("./pre.inc.php"); +$langs->load("sendings"); + $user->getrights('expedition'); if (!$user->rights->expedition->lire) accessforbidden(); + /* * S�curit� acc�s client */ @@ -41,20 +45,16 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } + /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ llxHeader('','Liste des exp�ditions','ch-expedition.html'); -if ($_GET["sortfield"] == "") -{ - $sortfield="e.rowid"; -} -if ($_GET["sortorder"] == "") -{ - $sortorder="DESC"; -} +if (! $sortfield) $sortfield="e.rowid"; +if (! $sortorder) $sortorder="DESC"; + $limit = $conf->liste_limit; $offset = $limit * $_GET["page"] ; @@ -80,10 +80,12 @@ $expedition = new Expedition($db); $sql .= " ORDER BY $sortfield $sortorder"; $sql .= $db->plimit($limit + 1,$offset); -if ( $db->query($sql) ) +$resql=$db->query($sql); +if ($resql) { - $num = $db->num_rows(); - print_barre_liste("Expeditions", $_GET["page"], "liste.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); + $num = $db->num_rows($resql); + + print_barre_liste($langs->trans("Sendings"), $_GET["page"], "liste.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; print '<table class="noborder" width="100%">'; @@ -97,7 +99,7 @@ if ( $db->query($sql) ) while ($i < min($num,$limit)) { - $objp = $db->fetch_object(); + $objp = $db->fetch_object($resql); $var=!$var; print "<tr $bc[$var]>"; @@ -132,13 +134,15 @@ if ( $db->query($sql) ) } print "</table>"; - $db->free(); + $db->free($resql); } else { - print $db->error(); + dolibarr_print_error($db); } $db->close(); -llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); + +llxFooter('$Date$ - $Revision$'); + ?> diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index bbbfea284a2..e58db9ecdf6 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -31,12 +31,16 @@ require("./pre.inc.php"); require("../expedition.class.php"); +$langs->load("sendings"); + + llxHeader(); -print_fiche_titre('Statistiques exp�ditions', $mesg); +print_fiche_titre($langs->trans("StatisticsOfSendings"), $mesg); print '<table class="border" width="100%">'; -print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="40%" align="center">Nb d\'exp�dition</td></tr>'; +print '<tr><td align="center">'.$langs->trans("Year").'</td>'; +print '<td width="40%" align="center">'.$langs->trans("NbOfSendings").'</td></tr>'; $sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm FROM ".MAIN_DB_PREFIX."expedition WHERE fk_statut > 0 GROUP BY dm DESC "; if ($db->query($sql)) @@ -59,5 +63,5 @@ print '</table><br><i>Statistiques effectu $db->close(); -llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/includes/menus/barre_left/eldy.php b/htdocs/includes/menus/barre_left/eldy.php index e5aed820c5b..21b8fe9d74d 100644 --- a/htdocs/includes/menus/barre_left/eldy.php +++ b/htdocs/includes/menus/barre_left/eldy.php @@ -195,11 +195,14 @@ class MenuLeft { $langs->load("orders"); $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."/societe.php?leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); - 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"), 1 ,$user->rights->commande->lire); + if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1 ,$user->rights->commande->lire); + if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire); + } + + if ($conf->expedition->enabled) { + $newmenu->add(DOL_URL_ROOT."/expedition/index.php?leftmenu=sendings", $langs->trans("Sendings"), 0, $user->rights->expedition->lire); + if ($leftmenu=="sendings") $newmenu->add_submenu(DOL_URL_ROOT."/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1 ,$user->rights->expedition->lire); + if ($leftmenu=="sendings") $newmenu->add_submenu(DOL_URL_ROOT."/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1 ,$user->rights->expedition->lire); } if ($conf->fichinter->enabled ) diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index ad51d36a6a4..e25afad57e3 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -4,3 +4,8 @@ Sendings=Sendings ListOfSendings=List of sendings SendingMethod=Sending method SendingReceipt=Sending receipt +LastSendings=Last %s sendings +SearchASending=Search a sending +StatisticsOfSendings=Statistics of sendings +NbOfSendings=Number of sendings + diff --git a/htdocs/langs/fr_FR/sendings.lang b/htdocs/langs/fr_FR/sendings.lang index 58cd78d7e75..2307a2963cd 100644 --- a/htdocs/langs/fr_FR/sendings.lang +++ b/htdocs/langs/fr_FR/sendings.lang @@ -1,6 +1,10 @@ # Dolibarr language file - fr_FR - sendings -Sending=Envoi -Sendings=Envois -ListOfSendings=Liste des envois -SendingMethod=M�thode de livraison -SendingReceipt=Bordereau de livraison \ No newline at end of file +Sending=Exp�dition +Sendings=Exp�ditions +ListOfSendings=Liste des exp�ditions +SendingMethod=M�thode d'exp�dition +SendingReceipt=Bordereau de livraison +LastSendings=Les %s dernieres exp�ditions +SearchASending=Rechercher exp�dition +StatisticsOfSendings=Statistiques des exp�ditions +NbOfSendings=Nombre d'exp�ditions -- GitLab