Look and feel v21
This commit is contained in:
parent
6bcaabad8e
commit
d28ed5339b
3 changed files with 27 additions and 8 deletions
|
|
@ -233,37 +233,56 @@ trait CommonPeople
|
|||
if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
|
||||
$out .= ($outdone ? '<br>' : '');
|
||||
}
|
||||
|
||||
// Phones
|
||||
$outphonedone = 0;
|
||||
if (!empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->phone_pro)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->phone_mobile)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->phone_perso)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePerso"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->office_phone)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'phone', $langs->trans("PhonePro"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->user_mobile)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', ' ', 'mobile', $langs->trans("PhoneMobile"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->fax)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
if (!empty($this->office_fax)) {
|
||||
$out .= ($outphonedone ? ' ' : '');
|
||||
$out .= dol_print_phone($this->office_fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', ' ', 'fax', $langs->trans("Fax"));
|
||||
$outdone++;
|
||||
$outphonedone++;
|
||||
}
|
||||
|
||||
if ($out) {
|
||||
|
|
|
|||
|
|
@ -9942,13 +9942,13 @@ class Form
|
|||
$addgendertxt = ' ';
|
||||
switch ($object->gender) {
|
||||
case 'man':
|
||||
$addgendertxt .= '<i class="fas fa-mars"></i>';
|
||||
$addgendertxt .= '<i class="fas fa-mars valignmiddle"></i>';
|
||||
break;
|
||||
case 'woman':
|
||||
$addgendertxt .= '<i class="fas fa-venus"></i>';
|
||||
$addgendertxt .= '<i class="fas fa-venus valignmiddle"></i>';
|
||||
break;
|
||||
case 'other':
|
||||
$addgendertxt .= '<i class="fas fa-transgender"></i>';
|
||||
$addgendertxt .= '<i class="fas fa-transgender valignmiddle"></i>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -10087,7 +10087,7 @@ class Form
|
|||
$ret .= dol_htmlentities($fullname) . $addgendertxt . ((!empty($object->societe) && $object->societe != $fullname) ? ' (' . dol_htmlentities($object->societe) . ')' : '');
|
||||
}
|
||||
} elseif (in_array($object->element, array('contact', 'user'))) {
|
||||
$ret .= dol_htmlentities($object->getFullName($langs)) . $addgendertxt;
|
||||
$ret .= '<span class="valignmiddle">'.dol_htmlentities($object->getFullName($langs)).'</span>'.$addgendertxt;
|
||||
} elseif ($object->element == 'usergroup') {
|
||||
$ret .= dol_htmlentities($object->name);
|
||||
} elseif (in_array($object->element, array('action', 'agenda'))) {
|
||||
|
|
@ -10106,7 +10106,7 @@ class Form
|
|||
$ret .= ' ';
|
||||
}
|
||||
|
||||
$ret .= $morehtmlref;
|
||||
$ret .= '<!-- morehtmlref -->'.$morehtmlref;
|
||||
}
|
||||
|
||||
$ret .= '</div>';
|
||||
|
|
|
|||
|
|
@ -1442,7 +1442,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
// Check if user has rights
|
||||
if (!getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
$object->loadRights();
|
||||
if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) {
|
||||
if (empty($object->nb_rights) && $object->status != 0 && empty($object->admin)) {
|
||||
setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
|
@ -1534,12 +1534,12 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
if ($action != 'edit') {
|
||||
print dol_get_fiche_head($head, 'user', $title, -1, 'user');
|
||||
|
||||
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'&output=file&file='.urlencode(dol_sanitizeFileName($object->getFullName($langs).'.vcf')).'" class="refid" rel="noopener" rel="noopener">';
|
||||
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'&output=file&file='.urlencode(dol_sanitizeFileName($object->getFullName($langs).'.vcf')).'" class="refid valignmiddle" rel="noopener">';
|
||||
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard").' ('.$langs->trans("AddToContacts").')', 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
|
||||
$morehtmlref .= '</a>';
|
||||
|
||||
$urltovirtualcard = '/user/virtualcard.php?id='.((int) $object->id);
|
||||
$morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'nohover');
|
||||
$morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'valignmiddle nohover');
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, $user->hasRight("user", "user", "read") || $user->admin, 'rowid', 'ref', $morehtmlref);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue