show subscribe button and block form again
This commit is contained in:
parent
3070a9597c
commit
14afe2d268
|
@ -109,7 +109,7 @@ class ProfileList extends Widget
|
||||||
$this->out->elementEnd('span');
|
$this->out->elementEnd('span');
|
||||||
$this->out->elementEnd('a');
|
$this->out->elementEnd('a');
|
||||||
|
|
||||||
if ($this->profile->fullname !== '') {
|
if (!empty($this->profile->fullname)) {
|
||||||
$this->out->elementStart('dl', 'entity_fn');
|
$this->out->elementStart('dl', 'entity_fn');
|
||||||
$this->out->element('dt', null, 'Full name');
|
$this->out->element('dt', null, 'Full name');
|
||||||
$this->out->elementStart('dd');
|
$this->out->elementStart('dd');
|
||||||
|
@ -119,7 +119,7 @@ class ProfileList extends Widget
|
||||||
$this->out->elementEnd('dd');
|
$this->out->elementEnd('dd');
|
||||||
$this->out->elementEnd('dl');
|
$this->out->elementEnd('dl');
|
||||||
}
|
}
|
||||||
if ($this->profile->location !== '') {
|
if (!empty($this->profile->location)) {
|
||||||
$this->out->elementStart('dl', 'entity_location');
|
$this->out->elementStart('dl', 'entity_location');
|
||||||
$this->out->element('dt', null, _('Location'));
|
$this->out->element('dt', null, _('Location'));
|
||||||
$this->out->elementStart('dd', 'label');
|
$this->out->elementStart('dd', 'label');
|
||||||
|
@ -127,7 +127,7 @@ class ProfileList extends Widget
|
||||||
$this->out->elementEnd('dd');
|
$this->out->elementEnd('dd');
|
||||||
$this->out->elementEnd('dl');
|
$this->out->elementEnd('dl');
|
||||||
}
|
}
|
||||||
if ($this->profile->homepage !== '') {
|
if (!empty($this->profile->homepage)) {
|
||||||
$this->out->elementStart('dl', 'entity_url');
|
$this->out->elementStart('dl', 'entity_url');
|
||||||
$this->out->element('dt', null, _('URL'));
|
$this->out->element('dt', null, _('URL'));
|
||||||
$this->out->elementStart('dd');
|
$this->out->elementStart('dd');
|
||||||
|
@ -138,7 +138,7 @@ class ProfileList extends Widget
|
||||||
$this->out->elementEnd('dd');
|
$this->out->elementEnd('dd');
|
||||||
$this->out->elementEnd('dl');
|
$this->out->elementEnd('dl');
|
||||||
}
|
}
|
||||||
if ($this->profile->bio !== '') {
|
if (!empty($this->profile->bio)) {
|
||||||
$this->out->elementStart('dl', 'entity_note');
|
$this->out->elementStart('dl', 'entity_note');
|
||||||
$this->out->element('dt', null, _('Note'));
|
$this->out->element('dt', null, _('Note'));
|
||||||
$this->out->elementStart('dd', 'note');
|
$this->out->elementStart('dd', 'note');
|
||||||
|
@ -194,11 +194,12 @@ class ProfileList extends Widget
|
||||||
|
|
||||||
$this->out->elementStart('ul');
|
$this->out->elementStart('ul');
|
||||||
|
|
||||||
if (!$is_own) {
|
// Is this a logged-in user, looking at someone else's
|
||||||
# XXX: special-case for user looking at own
|
// profile?
|
||||||
# subscriptions page
|
|
||||||
|
if (!empty($user) && $this->profile->id != $user->id) {
|
||||||
$this->out->elementStart('li', 'entity_subscribe');
|
$this->out->elementStart('li', 'entity_subscribe');
|
||||||
if (!is_null($user) && $user->isSubscribed($this->profile)) {
|
if ($user->isSubscribed($this->profile)) {
|
||||||
$usf = new UnsubscribeForm($this->out, $this->profile);
|
$usf = new UnsubscribeForm($this->out, $this->profile);
|
||||||
$usf->show();
|
$usf->show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -207,6 +208,9 @@ class ProfileList extends Widget
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
$this->out->elementStart('li', 'entity_block');
|
$this->out->elementStart('li', 'entity_block');
|
||||||
|
if ($user->id == $this->owner->id) {
|
||||||
|
$this->showBlockForm();
|
||||||
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user