]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilelist.php
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
[quix0rs-gnu-social.git] / lib / profilelist.php
index 499d74f7b58400552fc76314a6b8241a1c94afdf..8bef49dceeefc0885576274a86e7adc786a0dee1 100644 (file)
@@ -97,7 +97,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 +123,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 +191,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 +206,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 +232,8 @@ class ProfileList extends Widget
     {
         return htmlspecialchars($text);
     }
+
+    function showBlockForm()
+    {
+    }
 }