forked from GNUsocial/gnu-social
Add some more events to aside profile blocks and rework a bit
This commit is contained in:
@@ -56,16 +56,32 @@ abstract class ProfileBlock extends Widget
|
||||
|
||||
function show()
|
||||
{
|
||||
$this->out->elementStart('div', 'profile_block section');
|
||||
$this->showActions();
|
||||
$this->showAvatar();
|
||||
$this->showName();
|
||||
$this->showLocation();
|
||||
$this->showHomepage();
|
||||
$this->showDescription();
|
||||
}
|
||||
|
||||
function showAvatar()
|
||||
{
|
||||
$size = $this->avatarSize();
|
||||
|
||||
$this->out->element('img', array('src' => $this->avatar(),
|
||||
'class' => 'profile_block_avatar',
|
||||
'alt' => $this->name(),
|
||||
'width' => $size,
|
||||
'height' => $size));
|
||||
$this->out->element(
|
||||
'img',
|
||||
array(
|
||||
'src' => $this->avatar(),
|
||||
'class' => 'ur_face',
|
||||
'alt' => $this->name(),
|
||||
'width' => $size,
|
||||
'height' => $size
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function showName()
|
||||
{
|
||||
$name = $this->name();
|
||||
|
||||
if (!empty($name)) {
|
||||
@@ -79,30 +95,35 @@ abstract class ProfileBlock extends Widget
|
||||
}
|
||||
$this->out->elementEnd('p');
|
||||
}
|
||||
}
|
||||
|
||||
function showDescription()
|
||||
{
|
||||
$description = $this->description();
|
||||
|
||||
if (!empty($description)) {
|
||||
$this->out->element(
|
||||
'p',
|
||||
'profile_block_description',
|
||||
$description
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function showLocation()
|
||||
{
|
||||
$location = $this->location();
|
||||
|
||||
if (!empty($location)) {
|
||||
$this->out->element('p', 'profile_block_location', $location);
|
||||
}
|
||||
}
|
||||
|
||||
$homepage = $this->homepage();
|
||||
|
||||
function showHomepage()
|
||||
{
|
||||
if (!empty($homepage)) {
|
||||
$this->out->element('a', 'profile_block_homepage', $homepage);
|
||||
}
|
||||
|
||||
$description = $this->description();
|
||||
|
||||
if (!empty($description)) {
|
||||
$this->out->element('p',
|
||||
'profile_block_description',
|
||||
$description);
|
||||
}
|
||||
|
||||
$this->showActions();
|
||||
|
||||
$this->out->elementEnd('div');
|
||||
}
|
||||
|
||||
function avatarSize()
|
||||
|
Reference in New Issue
Block a user