user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] view: change References link to expand thread
@ 2015-09-07  7:07 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-09-07  7:07 UTC (permalink / raw)
  To: meta

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: <' . $mid->as_html . '> ';
-	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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-07  7:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-07  7:07 [PATCH] view: change References link to expand thread Eric Wong

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).