]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profileblock.php
Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / lib / profileblock.php
index 3e8e929821256fa7314af3a388adc263f1afc89e..19e5a386ba5b71a3cac60222811804069dc1c603 100644 (file)
@@ -50,44 +50,40 @@ abstract class ProfileBlock extends Widget
     abstract function avatar();
     abstract function name();
     abstract function url();
-    abstract function canEdit();
-    abstract function editUrl();
-    abstract function editText();
     abstract function location();
     abstract function homepage();
     abstract function description();
 
     function show()
     {
-        $this->out->elementStart('div', 'profile_block');
+        $this->out->elementStart('div', 'profile_block section');
+
+        $size = $this->avatarSize();
 
         $this->out->element('img', array('src' => $this->avatar(),
                                          'class' => 'profile_block_avatar',
                                          'alt' => $this->name(),
-                                         'width' => AVATAR_PROFILE_SIZE,
-                                         'height' => AVATAR_PROFILE_SIZE));
-
-        if ($this->canEdit()) {
-            $this->out->element('a', array('href' => $this->editUrl()),
-                                $this->editText());
-        }
+                                         'width' => $size,
+                                         'height' => $size));
 
         $name = $this->name();
 
         if (!empty($name)) {
+            $this->out->elementStart('p', 'profile_block_name');
             $url = $this->url();
             if (!empty($url)) {
                 $this->out->element('a', array('href' => $url),
                                     $name);
             } else {
-                $this->out->element('span', 'profile_block_name', $name);
+                $this->out->text($name);
             }
+            $this->out->elementEnd('p');
         }
 
         $location = $this->location();
 
         if (!empty($location)) {
-            $this->out->element('span', 'profile_block_location', $location);
+            $this->out->element('p', 'profile_block_location', $location);
         }
 
         $homepage = $this->homepage();
@@ -104,6 +100,17 @@ abstract class ProfileBlock extends Widget
                                 $description);
         }
 
+        $this->showActions();
+
         $this->out->elementEnd('div');
     }
+
+    function avatarSize()
+    {
+        return AVATAR_PROFILE_SIZE;
+    }
+
+    function showActions()
+    {
+    }
 }