From 8abeed13b7d06deeb08d5eb742c218f5cd37e054 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Aug 2009 18:11:27 +0000 Subject: [PATCH] New: Add picto on tab titles --- htdocs/comm/propal.php | 14 +++-- htdocs/comm/propal/note.php | 102 +++++++++++++++---------------- htdocs/commande/apercu.php | 30 ++++----- htdocs/commande/contact.php | 8 ++- htdocs/commande/document.php | 12 ++-- htdocs/commande/fiche.php | 4 +- htdocs/commande/info.php | 18 +++--- htdocs/commande/liste.php | 13 +++- htdocs/commande/note.php | 6 +- htdocs/compta/commande/fiche.php | 4 +- htdocs/expedition/commande.php | 13 ++-- 11 files changed, 120 insertions(+), 104 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6bd3baf8967..b1628c2dc08 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -903,6 +903,7 @@ llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_c $html = new Form($db); $formfile = new FormFile($db); +$companystatic=new Societe($db); $now=gmmktime(); @@ -2085,7 +2086,7 @@ else $propalstatic->ref=$objp->ref; print ''; - print ''; @@ -2094,12 +2095,10 @@ else print ''; print '
'; + print ''; print $propalstatic->getNomUrl(1); print ''; - $filename=dol_sanitizeFileName($objp->ref); $filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($objp->ref); $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid; $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); - print '
'; if ($objp->client == 1) @@ -2111,8 +2110,13 @@ else $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->rowid; } - // Societe - print ''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''; + // Company + $companystatic->id=$objp->rowid; + $companystatic->nom=$objp->nom; + $companystatic->client=$objp->client; + print ''; + print $companystatic->getNomUrl(1,'customer'); + print ''; // Date propale print ''; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 425bc6658c6..70781a9fa51 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -20,11 +20,11 @@ */ /** - \file htdocs/comm/propal/note.php - \ingroup propale - \brief Fiche d'information sur une proposition commerciale - \version $Id$ -*/ + \file htdocs/comm/propal/note.php + \ingroup propale + \brief Fiche d'information sur une proposition commerciale + \version $Id$ + */ require('./pre.inc.php'); require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); @@ -111,13 +111,13 @@ if ($_GET['propalid']) print ''; - print ''; + print ''; - // Societe - print ''; + // Societe + print ''; // Ligne info remises tiers - print ''; // Date - print ''; - print ''; + print ''; + print ''; - // Date fin propal - print ''; - print ''; - print ''; + // Date fin propal + print ''; + print ''; + print ''; // Note publique - print ''; + print ''; print '"; // Note privee @@ -171,15 +171,15 @@ if ($_GET['propalid']) { print ''; print ''; // Si fichier detail PDF existe - if (file_exists($filedetail)) { // commande détaillée supplémentaire - print ""; + if (file_exists($filedetail)) { // commande d�taill�e suppl�mentaire + print ""; print ''; print ''; @@ -231,17 +233,17 @@ if ($_GET["id"] > 0) { dol_print_error($db); } } else { - // Commande non trouvée + // Commande non trouv�e print $langs->trans("ErrorPropalNotFound",$_GET["id"]); } } -// Si fichier png PDF d'1 page trouvé +// Si fichier png PDF d'1 page trouv� if (file_exists($fileimage)) { print ''; } -// Si fichier png PDF de plus d'1 page trouvé +// Si fichier png PDF de plus d'1 page trouv� elseif (file_exists($fileimagebis)) { $multiple = $relativepathimage . "."; diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index ab8acab7dba..e1576065d9a 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -145,7 +145,11 @@ if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer) } -llxHeader('', $langs->trans("Order"), "Commande"); +/* + * View + */ + +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); $formcompany = new FormCompany($db); @@ -172,7 +176,7 @@ if ($id > 0 || ! empty($ref)) $head = commande_prepare_head($commande); - dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order'); /* diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index d8e65ee06e3..dbe0e2422fd 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -20,10 +20,10 @@ */ /** - \file htdocs/commande/document.php - \ingroup order - \brief Page de gestion des documents attachees a une commande - \version $Id$ + * \file htdocs/commande/document.php + * \ingroup order + * \brief Page de gestion des documents attachees a une commande + * \version $Id$ */ require('./pre.inc.php'); @@ -108,7 +108,7 @@ if ($action=='delete') * View */ -llxHeader(); +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); @@ -120,7 +120,7 @@ if ($id > 0 || ! empty($ref)) $societe->fetch($commande->socid); $head = commande_prepare_head($commande); - dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder')); + dol_fiche_head($head, 'documents', $langs->trans('CustomerOrder'), 0, 'order'); // Construit liste des fichiers diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 5095c8f9778..f167f655382 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -881,7 +881,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel']) * View */ -llxHeader('',$langs->trans('Order'),'Commande'); +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); $formfile = new FormFile($db); @@ -1205,7 +1205,7 @@ else $author->fetch(); $head = commande_prepare_head($commande); - dol_fiche_head($head, 'order', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'order', $langs->trans("CustomerOrder"), 0, 'order'); /* * Confirmation de la suppression de la commande diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index d4774e15314..85da189a314 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -18,11 +18,11 @@ */ /** - \file htdocs/commande/info.php - \ingroup commande - \brief Page des informations d'une commande - \version $Id$ -*/ + * \file htdocs/commande/info.php + * \ingroup commande + * \brief Page des informations d'une commande + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php"); @@ -41,12 +41,12 @@ if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'commande',$comid,''); + /* - * Visualisation de la fiche - * + * View */ -llxHeader(); +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $commande = new Commande($db); $commande->fetch($_GET["id"]); @@ -55,7 +55,7 @@ $soc = new Societe($db, $commande->socid); $soc->fetch($commande->socid); $head = commande_prepare_head($commande); -dol_fiche_head($head, 'info', $langs->trans("CustomerOrder")); +dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order'); print '
'.$langs->trans('Ref').''.$propal->ref.'
'.$langs->trans('Ref').''.$propal->ref.'
'.$langs->trans('Company').''.$societe->getNomUrl(1).'
'.$langs->trans('Company').''.$societe->getNomUrl(1).'
'.$langs->trans('Discounts').''; + print '
'.$langs->trans('Discounts').''; if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); $absolute_discount=$societe->getAvailableDiscounts(); @@ -128,42 +128,42 @@ if ($_GET['propalid']) print '
'.$langs->trans('Date').''; - print dol_print_date($propal->date,'daytext'); - print '
'.$langs->trans('Date').''; + print dol_print_date($propal->date,'daytext'); + print '
'.$langs->trans('DateEndPropal').''; - if ($propal->fin_validite) - { - print dol_print_date($propal->fin_validite,'daytext'); - if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); - } - else - { - print $langs->trans("Unknown"); - } - print '
'.$langs->trans('DateEndPropal').''; + if ($propal->fin_validite) + { + print dol_print_date($propal->fin_validite,'daytext'); + if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); + } + else + { + print $langs->trans("Unknown"); + } + print '
'.$langs->trans("NotePublic").' :
'.$langs->trans("NotePublic").' :'; - if ($_GET["action"] == 'edit') - { - print '
'; - print ''; - print ''; - print '
"; - print ''; - print '
'; - } - else - { - print ($propal->note_public?nl2br($propal->note_public):" "); - } + if ($_GET["action"] == 'edit') + { + print '
'; + print ''; + print ''; + print '
"; + print ''; + print '
'; + } + else + { + print ($propal->note_public?nl2br($propal->note_public):" "); + } print "
'.$langs->trans("NotePrivate").' :'; - if ($_GET["action"] == 'edit') - { - print '
'; - print ''; - print ''; - print '
"; - print ''; - print '
'; - } + if ($_GET["action"] == 'edit') + { + print '
'; + print ''; + print ''; + print '
"; + print ''; + print '
'; + } else { print ($propal->note?nl2br($propal->note):" "); @@ -202,7 +202,7 @@ if ($_GET['propalid']) } print ''; } - } + } } $db->close(); diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 984d3c4b39d..1f683eac1d3 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Éric Seigne + * Copyright (C) 2004 �ric Seigne * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * @@ -17,16 +17,13 @@ * 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/commande/apercu.php \ingroup commande - \brief Page de l'onglet aperçu d'une commande - \version $Revision$ + \brief Page de l'onglet aper�u d'une commande + \version $Id$ */ require("./pre.inc.php"); @@ -50,7 +47,12 @@ if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'commande',$comid,''); -llxHeader(); + +/* + * View + */ + +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); @@ -70,7 +72,7 @@ if ($_GET["id"] > 0) { $head = commande_prepare_head($commande); - dol_fiche_head($head, 'preview', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'preview', $langs->trans("CustomerOrder"), 0, 'order'); /* @@ -134,7 +136,7 @@ if ($_GET["id"] > 0) { $relativepath = "${commanderef}/${commanderef}.pdf"; $relativepathdetail = "${commanderef}/${commanderef}-detail.pdf"; - // Chemin vers png aperçus + // Chemin vers png aper�us $relativepathimage = "${commanderef}/${commanderef}.pdf.png"; $fileimage = $file.".png"; // Si PDF d'1 page $fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page @@ -156,8 +158,8 @@ if ($_GET["id"] > 0) { print '
Commande détaillée
Commande d�taill�e'.$commande->ref.'-detail.pdf'.filesize($filedetail). ' bytes
'; diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 3c5ac5a5d42..85d86b1fe95 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -55,6 +55,7 @@ $now=gmmktime(); $html = new Form($db); $formfile = new FormFile($db); +$companystatic = new Societe($db); llxHeader(); @@ -69,7 +70,7 @@ if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; $offset = $limit * $_GET['page'] ; -$sql = 'SELECT s.nom, s.rowid as socid, c.rowid, c.ref, c.total_ht, c.ref_client,'; +$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,'; $sql.= ' '.$db->pdate('c.date_commande').' as date_commande, c.fk_statut, c.facture as facturee'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; @@ -192,7 +193,7 @@ if ($resql) $generic_commande->ref=$objp->ref; print ''; - print ''; @@ -209,7 +210,13 @@ if ($resql) print ''; - print ''; + // Company + $companystatic->id=$objp->socid; + $companystatic->nom=$objp->nom; + $companystatic->client=$objp->client; + print ''; print ''; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6f50a6a5738..a9fec1ba5ad 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -80,7 +80,7 @@ if ($_POST["action"] == 'update' && $user->rights->commande->creer) * View */ -llxHeader(); +llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); @@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref)) $head = commande_prepare_head($commande); - dol_fiche_head($head, 'note', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order'); print '
'; + print ''; print $generic_commande->getNomUrl(1,$objp->fk_statut); print ''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''; + print $companystatic->getNomUrl(1,'customer'); + print ''.$objp->ref_client.'
'; @@ -161,7 +161,7 @@ if ($id > 0 || ! empty($ref)) /* * Actions */ - + print '
'; if ($user->rights->commande->creer && $_GET["action"] <> 'edit') diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 99765c91a78..6922280b0f0 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -119,7 +119,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer) * View */ -llxHeader('',$langs->trans("OrderCard"),"Commande"); +llxHeader('',$langs->trans("OrderCard"),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); $formfile = new FormFile($db); @@ -141,7 +141,7 @@ if ($id > 0 || ! empty($ref)) $author->fetch(); $head = commande_prepare_head($commande); - dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder"), 0, 'order'); /* * Commande diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 56d7cba3faa..cf8b7a6efed 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -21,9 +21,9 @@ // Code identique a /expedition/fiche.php /** - \file htdocs/expedition/commande.php - \ingroup expedition - \version $Id$ + * \file htdocs/expedition/commande.php + * \ingroup expedition + * \version $Id$ */ require("./pre.inc.php"); @@ -130,7 +130,7 @@ $formfile = new FormFile($db); /* */ /* *************************************************************************** */ -llxHeader('',$langs->trans("OrderCard")); +llxHeader('',$langs->trans('OrderCard'),''); $id = $_GET['id']; $ref= $_GET['ref']; @@ -151,15 +151,14 @@ if ($id > 0 || ! empty($ref)) $author->fetch(); $head = commande_prepare_head($commande); - dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder")); + dol_fiche_head($head, 'shipping', $langs->trans("CustomerOrder"), 0, 'order'); /* * Confirmation de la validation - * */ if ($_GET["action"] == 'cloture') { - $ret=$html->form_confirm("commande.php?id=".$_GET["id"],"Cl�turer la commande","Etes-vous s�r de vouloir cl�turer cette commande ?","confirm_cloture"); + $ret=$html->form_confirm("commande.php?id=".$_GET["id"],$langs->trans("CloseOrder"),$langs->trans("ConfirmCloseOrder"),"confirm_cloture"); if ($ret == 'html') print '
'; }