user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] view: change References link to expand thread
Date: Mon,  7 Sep 2015 07:07:36 +0000	[thread overview]
Message-ID: <20150907070736.15899-1-e@80x24.org> (raw)

The expanded thread view is generally more useful.  Having links
to more links at the bottom seems to a waste of navigation time.
However, keep the '#r' anchor in case people rely on it for
links.
---
 lib/PublicInbox/View.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 8969e17..5baca97 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -407,7 +407,6 @@ sub headers_to_html_header {
 	my $header_obj = $mime->header_obj;
 	my $mid = $header_obj->header('Message-ID');
 	$mid = PublicInbox::Hval->new_msgid($mid);
-	my $mid_href = $mid->as_href;
 	foreach my $h (qw(From To Cc Subject Date)) {
 		my $v = $mime->header($h);
 		defined($v) && ($v ne '') or next;
@@ -429,10 +428,10 @@ sub headers_to_html_header {
 
 	}
 	$rv .= 'Message-ID: &lt;' . $mid->as_html . '&gt; ';
-	my $raw_ref = $full_pfx ? 'raw' : '../raw';
-	$rv .= "(<a\nhref=\"$raw_ref\">raw</a>)\n";
+	my $upfx = $full_pfx ? '' : '../';
+	$rv .= "(<a\nhref=\"${upfx}raw\">raw</a>)\n";
 	if ($srch) {
-		$rv .= "<a\nhref=\"#r\">References: [see below]</a>\n";
+		$rv .= "<a\nhref=\"${upfx}t/\">References: [expand]</a>\n";
 	} else {
 		$rv .= _parent_headers_nosrch($header_obj);
 	}
-- 
EW


                 reply	other threads:[~2015-09-07  7:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150907070736.15899-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).