about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-02-03 02:50:46 +0000
committerEric Wong <e@80x24.org>2018-02-03 02:53:58 +0000
commitbb23f834ec0510d5318e59620100b0046f044f34 (patch)
treeaaf4fc16a4041799c52374db01d6569086dcdd0c
parent76afceda9d7515912c27598d1eb7fda7a9dd94d0 (diff)
downloadpublic-inbox-bb23f834ec0510d5318e59620100b0046f044f34.tar.gz
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.
-rw-r--r--lib/PublicInbox/View.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 0de53cb2..65d7d019 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 = '';