]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/bookmarklistitem.php
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / plugins / Bookmark / bookmarklistitem.php
index e4621114108980da7b34621ad9e53632fb2ec4f4..d099c75ecd8843072890f9a7bbaff823b3013449 100644 (file)
@@ -47,13 +47,21 @@ if (!defined('STATUSNET')) {
 
 class BookmarkListItem extends NoticeListItemAdapter
 {
-    function showContent()
+    function showNotice()
     {
-        $this->out->elementStart('p', array('class' => 'entry-content'));
+        $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();
@@ -74,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();
@@ -108,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');
@@ -126,6 +130,6 @@ class BookmarkListItem extends NoticeListItemAdapter
                           $nb->description);
         }
 
-        $this->out->elementEnd('p');
+        $out->elementEnd('p');
     }
 }