Skip to content

Commit

Permalink
for publiclab#5340 - adds showing current time,formating published ti…
Browse files Browse the repository at this point in the history
…me,publiclab link to send_digest mailer html
  • Loading branch information
stoic-plus committed Apr 21, 2019
1 parent 900464f commit 37e69a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ GEM
activemodel (= 5.2.2.1)
activesupport (= 5.2.2.1)
arel (>= 9.0)
activerecord-session_store (1.1.2)
activerecord-session_store (1.1.3)
actionpack (>= 4.0)
activerecord (>= 4.0)
multi_json (~> 1.11, >= 1.11.2)
Expand Down Expand Up @@ -64,7 +64,7 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bindex (0.5.0)
bindex (0.6.0)
buftok (0.2.0)
builder (3.2.3)
byebug (11.0.1)
Expand Down Expand Up @@ -148,7 +148,7 @@ GEM
grape-swagger-ui (2.2.8)
railties (>= 3.1)
hashie (3.6.0)
highline (2.0.0)
highline (2.0.1)
http (3.3.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
Expand Down Expand Up @@ -244,7 +244,7 @@ GEM
netrc (0.11.0)
nifty-generators (0.4.6)
nio4r (2.3.1)
nokogiri (1.10.1)
nokogiri (1.10.2)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.1)
nokogiri (~> 1.8, >= 1.8.4)
Expand All @@ -263,7 +263,7 @@ GEM
omniauth-github (1.3.0)
omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-google-oauth2 (0.6.0)
omniauth-google-oauth2 (0.6.1)
jwt (>= 2.0)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.5)
Expand All @@ -284,8 +284,8 @@ GEM
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
parallel (1.14.0)
parser (2.6.0.0)
parallel (1.16.2)
parser (2.6.2.0)
ast (~> 2.4.0)
passenger (6.0.2)
rack
Expand All @@ -306,7 +306,7 @@ GEM
rack (2.0.6)
rack-accept (0.4.5)
rack (>= 0.4)
rack-cors (1.0.2)
rack-cors (1.0.3)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
Expand Down Expand Up @@ -597,4 +597,4 @@ RUBY VERSION
ruby 2.4.4p296

BUNDLED WITH
1.17.3
2.0.1
6 changes: 4 additions & 2 deletions app/views/subscription_mailer/send_digest.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<header style="text-align: center;color:black">
<img src="https://avatars2.githubusercontent.com/u/4621650?s=200&v=4" style="width: 100px;height: 100px">
<p style="font-size: 20px">[Public Lab] <%= @subject %></p>
<p><%= Time.now.strftime("%B %-d %Y") %></p>
</header>

<div style="width: 46vw;margin: 0 auto;margin-top: 54px;color: black;">
<p style="font-size: 1.2em; font-family: sans-serif;margin-bottom: 0;color: lightgray;">Top picks for you</p>
<p style="font-size: 1.2em; font-family: sans-serif;margin-bottom: 0;color: lightgray;">Based on what you're following at <a href="https://publiclab.org">PublicLab.org</a></p>
<hr id="first" style="border: none;height: 1px;background-color: #e2e2e2;margin-bottom: 32px;">
<table style="font-family: sans-serif;">
<% @nodes.each do |n| %>
Expand All @@ -21,7 +23,7 @@
</div>
<div style="margin-top: 20px;">
<b style="font-weight: 500;"><%= n.author.username.capitalize %></b>
<p style="margin: 0;color: #999;font-weight: 500;">Published <%= n.created_at %>.strftime("%m/%d")</p>
<p style="margin: 0;color: #999;font-weight: 500;">Published <%= n.created_at.strftime("%B %-d %Y") %></p>
</div>
<div <% unless n.main_image.present? %> colspan="2" <% end %> style="padding-bottom: 10px;">
<p style="font-size: 1.1em;line-height: 1.5;text-align: justify;font-weight: 300;"><%= n.body.truncate(175) %><a href="https://publiclab.org<%= n.path %>" style="text-decoration: none;"> Read more</a></p>
Expand All @@ -43,4 +45,4 @@
</table>
<p>Click <a href="https://publiclab.org/subscriptions">here</a> to choose your followed topics</p>
<p>Click <a href="https://publiclab.org/settings">here</a> to change your subscription settings</p>
</div>
</div>

0 comments on commit 37e69a2

Please sign in to comment.