From ddd0848acc6b8624409dd7108675b298c2f24649 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 May 2022 01:21:33 +0200 Subject: [PATCH] Look and feel v16 --- htdocs/core/class/html.form.class.php | 5 +++-- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- htdocs/user/class/user.class.php | 1 + htdocs/user/list.php | 22 ++++++++++++++++++---- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 94ae9fb0fbc..c96db183a3f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8922,10 +8922,11 @@ class Form $addgendertxt .= ''; break; case 'other': - $addgendertxt .= ''; + $addgendertxt .= ''; break; } } + /* $addadmin = ''; if (property_exists($object, 'admin')) { @@ -9067,7 +9068,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', 'usergroup'))) { - $ret .= dol_htmlentities($object->getFullName($langs)); + $ret .= dol_htmlentities($object->getFullName($langs)).$addgendertxt; } elseif (in_array($object->element, array('action', 'agenda'))) { $ret .= $object->ref.'
'.$object->label; } elseif (in_array($object->element, array('adherent_type'))) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 76e7a74450d..d01e3b8d55d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -901,7 +901,7 @@ div.urllink, div.urllink a { color: #339 !important; } -i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { +i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before, i.fa-transgender::before { color: #888 !important; opacity: 0.4; padding-: 3px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 879bd52e864..fe54b2365b5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1050,7 +1050,7 @@ div.urllink, div.urllink a { .fa-info-circle { padding-: 3px; } -i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before { +i.fa-mars::before, i.fa-venus::before, i.fa-genderless::before, i.fa-transgender::before { color: #888 !important; opacity: 0.4; padding-: 3px; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b0630f0394e..9f25d49bd50 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -80,6 +80,7 @@ class User extends CommonObject * @var string gender */ public $gender; + public $birth; /** diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 422d36d791f..2ec8ac37b87 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -661,7 +661,7 @@ if (!empty($arrayfields['u.firstname']['checked'])) { print ''; } if (!empty($arrayfields['u.gender']['checked'])) { - print ''; + print ''; $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); print $form->selectarray('search_gender', $arraygender, $search_gender, 1); print ''; @@ -748,7 +748,7 @@ if (!empty($arrayfields['u.firstname']['checked'])) { print_liste_field_titre("FirstName", $_SERVER['PHP_SELF'], "u.firstname", $param, "", "", $sortfield, $sortorder); } if (!empty($arrayfields['u.gender']['checked'])) { - print_liste_field_titre("Gender", $_SERVER['PHP_SELF'], "u.gender", $param, "", "", $sortfield, $sortorder); + print_liste_field_titre("Gender", $_SERVER['PHP_SELF'], "u.gender", $param, "", "", $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['u.employee']['checked'])) { print_liste_field_titre("Employee", $_SERVER['PHP_SELF'], "u.employee", $param, "", "", $sortfield, $sortorder, 'center '); @@ -891,9 +891,23 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } } if (!empty($arrayfields['u.gender']['checked'])) { - print ''; + print ''; if ($obj->gender) { - print $langs->trans("Gender".$obj->gender); + // Preparing gender's display if there is one + $addgendertxt = ''; + switch ($obj->gender) { + case 'man': + $addgendertxt .= 'gender)).'">'; + break; + case 'woman': + $addgendertxt .= 'gender)).'">'; + break; + case 'other': + $addgendertxt .= 'gender)).'">'; + break; + } + print $addgendertxt; + //print $langs->trans("Gender".$obj->gender); } print ''; if (!$i) {