]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better layout for single-bookmark page
authorEvan Prodromou <evan@status.net>
Mon, 27 Dec 2010 20:08:55 +0000 (12:08 -0800)
committerEvan Prodromou <evan@status.net>
Mon, 27 Dec 2010 20:08:55 +0000 (12:08 -0800)
plugins/Bookmark/BookmarkPlugin.php
plugins/Bookmark/showbookmark.php

index 8fa73abc619e76aec6f890045ee701948c860877..64e7bf8bb11e96d4c111144c16aca358ce827d96 100644 (file)
@@ -224,11 +224,16 @@ class BookmarkPlugin extends Plugin
 
             $att = $atts[0];
 
-            $out->elementStart('h3');
-            $out->element('a',
-                          array('href' => $att->url),
-                          $nb->title);
-            $out->elementEnd('h3');
+            // XXX: only show the bookmark URL for non-single-page stuff
+
+            if ($out instanceof ShowbookmarkAction) {
+            } else {
+                $out->elementStart('h3');
+                $out->element('a',
+                              array('href' => $att->url),
+                              $nb->title);
+                $out->elementEnd('h3');
+            }
 
             $out->elementStart('ul', array('class' => 'bookmark_tags'));
             
@@ -267,7 +272,10 @@ class BookmarkPlugin extends Plugin
                           array('class' => 'bookmark_description'),
                           $nb->description);
 
-            $nli->showNoticeAttachments();
+            if (common_config('attachments', 'show_thumbs')) {
+                $al = new InlineAttachmentList($notice, $out);
+                $al->show();
+            }
 
             $out->elementStart('p', array('style' => 'float: left'));
 
index a547de09f011dbb0931dc4e4db713be3b51738f3..07dec5a98cd99bfd2e1927906b2c2bbee4788147 100644 (file)
@@ -113,4 +113,20 @@ class ShowbookmarkAction extends ShownoticeAction
 
         return true;
     }
+
+    function title()
+    {
+        return sprintf(_('%s\'s bookmark for "%s"'),
+                       $this->user->nickname,
+                       $this->bookmark->title);
+    }
+
+    function showPageTitle()
+    {
+        $this->elementStart('h1');
+        $this->element('a',
+                       array('href' => $this->bookmark->url),
+                       $this->bookmark->title);
+        $this->elementEnd('h1');
+    }
 }