From 91af89b0abf6d6a31189c556246c62eaeda6cc80 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 9 Jan 2016 22:14:52 +0000 Subject: tail: support multiple URLs for archives 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 %>
+archive_urls = Array(@old_cfg['ml_url']).concat(Array(@old_cfg['nntp_url']))
+if url = archive_urls.shift %>
 mail archives: <%= ml_url %> mailto:<%=
-public_email
-%>
-<% end
-if nntp_url %>NNTP archives: <%= nntp_url %>
+href="<%= url %>"><%= url %><%
+  archive_urls.each do |u| %>
+	<%= u %> <%
+  end # archive_urls.each
+  if private_email || public_email %>
 <%
-end
-if private_email
-%>private mail: public: <%= public_email %><%
+    end
+    if private_email || public_email %> / <% end
+    if private_email %>private: <%= private_email %><%
-end %>
+ end + end +end +%>
-- cgit v1.2.3-24-ge0c7