Commit 8b11b55de9144608de7621251c1289cbba793d51

Authored by Victor Costa
1 parent 64b73a34

Small improvements on layout of person notifier email

app/views/person_notifier/mailer/_create_article.html.erb
1   -<table>
2 1 <tr>
3   - <td>
  2 + <td style="width: 11%">
4 3 <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
5 4 </td>
6 5 <td>
7   - <p style="width:550px">
  6 + <p>
8 7 <span style="font-size: 14px;"><%= link_to activity.user.short_name(20), activity.user.url %></span>
9 8 <span style="font-size: 14px;"><%= _("has published on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url, :style => "color: #333; font-weight: bold; text-decoration: none;") if activity.target.profile.is_a?(Community) %></span>
10 9 <span style="font-size: 10px; color: #444444; float:right;"><%= time_ago_as_sentence(activity.created_at) %></span>
... ... @@ -24,4 +23,3 @@
24 23 <%= render :partial => 'profile_comments', :locals => { :activity => activity } %>
25 24 </td>
26 25 </tr>
27   -</table>
... ...
app/views/person_notifier/mailer/_default_activity.html.erb
1   -<table>
2 1 <tr>
3   - <td>
  2 + <td style="width: 11%">
4 3 <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
5 4 </td>
6 5 <td>
7   - <p style="width:550px">
  6 + <p>
8 7 <span style="font-size: 14px;"><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></span>
9 8 <span style="font-size: 10px; color: #444444; float: right;"><%= time_ago_as_sentence(activity.created_at) %></span>
10 9 </p>
... ... @@ -16,4 +15,3 @@
16 15 <%= render :partial => 'profile_comments', :locals => { :activity => activity } %>
17 16 </td>
18 17 </tr>
19   -</table>
... ...
app/views/person_notifier/mailer/_upload_image.html.erb
1   -<table>
2 1 <tr>
3   - <td>
  2 + <td style="width: 11%">
4 3 <%= link_to(profile_image(activity.user, :minor), activity.user.url) %>
5 4 </td>
6 5 <td>
7   - <p style="width:550px">
  6 + <p>
8 7 <span style="font-size: 14px;"><%= link_to activity.user.name, activity.user.url %> <%= describe activity %></span>
9 8 <span style="font-size: 10px; color: #444444; float:right;"><%= time_ago_as_sentence(activity.created_at) %></span>
10 9 </p>
11 10 </td>
12 11 </tr>
13   -</table>
14 12 <div title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-newgallery'></div>
15 13 <br/>
... ...
app/views/person_notifier/mailer/content_summary.html.erb
1   -<h3><%= _("%s's network activity") % @profile.name %></h3>
2   -<br/>
3   -<div>
4   -<% @notifications.each do |activity| %>
5   - <div style="border-left:none;border-right:none;border-top:1px solid #ccc;border-bottom:none;padding:10px;width:600px">
6   - <%= render :partial => activity.verb, :locals => { :activity => activity } rescue "cannot render notification for #{activity.verb}" %>
  1 +<div style="background-color: #EEEEEE">
  2 + <table style="width: 100%;"><tbody><tr><td align="center">
  3 + <div style="display: table; background-color: white; margin: 26px 0;">
  4 + <div style="padding: 25px 20px 20px 20px;text-align: left;">
  5 + <%= link_to @url, :style => "text-decoration: none;" do %>
  6 + <span style="font-weight:bold;font-size: 28px;margin: 0;color: white;background-color: #AAAAAA;padding: 5px;"><%= @environment %></span>
  7 + <% end %>
  8 + <span style="font-weight:bold;color: #333;font-size:19px;margin-left: 8px;"><%= _("%s's network activity") % @profile.name %></h3>
  9 + </div>
  10 + <div style="margin: 0 20px 20px 20px;border-top:2px solid #e2e2e2;">
  11 + <% @notifications.each do |activity| %>
  12 + <div style="border-bottom:1px solid #e2e2e2;padding:15px 0;width:600px">
  13 + <table style="width:100%;">
  14 + <%= render :partial => activity.verb, :locals => { :activity => activity } rescue "cannot render notification for #{activity.verb}" %>
  15 + </table>
  16 + </div>
  17 + <% end %>
  18 + </div>
  19 + <div style="color:#444444;font-size:11px;margin-bottom: 20px;">
  20 + <p style="margin:0"><%= _("Greetings,") %></p>
  21 + <p style="margin:0"><%= _('%s team.') % @environment %></p>
  22 + <p style="margin:0"><%= link_to @url, url_for(@url) %></p>
  23 + </div>
7 24 </div>
8   -<% end %>
  25 + </td></tr></tbody></table>
9 26 </div>
10   -
11   -<div style="color:#444444;font-size:11px;">
12   -<p><%= _("Greetings,") %></p>
13   -<br/>
14   -<p>--</p>
15   -<p><%= _('%s team.') % @environment %></p>
16   -<p><%= url_for @url %></p>
17   -</div>
18   -<br/>
... ...