Sometimes, it can be desirable to jump directly to the "nested"
view when viewing a thread skeleton.  This makes it possible.
While we're at it, shorten some of the text to ensure it still
fits in 80 columns.
---
 lib/PublicInbox/View.pm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 0de53cb..65d7d01 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -576,26 +576,27 @@ sub thread_skel {
        my $mid = mid_clean($hdr->header_raw('Message-ID'));
        my $sres = $srch->get_thread($mid);
        my $nr = $sres->{total};
-       my $expand = qq(<a\nhref="${tpfx}T/#u">expand</a> ) .
-                       qq(/ <a\nhref="${tpfx}t.mbox.gz">mbox.gz</a> ) .
-                       qq(/ <a\nhref="${tpfx}t.atom">Atom feed</a>);
+       my $expand = qq(expand[<a\nhref="${tpfx}T/#u">flat</a>) .
+                       qq(|<a\nhref="${tpfx}t/#u">nested</a>]  ) .
+                       qq(<a\nhref="${tpfx}t.mbox.gz">mbox.gz</a>  ) .
+                       qq(<a\nhref="${tpfx}t.atom">Atom feed</a>);
 
        my $parent = in_reply_to($hdr);
        $$dst .= "\n<b>Thread overview: </b>";
        if ($nr <= 1) {
                if (defined $parent) {
-                       $$dst .= "($expand)\n ";
+                       $$dst .= "$expand\n ";
                        $$dst .= ghost_parent("$tpfx../", $parent) . "\n";
                } else {
-                       $$dst .= "[no followups, yet] ($expand)\n";
+                       $$dst .= "[no followups] $expand\n";
                }
                $ctx->{next_msg} = undef;
                $ctx->{parent_msg} = $parent;
                return;
        }
 
-       $$dst .= "$nr+ messages in thread ($expand";
-       $$dst .= qq! / <a\nhref="#b">[top]</a>)\n!;
+       $$dst .= "$nr+ messages / $expand";
+       $$dst .= qq!  <a\nhref="#b">top</a>\n!;
 
        my $subj = $hdr->header('Subject');
        defined $subj or $subj = '';
-- 
EW

--
unsubscribe: meta+unsubscr...@public-inbox.org
archive: https://public-inbox.org/meta/

Reply via email to