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
|
// 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>';
|
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
|
// 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;
|
$result.=$picto;
|
||||||
}
|
}
|
||||||
if ($withpictoimg > -2 && $withpictoimg != 2)
|
if ($withpictoimg > -2 && $withpictoimg != 2)
|
||||||
|
|||||||
@ -681,6 +681,7 @@ while ($i < min($num, $limit))
|
|||||||
$memberstatic->datefin= $datefin;
|
$memberstatic->datefin= $datefin;
|
||||||
$memberstatic->socid = $obj->fk_soc;
|
$memberstatic->socid = $obj->fk_soc;
|
||||||
$memberstatic->photo = $obj->photo;
|
$memberstatic->photo = $obj->photo;
|
||||||
|
$memberstatic->morphy = $obj->morphy;
|
||||||
|
|
||||||
if (! empty($obj->fk_soc)) {
|
if (! empty($obj->fk_soc)) {
|
||||||
$memberstatic->fetch_thirdparty();
|
$memberstatic->fetch_thirdparty();
|
||||||
|
|||||||
@ -7376,11 +7376,16 @@ class Form
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$nophoto='/public/theme/common/nophoto.png';
|
$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 ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor') !== false) {
|
||||||
if ($object->gender == 'man') $nophoto='/public/theme/common/user_man.png';
|
$nophoto='/public/theme/common/company.png';
|
||||||
if ($object->gender == 'woman') $nophoto='/public/theme/common/user_woman.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)
|
if (! empty($conf->gravatar->enabled) && $email)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user