forked from Wavyzz/dolibarr
In Log tab, users can be clicked
This commit is contained in:
@@ -80,41 +80,126 @@ function dol_print_file($langs,$filename,$searchalt=0)
|
|||||||
*/
|
*/
|
||||||
function dol_print_object_info($object)
|
function dol_print_object_info($object)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs,$db;
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
// Import key
|
||||||
if (isset($object->import_key))
|
if (isset($object->import_key))
|
||||||
print $langs->trans("ImportedWithSet")." : " . $object->import_key . '<br>';
|
print $langs->trans("ImportedWithSet")." : " . $object->import_key . '<br>';
|
||||||
|
|
||||||
if (isset($object->user_creation) && $object->user_creation->fullname)
|
// User creation
|
||||||
print $langs->trans("CreatedBy")." : " . $object->user_creation->fullname . '<br>';
|
if (isset($object->user_creation))
|
||||||
|
{
|
||||||
|
print $langs->trans("CreatedBy")." : ";
|
||||||
|
if (is_object($object->user_creation))
|
||||||
|
{
|
||||||
|
print $object->user_creation->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$userstatic->id=$object->user_creation;
|
||||||
|
$userstatic->fetch();
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
if (isset($object->date_creation))
|
if (isset($object->date_creation))
|
||||||
print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext") . '<br>';
|
print $langs->trans("DateCreation")." : " . dol_print_date($object->date_creation,"dayhourtext") . '<br>';
|
||||||
|
|
||||||
if (isset($object->user_modification) && $object->user_modification->fullname)
|
// User change
|
||||||
print $langs->trans("ModifiedBy")." : " . $object->user_modification->fullname . '<br>';
|
if (isset($object->user_modification))
|
||||||
|
{
|
||||||
|
print $langs->trans("ModifiedBy")." : ";
|
||||||
|
if (is_object($object->user_modification))
|
||||||
|
{
|
||||||
|
print $object->user_modification->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$userstatic->id=$object->user_modification;
|
||||||
|
$userstatic->fetch();
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
if (isset($object->date_modification))
|
if (isset($object->date_modification))
|
||||||
print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext") . '<br>';
|
print $langs->trans("DateLastModification")." : " . dol_print_date($object->date_modification,"dayhourtext") . '<br>';
|
||||||
|
|
||||||
if (isset($object->user_validation) && $object->user_validation->fullname)
|
// User validation
|
||||||
print $langs->trans("ValidatedBy")." : " . $object->user_validation->fullname . '<br>';
|
if (isset($object->user_validation))
|
||||||
|
{
|
||||||
|
print $langs->trans("ValidatedBy")." : ";
|
||||||
|
if (is_object($object->user_validation))
|
||||||
|
{
|
||||||
|
print $object->user_validation->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$userstatic->id=$object->user_validation;
|
||||||
|
$userstatic->fetch();
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
if (isset($object->date_validation))
|
if (isset($object->date_validation))
|
||||||
print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext") . '<br>';
|
print $langs->trans("DateValidation")." : " . dol_print_date($object->date_validation,"dayhourtext") . '<br>';
|
||||||
|
|
||||||
if (isset($object->user_cloture) && $object->user_cloture->fullname )
|
// User close
|
||||||
print $langs->trans("ClosedBy")." : " . $object->user_cloture->fullname . '<br>';
|
if (isset($object->user_cloture))
|
||||||
|
{
|
||||||
|
print $langs->trans("ClosedBy")." : ";
|
||||||
|
if (is_object($object->user_cloture))
|
||||||
|
{
|
||||||
|
print $object->user_cloture->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$userstatic->id=$object->user_cloture;
|
||||||
|
$userstatic->fetch();
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
if (isset($object->date_cloture))
|
if (isset($object->date_cloture))
|
||||||
print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext") . '<br>';
|
print $langs->trans("DateClosing")." : " . dol_print_date($object->date_cloture,"dayhourtext") . '<br>';
|
||||||
|
|
||||||
if (isset($object->user_rappro) && $object->user_rappro->fullname )
|
// User conciliate
|
||||||
print $langs->trans("ConciliatedBy")." : " . $object->user_rappro->fullname . '<br>';
|
if (isset($object->user_rappro))
|
||||||
|
{
|
||||||
|
print $langs->trans("ConciliatedBy")." : ";
|
||||||
|
if (is_object($object->user_rappro))
|
||||||
|
{
|
||||||
|
print $object->user_rappro->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$userstatic=new User($db);
|
||||||
|
$userstatic->id=$object->user_rappro;
|
||||||
|
$userstatic->fetch();
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
if (isset($object->date_rappro))
|
if (isset($object->date_rappro))
|
||||||
print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext") . '<br>';
|
print $langs->trans("DateConciliating")." : " . dol_print_date($object->date_rappro,"dayhourtext") . '<br>';
|
||||||
|
|
||||||
|
//Date send
|
||||||
|
if (isset($object->date_envoi))
|
||||||
|
print $langs->trans("DateLastSend")." : " . dol_print_date($object->date_envoi,"dayhourtext") . '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user