From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 15DEC1F744 for ; Thu, 30 Jun 2016 09:21:48 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 06/13] view: tweak thread/index header slightly Date: Thu, 30 Jun 2016 09:21:36 +0000 Message-Id: <20160630092143.31651-7-e@80x24.org> In-Reply-To: <20160630092143.31651-1-e@80x24.org> References: <20160630092143.31651-1-e@80x24.org> List-Id: 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(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 0b47c89..9393d44 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 { -- EW