|
@@ -896,14 +896,15 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
|
|
/**
|
|
|
* Show html area for list of contacts
|
|
|
*
|
|
|
- * @param Conf $conf Object conf
|
|
|
- * @param Translate $langs Object langs
|
|
|
- * @param DoliDB $db Database handler
|
|
|
- * @param Societe $object Third party object
|
|
|
- * @param string $backtopage Url to go once contact is created
|
|
|
+ * @param Conf $conf Object conf
|
|
|
+ * @param Translate $langs Object langs
|
|
|
+ * @param DoliDB $db Database handler
|
|
|
+ * @param Societe $object Third party object
|
|
|
+ * @param string $backtopage Url to go once contact is created
|
|
|
+ * @param int $showuserlogin 1=Show also user login if it exists
|
|
|
* @return int
|
|
|
*/
|
|
|
-function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|
|
+function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserlogin = 0)
|
|
|
{
|
|
|
global $user, $conf, $extrafields, $hookmanager;
|
|
|
global $contextpage;
|
|
@@ -1137,13 +1138,16 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|
|
if (in_array($key, array('statut'))) {
|
|
|
print $form->selectarray('search_status', array('-1'=>'', '0'=>$contactstatic->LibStatut(0, 1), '1'=>$contactstatic->LibStatut(1, 1)), $search_status);
|
|
|
} elseif (in_array($key, array('role'))) {
|
|
|
- print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles);
|
|
|
+ print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles, 'minwidth200 maxwidth300');
|
|
|
} else {
|
|
|
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.(!empty($search[$key]) ? dol_escape_htmltag($search[$key]) : '').'">';
|
|
|
}
|
|
|
print '</td>';
|
|
|
}
|
|
|
}
|
|
|
+ if ($showuserlogin) {
|
|
|
+ print '<td></td>';
|
|
|
+ }
|
|
|
// Extra fields
|
|
|
$extrafieldsobjectkey = $contactstatic->table_element;
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|
@@ -1183,6 +1187,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|
|
print getTitleFieldOfList($arrayfields['sc.'.$key]['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n";
|
|
|
}
|
|
|
}
|
|
|
+ if ($showuserlogin) {
|
|
|
+ print '<td>'.$langs->trans("DolibarrLogin").'</td>';
|
|
|
+ }
|
|
|
// Extra fields
|
|
|
$extrafieldsobjectkey = $contactstatic->table_element;
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
|
@@ -1281,6 +1288,16 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|
|
print '<td class="center">'.$contactstatic->getLibStatut(5).'</td>';
|
|
|
}
|
|
|
|
|
|
+ if ($showuserlogin) {
|
|
|
+ print '<td>';
|
|
|
+ $tmpuser= new User($db);
|
|
|
+ $resfetch = $tmpuser->fetch(0, '', '', 0, -1, '', $contactstatic->id);
|
|
|
+ if ($resfetch > 0) {
|
|
|
+ print $tmpuser->getNomUrl(1, '', 0, 0, 24, 1);
|
|
|
+ }
|
|
|
+ print '</td>';
|
|
|
+ }
|
|
|
+
|
|
|
// Extra fields
|
|
|
$extrafieldsobjectkey = $contactstatic->table_element;
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|