X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgrouplist.php;h=1ded5160bdcd655e2c1b2656d7eee3d8af6c3aab;hb=6c3149334cf69a33026a75be9f5ea579b2de3b8d;hp=629bdd05df9d481e7bac94c5508675ae624f5b59;hpb=69183c445d8305ad74db72cca3ced01323973cc5;p=quix0rs-gnu-social.git diff --git a/lib/grouplist.php b/lib/grouplist.php index 629bdd05df..1ded5160bd 100644 --- a/lib/grouplist.php +++ b/lib/grouplist.php @@ -124,7 +124,7 @@ class GroupList extends Widget if ($this->group->location) { $this->out->elementStart('dl', 'entity_location'); $this->out->element('dt', null, _('Location')); - $this->out->elementStart('dd', 'location'); + $this->out->elementStart('dd', 'label'); $this->out->raw($this->highlight($this->group->location)); $this->out->elementEnd('dd'); $this->out->elementEnd('dl'); @@ -151,22 +151,28 @@ class GroupList extends Widget # If we're on a list with an owner (subscriptions or subscribers)... - if ($user && $user->id == $this->owner->id) { + if (!empty($user) && !empty($this->owner) && $user->id == $this->owner->id) { $this->showOwnerControls(); } $this->out->elementEnd('div'); if ($user) { + $this->out->elementStart('div', 'entity_actions'); + $this->out->elementStart('ul'); + $this->out->elementStart('li', 'entity_subscribe'); # XXX: special-case for user looking at own # subscriptions page if ($user->isMember($this->group)) { $lf = new LeaveForm($this->out, $this->group); $lf->show(); - } else { + } else if (!Group_block::isBlocked($this->group, $user->getProfile())) { $jf = new JoinForm($this->out, $this->group); $jf->show(); } + $this->out->elementEnd('li'); + $this->out->elementEnd('ul'); + $this->out->elementEnd('div'); } $this->out->elementEnd('li');