]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: add "infourl" for reply information
authorEric Wong <e@80x24.org>
Sat, 9 Jul 2016 23:55:44 +0000 (23:55 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Jul 2016 23:55:44 +0000 (23:55 +0000)
lib/PublicInbox/Config.pm
lib/PublicInbox/View.pm

index d7eaa3e8f1c5100279deaefc7a0a8f1973023c5d..1256fb1e7df208ca9bb17fb269ad639d99c789c6 100644 (file)
@@ -141,7 +141,7 @@ sub _fill {
        my $rv = {};
 
        foreach my $k (qw(mainrepo address filter url newsgroup
-                       watch watchheader httpbackendmax)) {
+                       infourl watch watchheader httpbackendmax)) {
                my $v = $self->{"$pfx.$k"};
                $rv->{$k} = $v if defined $v;
        }
index 3b041aab2ae64f0957724ae2e7344209c7573cf6..3d6348c71850e308b95ad61f275dbc9c37cc757b 100644 (file)
@@ -51,6 +51,12 @@ 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: <a\nhref="$url">$url</a>\n);
+       }
+
        my ($arg, $link) = mailto_arg_link($hdr);
        push @$arg, '/path/to/YOUR_REPLY';
        $arg = join(" \\\n    ", '', @$arg);
@@ -67,7 +73,7 @@ href=raw>mbox</a>
   Avoid top-posting and favor interleaved quoting:
   <a
 href="$p_url">$p_url</a>
-
+$info
 * Reply to all the recipients using the <b>--to</b>, <b>--cc</b>,
   and <b>--in-reply-to</b> switches of git-send-email(1):