add an event for subscribers minilist
This commit is contained in:
parent
ffc1ac02c3
commit
5414096c44
@ -139,25 +139,30 @@ class ProfileAction extends OwnerDesignAction
|
|||||||
$this->elementStart('div', array('id' => 'entity_subscribers',
|
$this->elementStart('div', array('id' => 'entity_subscribers',
|
||||||
'class' => 'section'));
|
'class' => 'section'));
|
||||||
|
|
||||||
$this->element('h2', null, _('Subscribers'));
|
if (Event::handle('StartShowSubscribersMiniList', array($this))) {
|
||||||
|
|
||||||
$cnt = 0;
|
$this->element('h2', null, _('Subscribers'));
|
||||||
|
|
||||||
if (!empty($profile)) {
|
$cnt = 0;
|
||||||
$pml = new ProfileMiniList($profile, $this);
|
|
||||||
$cnt = $pml->show();
|
if (!empty($profile)) {
|
||||||
if ($cnt == 0) {
|
$pml = new ProfileMiniList($profile, $this);
|
||||||
$this->element('p', null, _('(None)'));
|
$cnt = $pml->show();
|
||||||
|
if ($cnt == 0) {
|
||||||
|
$this->element('p', null, _('(None)'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($cnt > PROFILES_PER_MINILIST) {
|
if ($cnt > PROFILES_PER_MINILIST) {
|
||||||
$this->elementStart('p');
|
$this->elementStart('p');
|
||||||
$this->element('a', array('href' => common_local_url('subscribers',
|
$this->element('a', array('href' => common_local_url('subscribers',
|
||||||
array('nickname' => $this->profile->nickname)),
|
array('nickname' => $this->profile->nickname)),
|
||||||
'class' => 'more'),
|
'class' => 'more'),
|
||||||
_('All subscribers'));
|
_('All subscribers'));
|
||||||
$this->elementEnd('p');
|
$this->elementEnd('p');
|
||||||
|
}
|
||||||
|
|
||||||
|
Event::handle('EndShowSubscribersMiniList', array($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
|
Loading…
Reference in New Issue
Block a user