* [PATCH] tail: support multiple URLs for archives
@ 2016-01-09 22:15 Eric Wong
2016-01-09 22:28 ` [PATCH 2/1] tail: fix divider when private email does not exist Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2016-01-09 22:15 UTC (permalink / raw)
To: olddoc-public; +Cc: Eric Wong
The more archives, the better.
---
lib/oldweb/_tail.rhtml | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/lib/oldweb/_tail.rhtml b/lib/oldweb/_tail.rhtml
index 0879572..fda210d 100644
--- a/lib/oldweb/_tail.rhtml
+++ b/lib/oldweb/_tail.rhtml
@@ -1,21 +1,23 @@
<%
public_email = @old_cfg['public_email']
private_email = @old_cfg['private_email']
-ml_url = @old_cfg['ml_url']
-nntp_url = @old_cfg['nntp_url']
-
-if public_email && ml_url %><hr /><pre>
+archive_urls = Array(@old_cfg['ml_url']).concat(Array(@old_cfg['nntp_url']))
+if url = archive_urls.shift %><hr /><pre>
mail archives: <a
-href="<%= ml_url %>"><%= ml_url %></a> mailto:<a
-href="mailto:<%= public_email %>"><%=
-public_email
-%></a>
-<% end
-if nntp_url %>NNTP archives: <a
-href="<%= nntp_url %>"><%= nntp_url %></a>
+href="<%= url %>"><%= url %></a><%
+ archive_urls.each do |u| %>
+ <a
+href="<%= u %>"><%= u %></a> <%
+ end # archive_urls.each
+ if private_email || public_email %>
<%
-end
-if private_email
-%>private mail: <a
+ if public_email %>public: <a
+href="mailto:<%= public_email %>"><%= public_email %></a><%
+ end
+ if private_email || public_email %> / <% end
+ if private_email %>private: <a
href="mailto:<%= private_email %>"><%= private_email %></a><%
-end %></pre>
+ end
+ end
+end
+%></pre>
--
EW
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/1] tail: fix divider when private email does not exist
2016-01-09 22:15 [PATCH] tail: support multiple URLs for archives Eric Wong
@ 2016-01-09 22:28 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2016-01-09 22:28 UTC (permalink / raw)
To: olddoc-public
Not all projects have both email addresses.
---
lib/oldweb/_tail.rhtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/oldweb/_tail.rhtml b/lib/oldweb/_tail.rhtml
index fda210d..f56bf2c 100644
--- a/lib/oldweb/_tail.rhtml
+++ b/lib/oldweb/_tail.rhtml
@@ -14,7 +14,7 @@ href="<%= u %>"><%= u %></a> <%
if public_email %>public: <a
href="mailto:<%= public_email %>"><%= public_email %></a><%
end
- if private_email || public_email %> / <% end
+ if private_email && public_email %> / <% end
if private_email %>private: <a
href="mailto:<%= private_email %>"><%= private_email %></a><%
end
--
EW
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-09 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-09 22:15 [PATCH] tail: support multiple URLs for archives Eric Wong
2016-01-09 22:28 ` [PATCH 2/1] tail: fix divider when private email does not exist Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/olddoc.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).