Allow profileblock subclasses to show different sized avatars
This commit is contained in:
parent
f242cf0e58
commit
fbc11b72d7
@ -61,11 +61,13 @@ abstract class ProfileBlock extends Widget
|
|||||||
{
|
{
|
||||||
$this->out->elementStart('div', 'profile_block');
|
$this->out->elementStart('div', 'profile_block');
|
||||||
|
|
||||||
|
$size = $this->avatarSize();
|
||||||
|
|
||||||
$this->out->element('img', array('src' => $this->avatar(),
|
$this->out->element('img', array('src' => $this->avatar(),
|
||||||
'class' => 'profile_block_avatar',
|
'class' => 'profile_block_avatar',
|
||||||
'alt' => $this->name(),
|
'alt' => $this->name(),
|
||||||
'width' => AVATAR_PROFILE_SIZE,
|
'width' => $size,
|
||||||
'height' => AVATAR_PROFILE_SIZE));
|
'height' => $size));
|
||||||
|
|
||||||
if ($this->canEdit()) {
|
if ($this->canEdit()) {
|
||||||
$this->out->element('a', array('href' => $this->editUrl()),
|
$this->out->element('a', array('href' => $this->editUrl()),
|
||||||
@ -106,4 +108,10 @@ abstract class ProfileBlock extends Widget
|
|||||||
|
|
||||||
$this->out->elementEnd('div');
|
$this->out->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function avatarSize()
|
||||||
|
{
|
||||||
|
return AVATAR_PROFILE_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user