]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/bookmarklistitem.php
Merge commit 'refs/merge-requests/164' of git://gitorious.org/statusnet/mainline...
[quix0rs-gnu-social.git] / plugins / Bookmark / bookmarklistitem.php
index c4dcb7798f353ec3031c57b8518f6b90b242bd60..d099c75ecd8843072890f9a7bbaff823b3013449 100644 (file)
@@ -47,11 +47,21 @@ if (!defined('STATUSNET')) {
 
 class BookmarkListItem extends NoticeListItemAdapter
 {
+    function showNotice()
+    {
+        $this->nli->out->elementStart('div', 'entry-title');
+        $this->nli->showAuthor();
+        $this->showContent();
+        $this->nli->out->elementEnd('div');
+    }
+
     function showContent()
     {
         $notice = $this->nli->notice;
         $out    = $this->nli->out;
 
+        $out->elementStart('p', array('class' => 'entry-content'));
+
         $nb = Bookmark::getByNotice($notice);
 
         $profile = $notice->getProfile();
@@ -72,17 +82,10 @@ class BookmarkListItem extends NoticeListItemAdapter
         $out->elementStart('h3');
         $out->element('a',
                       array('href' => $att->url,
-                            'class' => 'bookmark-title entry-title'),
+                            'class' => 'bookmark-title'),
                       $nb->title);
         $out->elementEnd('h3');
 
-        $countUrl = common_local_url('noticebyurl',
-                                     array('id' => $att->id));
-
-        $out->element('a', array('class' => 'bookmark-notice-count',
-                                 'href' => $countUrl),
-                      $att->noticeCount());
-
         // Replies look like "for:" tags
 
         $replies = $notice->getReplies();
@@ -106,13 +109,16 @@ class BookmarkListItem extends NoticeListItemAdapter
             }
 
             foreach ($tags as $tag) {
-                $out->elementStart('li');
-                $out->element('a',
-                              array('rel' => 'tag',
-                                    'href' => Notice_tag::url($tag)),
-                              $tag);
-                $out->elementEnd('li');
-                $out->text(' ');
+                $tag = trim($tag);
+                if (!empty($tag)) {
+                    $out->elementStart('li');
+                    $out->element('a',
+                                  array('rel' => 'tag',
+                                        'href' => Notice_tag::url($tag)),
+                                  $tag);
+                    $out->elementEnd('li');
+                    $out->text(' ');
+                }
             }
 
             $out->elementEnd('ul');
@@ -123,5 +129,7 @@ class BookmarkListItem extends NoticeListItemAdapter
                           array('class' => 'bookmark-description'),
                           $nb->description);
         }
+
+        $out->elementEnd('p');
     }
 }