From 27a0b84774ad63a4462bc17c07c4f9b8e78a54f1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 15 Sep 2014 03:00:49 +0000 Subject: view: standalone view shows link to index Sometimes people come from sharing links and not the index, so the back button in their browser does not really go back. --- lib/PublicInbox/View.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 92c20238..d3849dcc 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -301,7 +301,7 @@ sub headers_to_html_header { } sub html_footer { - my ($mime, $purge) = @_; + my ($mime, $standalone) = @_; my %cc; # everyone else my $to; # this is the From address @@ -316,7 +316,7 @@ sub html_footer { $to ||= $dst; } } - Email::Address->purge_cache if $purge; + Email::Address->purge_cache if $standalone; my $subj = $mime->header('Subject') || ''; $subj = "Re: $subj" unless $subj =~ /\bRe:/; @@ -329,7 +329,9 @@ sub html_footer { my $cc = uri_escape_utf8(join(',', values %cc)); my $href = "mailto:$to?In-Reply-To=$irp&Cc=${cc}&Subject=$subj"; - "reply'; + my $idx = $standalone ? " index" : ''; + + "reply' . $idx; } sub linkify_refs { -- cgit v1.2.3-24-ge0c7