]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add direct link to parent notice
authorStephen Paul Weber <singpolyma@singpolyma.net>
Mon, 19 Oct 2015 18:40:40 +0000 (18:40 +0000)
committerStephen Paul Weber <singpolyma@singpolyma.net>
Mon, 19 Oct 2015 18:40:40 +0000 (18:40 +0000)
This is partly for usability, and partly to make Linkbacks for replies
work (when the plugin is enabled).

lib/noticelistitem.php
theme/base/css/display.css

index dc171409f41e8042040c38a174a242d3c0c9f3cd..f38c7eb0ba8955585b7dfe677d8ecd7223df1d4a 100644 (file)
@@ -150,7 +150,13 @@ class NoticeListItem extends Widget
         $this->elementStart('section', array('class'=>'notice-headers'));
         $this->showNoticeTitle();
         $this->showAuthor();
-        if ($this->addressees) { $this->showAddressees(); }
+
+        if (!empty($this->notice->reply_to) || $this->addressees) {
+            $this->elementStart('div', array('class' => 'parents'));
+            if (!empty($this->notice->reply_to)) { $this->showParent(); }
+            if ($this->addressees) { $this->showAddressees(); }
+            $this->elementEnd('div');
+        }
         $this->elementEnd('section');
     }
 
@@ -247,6 +253,19 @@ class NoticeListItem extends Widget
         }
     }
 
+    function showParent()
+    {
+        $this->out->element(
+            'a',
+            array(
+                'href' => $this->notice->getParent()->getUrl(),
+                'class' => 'u-in-reply-to',
+                'rel' => 'in-reply-to'
+            ),
+            'in reply to'
+        );
+    }
+
     function showAddressees()
     {
         $pa = $this->getProfileAddressees();
index 20f9aa775fe16613735e3d360d29009fcdbc72cb..0d3515ba3321885a0eccb99ef871f6b78cbffe7c 100644 (file)
@@ -648,12 +648,12 @@ address .poweredby {
     width:100%;
 }
 
-.notice .p-author {
-    margin-right: 8px;
+.notice .parents {
+    display: inline;
 }
 
-.notice .addressees::before {
-    content: '\25B8';
+.notice .parents::before {
+    content: '\25B8  ';
 }
 .notice .addressees, .notice .addressees li {
     display: inline;