]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
Merge branch 'thread-view-skel'
[public-inbox.git] / lib / PublicInbox / View.pm
index 44130b904d94c32fc3356268f6265e39f1ee02c5..db2bd20f3a8e9b8920bb6042ffbeb4c51a97d122 100644 (file)
@@ -49,7 +49,8 @@ sub msg_html {
 # /$INBOX/$MESSAGE_ID/#R
 sub msg_reply {
        my ($ctx, $hdr) = @_;
-       my $se_url = 'https://git-htmldocs.bogomips.org/git-send-email.html';
+       my $se_url =
+        'https://kernel.org/pub/software/scm/git/docs/git-send-email.html';
 
        my ($arg, $link) = mailto_arg_link($hdr);
        push @$arg, '/path/to/YOUR_REPLY';
@@ -154,8 +155,9 @@ sub index_entry {
                } else {
                        $threaded = "<b>$threaded</b>";
                }
-               $rv .= " [<a\nhref=\"${mhref}t/#u\">$threaded</a>";
-               $rv .= "|<a\nhref=\"${mhref}T/#u\">$flat</a>]";
+               $rv .= " / [<a\nhref=\"${mhref}T/#u\">$flat</a>";
+               $rv .= "|<a\nhref=\"${mhref}t/#u\">$threaded</a>]";
+               $rv .= " / <a\nhref=#r$id>$ctx->{s_nr}</a>";
        }
 
        $rv .= $more ? "\n\n" : "\n";
@@ -225,7 +227,8 @@ sub _th_index_lite {
                        $rv .= $pad . $mapping->{$nn->messageid}->[1];
                }
        }
-       $rv .= "<a\nhref=#e$id\nid=m$id>_</a> <a\nhref=#r$id>$s_s, $s_c</a>\n";
+       $rv .= "<a\nhref=#e$id\nid=m$id>_</a> ";
+       $rv .= "<a\nhref=#r$id>$s_s, $s_c; $ctx->{s_nr}</a>\n";
 }
 
 sub walk_thread {
@@ -318,6 +321,7 @@ sub thread_html {
        $ctx->{root_anchor} = anchor_for($mid);
        $ctx->{seen} = {};
        $ctx->{mapping} = {};
+       $ctx->{s_nr} = "$nr+ messages in thread";
 
        my $th = thread_results($msgs);
        walk_thread($th, $ctx, *pre_thread);
@@ -498,7 +502,7 @@ 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> ) .
+       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>);
 
@@ -869,7 +873,7 @@ sub emit_topics {
                }
 
                $subj = PublicInbox::Hval->new($subj)->as_html;
-               $cur->[1] .= "<a\nhref=\"$mid/t/#u\"><b>$subj</b></a>\n";
+               $cur->[1] .= "<a\nhref=\"$mid/T/#u\"><b>$subj</b></a>\n";
                $ts = fmt_ts($ts);
                my $attr = " $ts UTC";