mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
The new banner tab is also on user card now
This commit is contained in:
parent
db9d09c7a3
commit
bd48ad265d
|
|
@ -1045,8 +1045,6 @@ else
|
|||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref=$object->getFullName($langs);
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,36 +32,50 @@ $langs->load("companies");
|
|||
|
||||
|
||||
// Security check
|
||||
$contactid = GETPOST("id",'int');
|
||||
$id = GETPOST("id",'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||
|
||||
$contact = new Contact($db);
|
||||
$object = new Contact($db);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||
|
||||
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||
|
||||
if ($contactid > 0)
|
||||
if ($id > 0)
|
||||
{
|
||||
$result = $contact->fetch($contactid, $user);
|
||||
$result = $object->fetch($id, $user);
|
||||
|
||||
$contact->info($contactid);
|
||||
$object->info($id);
|
||||
|
||||
|
||||
$head = contact_prepare_head($contact);
|
||||
$head = contact_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $title, 0, 'contact');
|
||||
|
||||
// TODO Put here ref of card
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_print_object_info($contact);
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_print_object_info($object);
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -456,22 +456,28 @@ abstract class CommonObject
|
|||
if ($this->elemet == 'contact')
|
||||
{
|
||||
$contactid=$this->id;
|
||||
$thirdpartyid=$object->id;
|
||||
$thirdpartyid=$object->fk_soc;
|
||||
}
|
||||
if ($this->elemet == 'user')
|
||||
{
|
||||
$contactid=$this->contact_id;
|
||||
$thirdpartyid=$object->fk_soc;
|
||||
}
|
||||
|
||||
$out='<!-- BEGIN part to show address block -->';
|
||||
|
||||
$outdone=0;
|
||||
$coords = $this->getFullAddress(1,', ');
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
if ($coords)
|
||||
{
|
||||
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
|
||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
$out.=img_picto($langs->trans("Address"), 'object_address.png');
|
||||
$out.='</a> ';
|
||||
}
|
||||
if ($coords) {
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
|
||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
$out.=img_picto($langs->trans("Address"), 'object_address.png');
|
||||
$out.='</a> ';
|
||||
}
|
||||
$out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++;
|
||||
$outdone++;
|
||||
}
|
||||
|
|
@ -483,8 +489,8 @@ abstract class CommonObject
|
|||
$outdone++;
|
||||
}
|
||||
|
||||
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'<br>':'');
|
||||
if ($this->phone && empty($this->phone_pro)) { // For object storing pro phone into ->phone
|
||||
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'<br>':'');
|
||||
if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
|
||||
$out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++;
|
||||
}
|
||||
if (! empty($this->phone_pro)) {
|
||||
|
|
@ -499,6 +505,15 @@ abstract class CommonObject
|
|||
if (! empty($this->fax)) {
|
||||
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++;
|
||||
}
|
||||
if (! empty($this->office_phone)) {
|
||||
$out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++;
|
||||
}
|
||||
if (! empty($this->user_mobile)) {
|
||||
$out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++;
|
||||
}
|
||||
if (! empty($this->office_fax)) {
|
||||
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++;
|
||||
}
|
||||
|
||||
$out.='<div style="clear: both;"></div>';
|
||||
$outdone=0;
|
||||
|
|
|
|||
|
|
@ -5157,7 +5157,7 @@ class Form
|
|||
{
|
||||
$ret.=dol_htmlentities($object->name);
|
||||
}
|
||||
else if ($object->element == 'contact')
|
||||
else if (in_array($object->element, array('contact', 'user', 'member')))
|
||||
{
|
||||
$ret.=dol_htmlentities($object->getFullName($langs));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -868,19 +868,16 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||
if ($object->element == 'contact') $modulepart='contact';
|
||||
if ($object->element == 'member') $modulepart='memberphoto';
|
||||
if ($object->element == 'user') $modulepart='userphoto';
|
||||
|
||||
|
||||
print '<div class="arearef heightref valignmiddle" width="100%">';
|
||||
//$morehtmlleft='<div class="floatleft inline-block valignmiddle divphotoref">'.img_picto('', 'title_companies', '', '').'</div>';
|
||||
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'</div>';
|
||||
//if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
|
||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||
if ($object->element == 'societe')
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||
} else {
|
||||
$morehtmlright.=$object->getLibStatut(2);
|
||||
}
|
||||
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||
} else {
|
||||
$morehtmlright.=$object->getLibStatut(2);
|
||||
}
|
||||
if (! empty($object->name_nalias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>';
|
||||
$morehtmlref.='<div class="refidno">';
|
||||
|
|
@ -981,8 +978,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
|||
|
||||
else // Other: title firstname name \n address lines \n zip town \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
$ret .= ($object->town?(($object->zip?' ':'').$object->town):'');
|
||||
$ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : '';
|
||||
$ret .= ($object->town?(($object->zip?' ':$sep).$object->town):'');
|
||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||
{
|
||||
$ret.=($ret?", ":'').$object->state;
|
||||
|
|
@ -1683,6 +1680,8 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0)
|
|||
{
|
||||
$out.=nl2br($address);
|
||||
$showgmap=$showomap=0;
|
||||
|
||||
// TODO Add a hook here
|
||||
if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1;
|
||||
if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1;
|
||||
if ($mode=='member' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) $showgmap=1;
|
||||
|
|
@ -1690,7 +1689,6 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0)
|
|||
if ($mode=='contact' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) $showomap=1;
|
||||
if ($mode=='member' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) $showomap=1;
|
||||
|
||||
// TODO Add a hook here
|
||||
if ($showgmap)
|
||||
{
|
||||
$url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($b);
|
||||
|
||||
$title=$langs->trans("ThirdParty");
|
||||
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Info");
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
|
|
@ -82,11 +84,21 @@ if ($socid > 0)
|
|||
|
||||
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1192,15 +1192,16 @@ else
|
|||
|
||||
$rowspan=19;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
if (! empty($conf->adherent->enabled)) $rowspan++;
|
||||
|
|
@ -1208,25 +1209,9 @@ else
|
|||
if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $rowspan = $rowspan+3;
|
||||
if (! empty($conf->agenda->enabled)) $rowspan++;
|
||||
|
||||
// Lastname
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td>';
|
||||
print '<td colspan="2">'.$object->lastname.'</td>';
|
||||
|
||||
// Photo
|
||||
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||
print $form->showphoto('userphoto',$object,100);
|
||||
print '</td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Firstname
|
||||
print '<tr><td>'.$langs->trans("Firstname").'</td>';
|
||||
print '<td colspan="2">'.$object->firstname.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Position/Job
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<td colspan="2">'.$object->job.'</td>';
|
||||
print '<td>'.$object->job.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Gender
|
||||
|
|
@ -1239,11 +1224,11 @@ else
|
|||
print '<tr><td>'.$langs->trans("Login").'</td>';
|
||||
if (! empty($object->ldap_sid) && $object->statut==0)
|
||||
{
|
||||
print '<td colspan="2" class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';
|
||||
print '<td class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">'.$object->login.'</td>';
|
||||
print '<td>'.$object->login.'</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
|
@ -1253,24 +1238,24 @@ else
|
|||
{
|
||||
if ($passDoNotExpire)
|
||||
{
|
||||
print '<td colspan="2">'.$langs->trans("LdapUacf_".$statutUACF).'</td>';
|
||||
print '<td>'.$langs->trans("LdapUacf_".$statutUACF).'</td>';
|
||||
}
|
||||
else if($userChangePassNextLogon)
|
||||
{
|
||||
print '<td colspan="2" class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</td>';
|
||||
print '<td class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</td>';
|
||||
}
|
||||
else if($userDisabled)
|
||||
{
|
||||
print '<td colspan="2" class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</td>';
|
||||
print '<td class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">'.$langs->trans("DomainPassword").'</td>';
|
||||
print '<td>'.$langs->trans("DomainPassword").'</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
if ($object->pass) print preg_replace('/./i','*',$object->pass);
|
||||
else
|
||||
{
|
||||
|
|
@ -1284,14 +1269,14 @@ else
|
|||
// API key
|
||||
if(! empty($conf->api->enabled) && $user->admin) {
|
||||
print '<tr><td>'.$langs->trans("ApiKey").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
if (! empty($object->api_key))
|
||||
print $langs->trans("Hidden");
|
||||
print '<td>';
|
||||
}
|
||||
|
||||
// Administrator
|
||||
print '<tr><td>'.$langs->trans("Administrator").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("Administrator").'</td><td>';
|
||||
if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity)
|
||||
{
|
||||
print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin");
|
||||
|
|
@ -1310,7 +1295,7 @@ else
|
|||
print '<tr><td>';
|
||||
$text=$langs->trans("Type");
|
||||
print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
|
||||
print '</td><td colspan="2">';
|
||||
print '</td><td>';
|
||||
$type=$langs->trans("Internal");
|
||||
if ($object->societe_id > 0) $type=$langs->trans("External");
|
||||
print $type;
|
||||
|
|
@ -1320,39 +1305,19 @@ else
|
|||
// Ldap sid
|
||||
if ($object->ldap_sid)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>';
|
||||
print $langs->trans("DomainUser",$ldap->domainFQDN);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
// Tel pro
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->office_phone,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->user_mobile,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fax
|
||||
print '<tr><td>'.$langs->trans("Fax").'</td>';
|
||||
print '<td colspan="2">'.dol_print_phone($object->office_fax,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td>';
|
||||
print '<td colspan="2">'.dol_print_skype($object->skype,0,0,1).'</td>';
|
||||
print '<td>'.dol_print_skype($object->skype,0,0,1).'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td>';
|
||||
print '<td colspan="2">'.dol_print_email($object->email,0,0,1).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Signature
|
||||
print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td colspan="2">';
|
||||
print dol_htmlentitiesbr($object->signature);
|
||||
|
|
@ -1360,7 +1325,7 @@ else
|
|||
|
||||
// Hierarchy
|
||||
print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
if (empty($object->fk_user)) print $langs->trans("None");
|
||||
else {
|
||||
$huser=new User($db);
|
||||
|
|
@ -1379,7 +1344,7 @@ else
|
|||
$text=$langs->trans("THM");
|
||||
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
|
||||
print '</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
|
@ -1389,14 +1354,14 @@ else
|
|||
$text=$langs->trans("TJM");
|
||||
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
|
||||
print '</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Salary
|
||||
print '<tr><td>'.$langs->trans("Salary").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):'');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
|
@ -1404,7 +1369,7 @@ else
|
|||
|
||||
// Weeklyhours
|
||||
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
print price2num($object->weeklyhours);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
|
@ -1413,38 +1378,39 @@ else
|
|||
if ($conf->salaries->enabled)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="2">'.$object->accountancy_code.'</td>';
|
||||
print '<td>'.$object->accountancy_code.'</td>';
|
||||
}
|
||||
|
||||
// Color user
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ColorUser").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
print $formother->showColor($object->color, '');
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("LastConnexion").'</td>';
|
||||
print '<td colspan="2">'.dol_print_date($object->datelastlogin,"dayhour").'</td>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
print '<tr><td>'.$langs->trans("LastConnexion").'</td>';
|
||||
print '<td>'.dol_print_date($object->datelastlogin,"dayhour").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>';
|
||||
print '<td colspan="2">'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>';
|
||||
print '<td>'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("OpenIDURL").'</td>';
|
||||
print '<td colspan="2">'.$object->openid.'</td>';
|
||||
print '<td>'.$object->openid.'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
|
@ -1452,7 +1418,7 @@ else
|
|||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
if (isset($object->societe_id) && $object->societe_id > 0)
|
||||
{
|
||||
$societe = new Societe($db);
|
||||
|
|
@ -1480,7 +1446,7 @@ else
|
|||
{
|
||||
$langs->load("members");
|
||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>';
|
||||
if ($object->fk_member)
|
||||
{
|
||||
$adh=new Adherent($db);
|
||||
|
|
@ -1502,7 +1468,7 @@ else
|
|||
{
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
print '<tr><td>'.$langs->trans("Entity").'</td><td>';
|
||||
if (empty($object->entity))
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
|
|
@ -1517,7 +1483,7 @@ else
|
|||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="2"');
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
|
|
@ -1525,6 +1491,11 @@ else
|
|||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
|
||||
print '</div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
|
@ -1761,12 +1732,16 @@ else
|
|||
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $object->id;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Ref/ID
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Ref").'</td>';
|
||||
print '<td>';
|
||||
print $object->id;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Lastname
|
||||
print "<tr>";
|
||||
print '<td class="fieldrequired">'.$langs->trans("Lastname").'</td>';
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ if (($object->id != $user->id) && (! $user->rights->user->user->lire))
|
|||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$object->info($id);
|
||||
|
|
@ -64,12 +66,24 @@ $title = $langs->trans("User");
|
|||
dol_fiche_head($head, 'info', $title, 0, 'user');
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user