]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilelist.php
Merge branch '0.7.x' into 0.8.x
[quix0rs-gnu-social.git] / lib / profilelist.php
index 73c129efe8021367e94453c3715b7550be1bcde2..4d924b039e9647fd329240044a9874d11a9ead59 100644 (file)
@@ -92,25 +92,24 @@ class ProfileList extends Widget
 
         $user = common_current_user();
 
-
         $this->out->elementStart('div', 'entity_profile vcard');
 
         $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),
-                                    'class' => 'photo avatar',
-                                    'width' => AVATAR_STREAM_SIZE,
-                                    'height' => AVATAR_STREAM_SIZE,
-                                    'alt' =>
-                                    ($this->profile->fullname) ? $this->profile->fullname :
-                                    $this->profile->nickname));
+        $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,
+                                         'alt' =>
+                                         ($this->profile->fullname) ? $this->profile->fullname :
+                                         $this->profile->nickname));
         $hasFN = ($this->profile->fullname) ? 'nickname' : 'fn nickname';
         $this->out->elementStart('span', $hasFN);
         $this->out->raw($this->highlight($this->profile->nickname));
         $this->out->elementEnd('span');
         $this->out->elementEnd('a');
-        
+
         if ($this->profile->fullname) {
             $this->out->elementStart('dl', 'entity_fn');
             $this->out->element('dt', null, 'Full name');
@@ -159,8 +158,8 @@ class ProfileList extends Widget
             $this->out->elementStart('dt');
             if ($user->id == $this->owner->id) {
                 $this->out->element('a', array('href' => common_local_url('tagother',
-                                                                     array('id' => $this->profile->id))),
-                               _('Tags'));
+                                                                          array('id' => $this->profile->id))),
+                                    _('Tags'));
             } else {
                 $this->out->text(_('Tags'));
             }
@@ -170,12 +169,12 @@ class ProfileList extends Widget
                 $this->out->elementStart('ul', 'tags xoxo');
                 foreach ($tags as $tag) {
                     $this->out->elementStart('li');
-                    $this->element('span', 'mark_hash', '#');
+                    $this->out->element('span', 'mark_hash', '#');
                     $this->out->element('a', array('rel' => 'tag',
-                                              'href' => common_local_url($this->action,
-                                                                         array('nickname' => $this->owner->nickname,
-                                                                               'tag' => $tag))),
-                                   $tag);
+                                                   'href' => common_local_url($this->action->trimmed('action'),
+                                                                              array('nickname' => $this->owner->nickname,
+                                                                                    'tag' => $tag))),
+                                        $tag);
                     $this->out->elementEnd('li');
                 }
                 $this->out->elementEnd('ul');
@@ -192,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();
@@ -202,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');
     }
 
@@ -218,4 +232,8 @@ class ProfileList extends Widget
     {
         return htmlspecialchars($text);
     }
+
+    function showBlockForm()
+    {
+    }
 }