whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: link to mail archives for feedback threads
Date Fri, 17 Jun 2016 14:07:33 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  69db802   link to mail archives for feedback threads
69db802 is described below

commit 69db802a1b1c9b9f02e45ed8dc4b480bb1583547
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Fri Jun 17 10:07:17 2016 -0400

    link to mail archives for feedback threads
---
 www/board/agenda/views/elements/additional-info.js.rb | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/elements/additional-info.js.rb b/www/board/agenda/views/elements/additional-info.js.rb
index 7ad4242..39a5071 100644
--- a/www/board/agenda/views/elements/additional-info.js.rb
+++ b/www/board/agenda/views/elements/additional-info.js.rb
@@ -49,7 +49,23 @@ class AdditionalInfo < React
             _span "\u2022 "
             _a date.gsub('_', '-'),
               href: HistoricalComments.link(date, @@item.title)
-            _span ':'
+            _span ': '
+
+            # compute date range for month
+            dfr = Date.parse(date.gsub('_', '-'))
+            dto = Math.max(dfr + 31 * 86_400_000, Date.now())
+
+            # convert to ISO format
+            dfr = Date.new(dfr).toISOString().substr(0,10)
+            dto = Date.new(dto).toISOString().substr(0,10)
+
+            # link to mail archive for feedback thread
+            if dfr > '2016-04'
+              _a '(thread)', 
+                href: 'https://lists.apache.org/list.html?board@apache.org:' +
+                  "d=dfr=#{dfr}|dto=#{dto}:" +
+                  "Board%20feedback%20on%20#{dfr}%20#{@@item.title}%20report"
+            end
           end
 
           splitComments(history[date]).each do |comment|

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message