From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.8 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, T_FILL_THIS_FORM_SHORT shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: olddoc-public@80x24.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 955C72021D; Sat, 9 Jan 2016 22:16:03 +0000 (UTC) From: Eric Wong To: olddoc-public@80x24.org Cc: Eric Wong Subject: [PATCH] tail: support multiple URLs for archives Date: Sat, 9 Jan 2016 22:15:59 +0000 Message-Id: <20160109221559.6482-1-e@80x24.org> List-Id: 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 +%>
-- EW