X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FView.pm;h=5f99644f8abaaebf630624c587b1b835dcd52058;hb=803914775816f7de5485fa397bad64e1bd404381;hp=5a312d84ba8d14e45cee9fac410440736aefca47;hpb=8c1a45d908f5476a1766c5c475439b15ec46df17;p=public-inbox.git diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 5a312d84..5f99644f 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -51,14 +51,22 @@ sub msg_reply { my $p_url = 'https://en.wikipedia.org/wiki/Posting_style#Interleaved_style'; + my $info = ''; + if (my $url = $ctx->{-inbox}->{infourl}) { + $url = PublicInbox::Hval::prurl($ctx->{env}, $url); + $info = qq(\n List information: $url\n); + } + my ($arg, $link) = mailto_arg_link($hdr); push @$arg, '/path/to/YOUR_REPLY'; $arg = join(" \\\n ", '', @$arg); <You may reply publically to this message via -plain-text email using any one of the following methods: +
Reply instructions:
+
+You may reply publically to this message via plain-text email
+using any one of the following methods:
 
 * Save the following mbox file, import it into your mail client,
   and reply-to-all from there: mbox
   Avoid top-posting and favor interleaved quoting:
   $p_url
-
+$info
 * Reply to all the recipients using the --to, --cc,
   and --in-reply-to switches of git-send-email(1):
 
@@ -320,10 +328,12 @@ sub thread_html {
 	return missing_thread($ctx) if $nr == 0;
 	my $skel = '
';
 	$skel .= $nr == 1 ? 'only message in thread' : 'end of thread';
-	$skel .= ", back to index";
-	$skel .= "\n$nr+ messages in thread: (download: ";
-	$skel .= "mbox.gz";
+	$skel .= ", back to index\n\n";
+	$skel .= "Thread overview: ";
+	$skel .= $nr == 1 ? '(only message)' : "$nr+ messages";
+	$skel .= " (download: mbox.gz";
 	$skel .= " / follow: Atom feed)\n";
+	$skel .= "-- links below jump to the message on this page --\n";
 	$ctx->{-upfx} = '../../';
 	$ctx->{cur_level} = 0;
 	$ctx->{dst} = \$skel;
@@ -517,6 +527,7 @@ sub thread_skel {
 			qq(/ Atom feed);
 
 	my $parent = in_reply_to($hdr);
+	$$dst .= "\nThread overview: ";
 	if ($nr <= 1) {
 		if (defined $parent) {
 			$$dst .= "($expand)\n ";
@@ -879,14 +890,16 @@ sub acc_topic {
 
 sub dump_topics {
 	my ($ctx) = @_;
-	my $order = $ctx->{order}; # [ ts, subj1, subj2, subj3, ... ]
+	my $order = delete $ctx->{order}; # [ ts, subj1, subj2, subj3, ... ]
 	if (!@$order) {
 		$ctx->{-html_tip} = '
[No topics in range]
'; return 404; } my @out; - foreach my $topic (@$order) { + + # sort by recency, this allows new posts to "bump" old topics... + foreach my $topic (sort { $b->[0] <=> $a->[0] } @$order) { my ($ts, $n, $seen, $top, @ex) = @$topic; @$topic = (); next unless defined $top; # ghost topic @@ -897,11 +910,18 @@ sub dump_topics { # $n isn't the total number of posts on the topic, # just the number of posts in the current results window - $n = $n == 1 ? '' : " ($n+ messages)"; + my $anchor; + if ($n == 1) { + $n = ''; + $anchor = '#u'; # top of only message + } else { + $n = " ($n+ messages)"; + $anchor = '#t'; # thread skeleton + } my $mbox = qq(mbox.gz); my $atom = qq(Atom); - my $s = "$top\n" . + my $s = "$top\n" . " $ts UTC $n - $mbox / $atom\n"; for (my $i = 0; $i < scalar(@ex); $i += 2) { my $level = $ex[$i];