From d4560fca4d1dddafd21a78c793679a1b19cd4db4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Jun 2016 02:35:19 +0000 Subject: view: tweak thread/index header slightly 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. --- lib/PublicInbox/View.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox') 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{ (permalink / }; + $rv .= qq{raw)\n}; $rv .= ' '.join('; +', @tocc) . "\n" if @tocc; + if (!$mapping && $irt) { + $rv .= qq(In-Reply-To: <$irt>\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 .= ".\t\t\t"; - $rv .= "($s_s, $s_c / "; - my $upfx = $ctx->{-upfx}; - $rv .= qq{permalink / }; - $rv .= qq{raw)\n}; + $rv .= "_ $s_s, $s_c\n"; } sub walk_thread { -- cgit v1.2.3-24-ge0c7