ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [7/9] incubator-ponymail git commit: if on a specific month, show month name and mbox link
Date Sun, 04 Sep 2016 14:27:14 GMT
if on a specific month, show month name and mbox link


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/3f2168e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/3f2168e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/3f2168e1

Branch: refs/heads/coffee-and-cake
Commit: 3f2168e1157069b4720103df44e70c40cb7c9447
Parents: 72cae39
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Sun Sep 4 16:26:15 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Sun Sep 4 16:26:15 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/listview_basic.coffee | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/3f2168e1/site/js/coffee/listview_basic.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/listview_basic.coffee b/site/js/coffee/listview_basic.coffee
index 3da3314..c61dc2b 100644
--- a/site/js/coffee/listview_basic.coffee
+++ b/site/js/coffee/listview_basic.coffee
@@ -25,7 +25,18 @@ class BasicListView
         ### Set the header first ###
         hd = get('header')
         if @json.list
-            hd.empty().inject("#{@json.list}, past 30 days:")
+            if ponymail_month.length > 0
+                [y, m] = ponymail_month.split("-", 2)
+                date = calendar_months[parseInt(m)-1] + ", #{y}"
+                hd.empty().inject([
+                    "#{@json.list} (#{date}):",
+                    new HTML('a', { href: "api/mbox.lua?list=#{ponymail_list}&date=#{ponymail_month}",
title: "Download as mbox archive"},
+                        new HTML('img', { src: 'images/floppy.svg', style: {marginLeft: "10px",
width:"20px", height: "20px", verticalAlign: 'middle'}} )
+                    )
+                    ])
+                
+            else    
+                hd.empty().inject("#{@json.list}, past 30 days:")
             
         ### Get and clear the list view ###
         @lv = get('listview')


Mime
View raw message