about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-30 02:35:19 +0000
committerEric Wong <e@80x24.org>2016-06-30 07:24:47 +0000
commitd4560fca4d1dddafd21a78c793679a1b19cd4db4 (patch)
treea12aad3ec31665334c756a0f55a112721139bcd4 /lib/PublicInbox
parent5bc94392bd67d8e2a919e357d569751b9295475a (diff)
downloadpublic-inbox-d4560fca4d1dddafd21a78c793679a1b19cd4db4.tar.gz
This makes the top permalink/raw as well as the In-Reply-To
show up without search.  While we're at it, try to make
the links on the thread index from the "X siblings, Y replies"
more obvious.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/View.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 0b47c899..9393d443 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -119,8 +119,15 @@ sub index_entry {
                 my $dst = _hdr_names($hdr, $f);
                 push @tocc, "$f: $dst" if $dst ne '';
         }
-        $rv .= "From: "._hdr_names($hdr, 'From').' @ '._msg_date($hdr)." UTC\n";
+        my $mapping = $ctx->{mapping};
+        $rv .= "From: "._hdr_names($hdr, 'From').' @ '._msg_date($hdr)." UTC";
+        my $upfx = $ctx->{-upfx};
+        $rv .= qq{ (<a\nhref="$upfx$mid_raw/">permalink</a> / };
+        $rv .= qq{<a\nhref="$upfx$mid_raw/raw">raw</a>)\n};
         $rv .= '  '.join('; +', @tocc) . "\n" if @tocc;
+        if (!$mapping && $irt) {
+                $rv .= qq(In-Reply-To: &lt;<a\nhref="$upfx$irt/">$irt</a>&gt;\n)
+        }
         $rv .= "\n";
 
         # scan through all parts, looking for displayable text
@@ -173,11 +180,7 @@ sub _th_index_lite {
         if (my $next = $node->next) {
                 $rv .= $pad .  $mapping->{$next->messageid}->[1];
         }
-        $rv .= "<a\nhref=#e$id\nid=m$id>.<a>\t\t\t";
-        $rv .= "(<a\nhref=#r$id\n>$s_s, $s_c</a> / ";
-        my $upfx = $ctx->{-upfx};
-        $rv .= qq{<a\nhref="$upfx$mid_raw/">permalink</a> / };
-        $rv .= qq{<a\nhref="$upfx$mid_raw/raw">raw</a>)\n};
+        $rv .= "<a\nhref=#e$id\nid=m$id>_<a> <a\nhref=#r$id\n>$s_s, $s_c</a>\n";
 }
 
 sub walk_thread {