From 453c29901b0fcffdbadb42076d449d92fd73af99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Jul 2010 20:47:35 +0000 Subject: [PATCH] Fix: Trad on label --- htdocs/comm/fiche.php | 3 ++- htdocs/comm/prospect/fiche.php | 6 +++++- htdocs/compta/fiche.php | 5 ++++- htdocs/core/class/html.form.class.php | 11 ++++++----- htdocs/fourn/fiche.php | 5 ++++- htdocs/societe/notify/fiche.php | 25 ++++++++++++++++++------- 6 files changed, 39 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 114936b9668..9bf48df374d 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -165,7 +165,8 @@ if ($socid > 0) print ''; print ''; print ''; diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 8584b3be2b8..437a680c1a7 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -99,7 +99,11 @@ if ($socid > 0) print '
'.$langs->trans("Name").''; - print $objsoc->nom; + $objsoc->next_prev_filter="te.client in (1,3)"; + print $form->showrefnav($objsoc,'socid','',($user->societe_id?0:1),'rowid','nom','',''); print '
'.$langs->trans('Prefix').''.$objsoc->prefix_comm.'
'; print ''; - print ''; + print ''; + print '"; // Zip / Town diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index af73325636a..2339b706e77 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -135,7 +135,10 @@ if ($socid > 0) print '
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Name").''; + $societe->next_prev_filter="te.client in (2,3)"; + print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','',''); + print '
'.$langs->trans("Address").''.nl2br($societe->address)."
'; - print ''; + print ''; // Prefix print '
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Name").''; + $societe->next_prev_filter="te.client in (1,3)"; + print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','',''); + print '
'.$langs->trans("Prefix").''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 428ca628b73..cf66d5395f3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2959,16 +2959,17 @@ class Form } /** - * \brief Affiche tableau avec ref et bouton navigation pour un objet metier + * \brief Return a HTML area with the reference of object and a naviagation bar for a business object * \param object Object to show - * \param paramid Nom du parametre a utiliser pour nommer id dans liens URL - * \param morehtml Code html supplementaire a afficher avant barre nav - * \param shownav Show Condition (navigation is show if value is 1) + * \param paramid Name of parameter to use to name the id into the URL link + * \param morehtml More html content to output just before the nav bar + * \param shownav Show Condition (navigation is shown if value is 1) * \param fieldid Nom du champ en base a utiliser pour select next et previous * \param fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous * \param morehtmlref Code html supplementaire a afficher apres ref - * \param moreparam More param to ad in nav link url. + * \param moreparam More param to add in nav link url. * \return string Portion HTML avec ref + boutons nav + * \remarks To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria. */ function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='') { diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index c3a75075a96..b763181f986 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -71,7 +71,10 @@ if ( $societe->fetch($socid) ) print '
'; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index c47435499e4..cf513e0d1bd 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 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 @@ -30,6 +30,8 @@ require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); $langs->load("companies"); $langs->load("mails"); +$langs->load("admin"); +$langs->load("other"); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; @@ -137,7 +139,6 @@ if ( $soc->fetch($soc->id) ) // Help - $langs->load("admin"); print $langs->trans("NotificationsDesc").'

'; @@ -220,7 +221,7 @@ if ( $soc->fetch($soc->id) ) print ''; // Liste - $sql = "SELECT c.rowid as id, c.name, c.firstname, c.email, a.titre, n.rowid"; + $sql = "SELECT c.rowid as id, c.name, c.firstname, c.email, a.code, a.titre, n.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c, ".MAIN_DB_PREFIX."action_def as a, ".MAIN_DB_PREFIX."notify_def as n"; $sql.= " WHERE n.fk_contact = c.rowid AND a.rowid = n.fk_action AND n.fk_soc = ".$soc->id; @@ -244,7 +245,10 @@ if ( $soc->fetch($soc->id) ) print '
'; - print ''; + print ''; print ''; print ''; $i++; @@ -273,7 +277,9 @@ if ( $soc->fetch($soc->id) ) print ''; // Liste - $sql = "SELECT c.rowid as id, c.name, c.firstname, c.email, a.titre, n.rowid, n.daten, n.email"; + $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type, n.objet_id,"; + $sql.= " c.rowid as id, c.name, c.firstname, c.email,"; + $sql.= " a.code, a.titre"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c, ".MAIN_DB_PREFIX."action_def as a, ".MAIN_DB_PREFIX."notify as n"; $sql.= " WHERE n.fk_contact = c.rowid AND a.rowid = n.fk_action"; @@ -297,8 +303,13 @@ if ( $soc->fetch($soc->id) ) print ''; - print ''; - print''; + print ''; + // TODO Add link to object here + // print + print''; print ''; $i++; }
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Name").''; + $societe->next_prev_filter="te.fournisseur = 1"; + print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','',''); + print '
'.$langs->trans('Prefix').''.$societe->prefix_comm.'
'.$contactstatic->getNomUrl(1); print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail"); print ''.$obj->titre.''; + $libelle=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->titre); + print $libelle; + print ''.img_delete().'
'.$contactstatic->getNomUrl(1); print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail"); print ''.$obj->titre.''.dol_print_date($db->jdate($obj->daten)).''; + $libelle=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->titre); + print $libelle; + print ''.dol_print_date($db->jdate($obj->daten), 'dayhour').'