From 45363cbf4cfa62230b45f2c8d14f08083d3cef81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Jan 2016 16:10:20 +0100 Subject: [PATCH] Save space on user card so groups are more visible --- htdocs/user/card.php | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 374aaf51fbb..eb0cae48a24 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1408,16 +1408,6 @@ else print ''.$object->accountancy_code.''; } - // Color user - if (! empty($conf->agenda->enabled)) - { - print ''.$langs->trans("ColorUser").''; - print ''; - print $formother->showColor($object->color, ''); - print ''; - print "\n"; - } - print ''; print ''; @@ -1426,21 +1416,16 @@ else print '
'; print ''; - print ''; - print ''; - print "\n"; - - print ''; - print ''; - print "\n"; - - if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) + // Color user + if (! empty($conf->agenda->enabled)) { - print ''; - print ''; + print ''; + print ''; print "\n"; } - + // Company / Contact if (! empty($conf->societe->enabled)) { @@ -1509,7 +1494,22 @@ else } } - // Other attributes + if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) + { + print ''; + print ''; + print "\n"; + } + + print ''; + print ''; + print "\n"; + + print ''; + print ''; + print "\n"; + + // Other attributes $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)) @@ -1602,12 +1602,11 @@ else } print "\n"; - print "
\n"; /* - * Liste des groupes dans lequel est l'utilisateur + * List of groups of user */ if ($canreadgroup) @@ -1636,9 +1635,17 @@ else print ''."\n"; print ''; print ''; - print '
'.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
'.$langs->trans("PreviousConnexion").''.dol_print_date($object->datepreviouslogin,"dayhour").'
'.$langs->trans("OpenIDURL").''.$object->openid.'
'.$langs->trans("ColorUser").''; + print $formother->showColor($object->color, ''); + print '
'.$langs->trans("OpenIDURL").''.$object->openid.'
'.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
'.$langs->trans("PreviousConnexion").''.dol_print_date($object->datepreviouslogin,"dayhour").'
'."\n"; - print ''."\n"; - print ''."\n"; /* * Groups assigned to user */ - print '
'.$langs->trans("GroupsToAdd").''; + } + + print ''."\n"; + print ''."\n"; + if(! empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + { + print ''; + } + print ''."\n"; - print '
'.$langs->trans("Groups").''.$langs->trans("Entity").''; + if ($caneditgroup) + { print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity); print '   '; // Multicompany @@ -1659,24 +1666,12 @@ else print ''; } print ''; - print '
'."\n"; - - print '
'; } + print '
'; - print ''; - print ''; - if(! empty($conf->multicompany->enabled) && !empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) - { - print ''; - } - print "\n"; - if (! empty($groupslist)) { $var=true; @@ -1733,6 +1728,11 @@ else } print "
'.$langs->trans("Groups").''.$langs->trans("Entity").' 
"; + + if ($caneditgroup) + { + print ''; + } print "
"; } }