]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/messagelistitem.php
Merge request from chimo adding getvaliddaemons to stopdaemons.php
[quix0rs-gnu-social.git] / lib / messagelistitem.php
index ba8cf834afd5cde02a694e422f811233e885ae69..c9f4c6042b92cb571d733ff661b8a3a4d3523a51 100644 (file)
@@ -67,34 +67,25 @@ abstract class MessageListItem extends Widget
      */
     function show()
     {
-        $this->out->elementStart('li', array('class' => 'hentry notice',
+        $this->out->elementStart('li', array('class' => 'h-entry notice',
                                              'id' => 'message-' . $this->message->id));
 
         $profile = $this->getMessageProfile();
 
-        $this->out->elementStart('div', 'entry-title');
-        $this->out->elementStart('span', 'vcard author');
         $this->out->elementStart('a', array('href' => $profile->profileurl,
-                                            'class' => 'url'));
-        $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
-        $this->out->element('img', array('src' => ($avatar) ?
-                                         $avatar->displayUrl() :
-                                         Avatar::defaultImage(AVATAR_STREAM_SIZE),
-                                         'class' => 'photo avatar',
+                                            'class' => 'p-author'));
+        $avatarUrl = $profile->avatarUrl(AVATAR_STREAM_SIZE);
+        $this->out->element('img', array('src' => $avatarUrl,
+                                         'class' => 'avatar u-photo',
                                          'width' => AVATAR_STREAM_SIZE,
                                          'height' => AVATAR_STREAM_SIZE,
-                                         'alt' =>
-                                         ($profile->fullname) ? $profile->fullname :
-                                         $profile->nickname));
-        $this->out->element('span', array('class' => 'nickname fn'),
-                            $profile->nickname);
+                                         'alt' => $profile->getBestName()));
+        $this->out->element('span', array('class' => 'nickname fn'), $profile->getNickname());
         $this->out->elementEnd('a');
-        $this->out->elementEnd('span');
 
         // FIXME: URL, image, video, audio
-        $this->out->elementStart('p', array('class' => 'entry-content'));
+        $this->out->elementStart('div', array('class' => 'e-content'));
         $this->out->raw($this->message->rendered);
-        $this->out->elementEnd('p');
         $this->out->elementEnd('div');
 
         $messageurl = common_local_url('showmessage',
@@ -106,13 +97,15 @@ abstract class MessageListItem extends Widget
             $messageurl = $this->message->uri;
         }
 
-        $this->out->elementStart('div', 'entry-content');
+        $this->out->elementStart('div', 'entry-metadata');
         $this->out->elementStart('a', array('rel' => 'bookmark',
                                             'class' => 'timestamp',
                                             'href' => $messageurl));
         $dt = common_date_iso8601($this->message->created);
-        $this->out->element('abbr', array('class' => 'published',
-                                          'title' => $dt),
+        $this->out->element('time', array('class' => 'dt-published',
+                                          'datetime' => common_date_iso8601($this->message->created),
+                                          // TRANS: Timestamp title (tooltip text) for NoticeListItem
+                                          'title' => common_exact_date($this->message->created)),
                             common_date_string($this->message->created));
         $this->out->elementEnd('a');
 
@@ -175,7 +168,7 @@ abstract class MessageListItem extends Widget
             $this->out->element('span', 'device', $source_name);
             break;
         default:
-            $ns = Notice_source::staticGet($source);
+            $ns = Notice_source::getKV($source);
             if ($ns) {
                 $this->out->elementStart('span', 'device');
                 $this->out->element('a', array('href' => $ns->url,