diff options
Diffstat (limited to 'lib/profilelist.php')
-rw-r--r-- | lib/profilelist.php | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php index 499d74f7b..c2040fbc2 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -34,8 +34,6 @@ if (!defined('LACONICA')) { require_once INSTALLDIR.'/lib/widget.php'; -define('PROFILES_PER_PAGE', 20); - /** * Widget to show a list of profiles * @@ -97,7 +95,7 @@ class ProfileList extends Widget $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE); $this->out->elementStart('a', array('href' => $this->profile->profileurl, 'class' => 'url')); - $this->out->element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE), + $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE), 'class' => 'photo avatar', 'width' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE, @@ -123,7 +121,7 @@ class ProfileList extends Widget if ($this->profile->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->profile->location)); $this->out->elementEnd('dd'); $this->out->elementEnd('dl'); @@ -191,9 +189,14 @@ class ProfileList extends Widget $this->out->elementEnd('div'); + $this->out->elementStart('div', 'entity_actions'); + + $this->out->elementStart('ul'); + if ($user && $user->id != $this->profile->id) { # XXX: special-case for user looking at own # subscriptions page + $this->out->elementStart('li', 'entity_subscribe'); if ($user->isSubscribed($this->profile)) { $usf = new UnsubscribeForm($this->out, $this->profile); $usf->show(); @@ -201,8 +204,18 @@ class ProfileList extends Widget $sf = new SubscribeForm($this->out, $this->profile); $sf->show(); } + $this->out->elementEnd('li'); + $this->out->elementStart('li', 'entity_block'); + if ($user && $user->id == $this->owner->id) { + $this->showBlockForm(); + } + $this->out->elementEnd('li'); } + $this->out->elementEnd('ul'); + + $this->out->elementEnd('div'); + $this->out->elementEnd('li'); } @@ -217,4 +230,8 @@ class ProfileList extends Widget { return htmlspecialchars($text); } + + function showBlockForm() + { + } } |