NEW Use the gender of member for picto in member lists.
This commit is contained in:
parent
fd04729727
commit
7297514afb
@ -2132,7 +2132,11 @@ class Adherent extends CommonObject
|
||||
// Only picto
|
||||
if ($withpictoimg > 0) $picto='<span class="nopadding'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).'</span>';
|
||||
// Picto must be a photo
|
||||
else $picto='<span class="nopadding'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1).'</span>';
|
||||
else {
|
||||
$picto='<span class="nopadding'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>';
|
||||
$picto.=Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.($withpictoimg==-3?'small':''), 'mini', 0, 1);
|
||||
$picto.='</span>';
|
||||
}
|
||||
$result.=$picto;
|
||||
}
|
||||
if ($withpictoimg > -2 && $withpictoimg != 2)
|
||||
|
||||
@ -681,6 +681,7 @@ while ($i < min($num, $limit))
|
||||
$memberstatic->datefin= $datefin;
|
||||
$memberstatic->socid = $obj->fk_soc;
|
||||
$memberstatic->photo = $obj->photo;
|
||||
$memberstatic->morphy = $obj->morphy;
|
||||
|
||||
if (! empty($obj->fk_soc)) {
|
||||
$memberstatic->fetch_thirdparty();
|
||||
|
||||
@ -7376,11 +7376,16 @@ class Form
|
||||
else
|
||||
{
|
||||
$nophoto='/public/theme/common/nophoto.png';
|
||||
if (in_array($modulepart, array('userphoto','contact'))) // For module that are "physical" users
|
||||
if (in_array($modulepart, array('userphoto','contact','memberphoto'))) // For module that are "physical" users
|
||||
{
|
||||
$nophoto='/public/theme/common/user_anonymous.png';
|
||||
if ($object->gender == 'man') $nophoto='/public/theme/common/user_man.png';
|
||||
if ($object->gender == 'woman') $nophoto='/public/theme/common/user_woman.png';
|
||||
if ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) {
|
||||
$nophoto='/public/theme/common/company.png';
|
||||
}
|
||||
else {
|
||||
$nophoto='/public/theme/common/user_anonymous.png';
|
||||
if ($object->gender == 'man') $nophoto='/public/theme/common/user_man.png';
|
||||
if ($object->gender == 'woman') $nophoto='/public/theme/common/user_woman.png';
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($conf->gravatar->enabled) && $email)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user