';
print '';
- print '| '.$langs->trans("Name").' | '.$societe->nom.' | ';
+ print '| '.$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 ' | ';
+
print '| '.$langs->trans("Address").' | '.nl2br($societe->address)." | ";
// 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 '';
- print '| '.$langs->trans("Name").' | '.$societe->nom.' | ';
+ print '| '.$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 ' | ';
// Prefix
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 '| '.$langs->trans("Name").' | '.$societe->nom.' | ';
+ print '| '.$langs->trans("Name").' | ';
+ $societe->next_prev_filter="te.fournisseur = 1";
+ print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom','','');
+ print ' | ';
print '| '.$langs->trans('Prefix').' | '.$societe->prefix_comm.' | ';
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 '| '.$contactstatic->getNomUrl(1);
print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail");
print ' | ';
- print ''.$obj->titre.' | ';
+ print '';
+ $libelle=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->titre);
+ print $libelle;
+ print ' | ';
print ''.img_delete().' | ';
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 '| '.$contactstatic->getNomUrl(1);
print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail");
print ' | ';
- print ''.$obj->titre.' | ';
- print''.dol_print_date($db->jdate($obj->daten)).' | ';
+ print '';
+ $libelle=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->titre);
+ print $libelle;
+ print ' | ';
+ // TODO Add link to object here
+ // print
+ print''.dol_print_date($db->jdate($obj->daten), 'dayhour').' | ';
print ' ';
$i++;
}
| |