New: Add picto on tab titles

This commit is contained in:
Laurent Destailleur 2009-08-05 18:11:27 +00:00
parent 3ef5f96974
commit 8abeed13b7
11 changed files with 120 additions and 104 deletions

View File

@ -903,6 +903,7 @@ llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_c
$html = new Form($db); $html = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$companystatic=new Societe($db);
$now=gmmktime(); $now=gmmktime();
@ -2085,7 +2086,7 @@ else
$propalstatic->ref=$objp->ref; $propalstatic->ref=$objp->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="90" class="nobordernopadding" nowrap="nowrap">'; print '<td class="nobordernopadding" nowrap="nowrap">';
print $propalstatic->getNomUrl(1); print $propalstatic->getNomUrl(1);
print '</td>'; print '</td>';
@ -2094,12 +2095,10 @@ else
print '</td>'; print '</td>';
print '<td width="16" align="right" class="nobordernopadding">'; print '<td width="16" align="right" class="nobordernopadding">';
$filename=dol_sanitizeFileName($objp->ref); $filename=dol_sanitizeFileName($objp->ref);
$filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($objp->ref); $filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($objp->ref);
$urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid; $urlsource=$_SERVER['PHP_SELF'].'?propalid='.$objp->propalid;
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1); $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','','','',1);
print '</td></tr></table>'; print '</td></tr></table>';
if ($objp->client == 1) if ($objp->client == 1)
@ -2111,8 +2110,13 @@ else
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->rowid; $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->rowid;
} }
// Societe // Company
print '<td><a href="'.$url.'">'.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.'</a></td>'; $companystatic->id=$objp->rowid;
$companystatic->nom=$objp->nom;
$companystatic->client=$objp->client;
print '<td>';
print $companystatic->getNomUrl(1,'customer');
print '</td>';
// Date propale // Date propale
print '<td align="center">'; print '<td align="center">';

View File

@ -20,11 +20,11 @@
*/ */
/** /**
\file htdocs/comm/propal/note.php \file htdocs/comm/propal/note.php
\ingroup propale \ingroup propale
\brief Fiche d'information sur une proposition commerciale \brief Fiche d'information sur une proposition commerciale
\version $Id$ \version $Id$
*/ */
require('./pre.inc.php'); require('./pre.inc.php');
require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
@ -111,13 +111,13 @@ if ($_GET['propalid'])
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$propal->ref.'</td></tr>'; print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$propal->ref.'</td></tr>';
// Societe // Societe
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
// Ligne info remises tiers // Ligne info remises tiers
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">'; print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client);
else print $langs->trans("CompanyHasNoRelativeDiscount"); else print $langs->trans("CompanyHasNoRelativeDiscount");
$absolute_discount=$societe->getAvailableDiscounts(); $absolute_discount=$societe->getAvailableDiscounts();
@ -128,42 +128,42 @@ if ($_GET['propalid'])
print '</td></tr>'; print '</td></tr>';
// Date // Date
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">'; print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">';
print dol_print_date($propal->date,'daytext'); print dol_print_date($propal->date,'daytext');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Date fin propal // Date fin propal
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">'; print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">';
if ($propal->fin_validite) if ($propal->fin_validite)
{ {
print dol_print_date($propal->fin_validite,'daytext'); 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")); if ($propal->statut == 1 && $propal->fin_validite < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
} }
else else
{ {
print $langs->trans("Unknown"); print $langs->trans("Unknown");
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Note publique // Note publique
print '<tr><td valign="top">'.$langs->trans("NotePublic").' :</td>'; print '<tr><td valign="top">'.$langs->trans("NotePublic").' :</td>';
print '<td valign="top" colspan="3">'; print '<td valign="top" colspan="3">';
if ($_GET["action"] == 'edit') if ($_GET["action"] == 'edit')
{ {
print '<form method="post" action="note.php?propalid='.$propal->id.'">'; print '<form method="post" action="note.php?propalid='.$propal->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update_public">'; print '<input type="hidden" name="action" value="update_public">';
print '<textarea name="note_public" cols="80" rows="8">'.$propal->note_public."</textarea><br>"; print '<textarea name="note_public" cols="80" rows="8">'.$propal->note_public."</textarea><br>";
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
print '</form>'; print '</form>';
} }
else else
{ {
print ($propal->note_public?nl2br($propal->note_public):"&nbsp;"); print ($propal->note_public?nl2br($propal->note_public):"&nbsp;");
} }
print "</td></tr>"; print "</td></tr>";
// Note privee // Note privee
@ -171,15 +171,15 @@ if ($_GET['propalid'])
{ {
print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>'; print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
print '<td valign="top" colspan="3">'; print '<td valign="top" colspan="3">';
if ($_GET["action"] == 'edit') if ($_GET["action"] == 'edit')
{ {
print '<form method="post" action="note.php?propalid='.$propal->id.'">'; print '<form method="post" action="note.php?propalid='.$propal->id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<textarea name="note" cols="80" rows="8">'.$propal->note."</textarea><br>"; print '<textarea name="note" cols="80" rows="8">'.$propal->note."</textarea><br>";
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
print '</form>'; print '</form>';
} }
else else
{ {
print ($propal->note?nl2br($propal->note):"&nbsp;"); print ($propal->note?nl2br($propal->note):"&nbsp;");
@ -202,7 +202,7 @@ if ($_GET['propalid'])
} }
print '</div>'; print '</div>';
} }
} }
} }
$db->close(); $db->close();

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Éric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 <EFBFBD>ric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* *
@ -17,16 +17,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/commande/apercu.php \file htdocs/commande/apercu.php
\ingroup commande \ingroup commande
\brief Page de l'onglet aperçu d'une commande \brief Page de l'onglet aper<EFBFBD>u d'une commande
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -50,7 +47,12 @@ if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'commande',$comid,''); $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); $html = new Form($db);
@ -70,7 +72,7 @@ if ($_GET["id"] > 0) {
$head = commande_prepare_head($commande); $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"; $relativepath = "${commanderef}/${commanderef}.pdf";
$relativepathdetail = "${commanderef}/${commanderef}-detail.pdf"; $relativepathdetail = "${commanderef}/${commanderef}-detail.pdf";
// Chemin vers png aperçus // Chemin vers png aper<EFBFBD>us
$relativepathimage = "${commanderef}/${commanderef}.pdf.png"; $relativepathimage = "${commanderef}/${commanderef}.pdf.png";
$fileimage = $file.".png"; // Si PDF d'1 page $fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page $fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
@ -156,8 +158,8 @@ if ($_GET["id"] > 0) {
print '</tr>'; print '</tr>';
// Si fichier detail PDF existe // Si fichier detail PDF existe
if (file_exists($filedetail)) { // commande détaillée supplémentaire if (file_exists($filedetail)) { // commande d<EFBFBD>taill<EFBFBD>e suppl<70>mentaire
print "<tr $bc[$var]><td>Commande détaillée</td>"; print "<tr $bc[$var]><td>Commande d<EFBFBD>taill<EFBFBD>e</td>";
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepathdetail).'">'.$commande->ref.'-detail.pdf</a></td>'; print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=commande&file='.urlencode($relativepathdetail).'">'.$commande->ref.'-detail.pdf</a></td>';
print '<td align="right">'.filesize($filedetail). ' bytes</td>'; print '<td align="right">'.filesize($filedetail). ' bytes</td>';
@ -231,17 +233,17 @@ if ($_GET["id"] > 0) {
dol_print_error($db); dol_print_error($db);
} }
} else { } else {
// Commande non trouvée // Commande non trouv<EFBFBD>e
print $langs->trans("ErrorPropalNotFound",$_GET["id"]); print $langs->trans("ErrorPropalNotFound",$_GET["id"]);
} }
} }
// Si fichier png PDF d'1 page trouvé // Si fichier png PDF d'1 page trouv<EFBFBD>
if (file_exists($fileimage)) if (file_exists($fileimage))
{ {
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercucommande&file='.urlencode($relativepathimage).'">'; print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercucommande&file='.urlencode($relativepathimage).'">';
} }
// Si fichier png PDF de plus d'1 page trouvé // Si fichier png PDF de plus d'1 page trouv<EFBFBD>
elseif (file_exists($fileimagebis)) elseif (file_exists($fileimagebis))
{ {
$multiple = $relativepathimage . "."; $multiple = $relativepathimage . ".";

View File

@ -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); $html = new Form($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
@ -172,7 +176,7 @@ if ($id > 0 || ! empty($ref))
$head = commande_prepare_head($commande); $head = commande_prepare_head($commande);
dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder")); dol_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), 0, 'order');
/* /*

View File

@ -20,10 +20,10 @@
*/ */
/** /**
\file htdocs/commande/document.php * \file htdocs/commande/document.php
\ingroup order * \ingroup order
\brief Page de gestion des documents attachees a une commande * \brief Page de gestion des documents attachees a une commande
\version $Id$ * \version $Id$
*/ */
require('./pre.inc.php'); require('./pre.inc.php');
@ -108,7 +108,7 @@ if ($action=='delete')
* View * View
*/ */
llxHeader(); llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db); $html = new Form($db);
@ -120,7 +120,7 @@ if ($id > 0 || ! empty($ref))
$societe->fetch($commande->socid); $societe->fetch($commande->socid);
$head = commande_prepare_head($commande); $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 // Construit liste des fichiers

View File

@ -881,7 +881,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel'])
* View * View
*/ */
llxHeader('',$langs->trans('Order'),'Commande'); llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db); $html = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
@ -1205,7 +1205,7 @@ else
$author->fetch(); $author->fetch();
$head = commande_prepare_head($commande); $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 * Confirmation de la suppression de la commande

View File

@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/commande/info.php * \file htdocs/commande/info.php
\ingroup commande * \ingroup commande
\brief Page des informations d'une commande * \brief Page des informations d'une commande
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.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,''); $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 = new Commande($db);
$commande->fetch($_GET["id"]); $commande->fetch($_GET["id"]);
@ -55,7 +55,7 @@ $soc = new Societe($db, $commande->socid);
$soc->fetch($commande->socid); $soc->fetch($commande->socid);
$head = commande_prepare_head($commande); $head = commande_prepare_head($commande);
dol_fiche_head($head, 'info', $langs->trans("CustomerOrder")); dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order');
print '<table width="100%"><tr><td>'; print '<table width="100%"><tr><td>';

View File

@ -55,6 +55,7 @@ $now=gmmktime();
$html = new Form($db); $html = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$companystatic = new Societe($db);
llxHeader(); llxHeader();
@ -69,7 +70,7 @@ if (! $sortorder) $sortorder='DESC';
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$offset = $limit * $_GET['page'] ; $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.= ' '.$db->pdate('c.date_commande').' as date_commande, c.fk_statut, c.facture as facturee';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql.= ', '.MAIN_DB_PREFIX.'commande as c'; $sql.= ', '.MAIN_DB_PREFIX.'commande as c';
@ -192,7 +193,7 @@ if ($resql)
$generic_commande->ref=$objp->ref; $generic_commande->ref=$objp->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">'; print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="90" class="nobordernopadding" nowrap="nowrap">'; print '<td class="nobordernopadding" nowrap="nowrap">';
print $generic_commande->getNomUrl(1,$objp->fk_statut); print $generic_commande->getNomUrl(1,$objp->fk_statut);
print '</td>'; print '</td>';
@ -209,7 +210,13 @@ if ($resql)
print '</td>'; print '</td>';
print '<td><a href="../comm/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.'</a></td>'; // Company
$companystatic->id=$objp->socid;
$companystatic->nom=$objp->nom;
$companystatic->client=$objp->client;
print '<td>';
print $companystatic->getNomUrl(1,'customer');
print '</td>';
print '<td>'.$objp->ref_client.'</td>'; print '<td>'.$objp->ref_client.'</td>';

View File

@ -80,7 +80,7 @@ if ($_POST["action"] == 'update' && $user->rights->commande->creer)
* View * View
*/ */
llxHeader(); llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db); $html = new Form($db);
@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref))
$head = commande_prepare_head($commande); $head = commande_prepare_head($commande);
dol_fiche_head($head, 'note', $langs->trans("CustomerOrder")); dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';

View File

@ -119,7 +119,7 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer)
* View * View
*/ */
llxHeader('',$langs->trans("OrderCard"),"Commande"); llxHeader('',$langs->trans("OrderCard"),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
$html = new Form($db); $html = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
@ -141,7 +141,7 @@ if ($id > 0 || ! empty($ref))
$author->fetch(); $author->fetch();
$head = commande_prepare_head($commande); $head = commande_prepare_head($commande);
dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder")); dol_fiche_head($head, 'accountancy', $langs->trans("CustomerOrder"), 0, 'order');
/* /*
* Commande * Commande

View File

@ -21,9 +21,9 @@
// Code identique a /expedition/fiche.php // Code identique a /expedition/fiche.php
/** /**
\file htdocs/expedition/commande.php * \file htdocs/expedition/commande.php
\ingroup expedition * \ingroup expedition
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -130,7 +130,7 @@ $formfile = new FormFile($db);
/* */ /* */
/* *************************************************************************** */ /* *************************************************************************** */
llxHeader('',$langs->trans("OrderCard")); llxHeader('',$langs->trans('OrderCard'),'');
$id = $_GET['id']; $id = $_GET['id'];
$ref= $_GET['ref']; $ref= $_GET['ref'];
@ -151,15 +151,14 @@ if ($id > 0 || ! empty($ref))
$author->fetch(); $author->fetch();
$head = commande_prepare_head($commande); $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 * Confirmation de la validation
*
*/ */
if ($_GET["action"] == 'cloture') if ($_GET["action"] == 'cloture')
{ {
$ret=$html->form_confirm("commande.php?id=".$_GET["id"],"Cl<EFBFBD>turer la commande","Etes-vous s<>r de vouloir cl<63>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 '<br>'; if ($ret == 'html') print '<br>';
} }