Merge pull request #1129 from metamaps/feature/map.activity.improved
improve email styling for release
This commit is contained in:
commit
aceb3ff31e
1 changed files with 75 additions and 35 deletions
|
@ -1,51 +1,91 @@
|
|||
<% button_style = "background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %>
|
||||
<% button_style = "margin-top: 8px;background-color:#4fc059;border-radius:2px;color:white;display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:12px;font-weight:bold;min-height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
div {
|
||||
color: #424242;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 4px 0;
|
||||
}
|
||||
</style>
|
||||
<div style="padding: 16px; background: white; text-align: left; font-family: Arial">
|
||||
<p>Hey <%= @user.name %>, there was activity by others in the last 24 hours on map
|
||||
<%= link_to @map.name, map_url(@map) %>
|
||||
</p>
|
||||
<p># of messages: <%= @summary_data[:stats][:messages_sent] || 0 %></p>
|
||||
<p># of topics added: <%= @summary_data[:stats][:topics_added] || 0 %></p>
|
||||
<p># of topics moved: <%= @summary_data[:stats][:topics_moved] || 0%></p>
|
||||
<p># of topics removed: <%= @summary_data[:stats][:topics_removed] || 0 %></p>
|
||||
<p># of synapses added: <%= @summary_data[:stats][:synapses_added] || 0 %></p>
|
||||
<p># of synapses removed: <%= @summary_data[:stats][:synapses_removed] || 0 %></p>
|
||||
<div>
|
||||
<% if @summary_data[:stats][:messages_sent] > 0 %>
|
||||
<p style="margin:6px 0;color:#a354cd;"><%= pluralize(@summary_data[:stats][:messages_sent], 'message') %></p>
|
||||
<% end %>
|
||||
<% if @summary_data[:stats][:topics_added] > 0 %>
|
||||
<p style="margin:6px 0;color:#4FC059;"><%= pluralize(@summary_data[:stats][:topics_added], 'topic') %> added</p>
|
||||
<% end %>
|
||||
<% if @summary_data[:stats][:synapses_added] > 0 %>
|
||||
<p style="margin:6px 0;color:#4FC059;"><%= pluralize(@summary_data[:stats][:synapses_added], 'synapse') %> added</p>
|
||||
<% end %>
|
||||
<% if @summary_data[:stats][:topics_moved] > 0 %>
|
||||
<p style="margin:6px 0;color:#00BCD4;"><%= pluralize(@summary_data[:stats][:topics_moved], 'topic') %> moved</p>
|
||||
<% end %>
|
||||
<% if @summary_data[:stats][:topics_removed] > 0 %>
|
||||
<p style="margin:6px 0;color:#c04f4f;"><%= pluralize(@summary_data[:stats][:topics_removed], 'topic') %> removed</p>
|
||||
<% end %>
|
||||
<% if @summary_data[:stats][:synapses_removed] > 0 %>
|
||||
<p style="margin:6px 0;color:#c04f4f;"><%= pluralize(@summary_data[:stats][:synapses_removed], 'synapse') %> removed</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<hr>
|
||||
<% if @summary_data[:topics_added] %>
|
||||
<h2>Topics Added</h2>
|
||||
<ul>
|
||||
<% @summary_data[:topics_added].each do |event| %>
|
||||
<li><%= event.eventable.name %></li>
|
||||
<% if @summary_data[:topics_added] || @summary_data[:synapses_added] %>
|
||||
<div style="background:rgba(79, 192, 89, 0.2); padding:8px;">
|
||||
<% if @summary_data[:topics_added] %>
|
||||
<h3 style="color:#424242;">Topics Added</h3>
|
||||
<ul>
|
||||
<% @summary_data[:topics_added].each do |event| %>
|
||||
<li><%= event.eventable.name %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% if @summary_data[:synapses_added] %>
|
||||
<h3 style="color:#424242;">Synapses Added</h3>
|
||||
<ul>
|
||||
<% @summary_data[:synapses_added].each do |event| %>
|
||||
<li>
|
||||
<%= event.eventable.topic1.name %></br>
|
||||
<img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br>
|
||||
<%= event.eventable.topic2.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @summary_data[:topics_removed] %>
|
||||
<h2>Topics Removed</h2>
|
||||
<ul>
|
||||
<% @summary_data[:topics_removed].each do |event| %>
|
||||
<li><%= event.eventable.name %></li>
|
||||
|
||||
<% if @summary_data[:topics_removed] || @summary_data[:synapses_removed] %>
|
||||
<div style="background:rgba(192, 79, 79, 0.2); padding:8px;">
|
||||
<% if @summary_data[:topics_removed] %>
|
||||
<h3 style="color:#424242;">Topics Removed</h3>
|
||||
<ul>
|
||||
<% @summary_data[:topics_removed].each do |event| %>
|
||||
<li><%= event.eventable.name %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% if @summary_data[:synapses_added] %>
|
||||
<h2>Synapses Added</h2>
|
||||
<ul>
|
||||
<% @summary_data[:synapses_added].each do |event| %>
|
||||
<li><%= event.eventable.topic1.name %> -> <%= event.eventable.topic2.name %></li>
|
||||
<% if @summary_data[:synapses_removed] %>
|
||||
<h3 style="color:#424242;">Synapses Removed</h3>
|
||||
<ul>
|
||||
<% @summary_data[:synapses_removed].each do |event| %>
|
||||
<li>
|
||||
<%= event.eventable.topic1.name %></br>
|
||||
<img src="https://s3.amazonaws.com/metamaps-assets/site/synapse16.png" /></br>
|
||||
<%= event.eventable.topic2.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% if @summary_data[:synapses_removed] %>
|
||||
<h2>Synapses Removed</h2>
|
||||
<ul>
|
||||
<% @summary_data[:synapses_removed].each do |event| %>
|
||||
<li><%= event.eventable.topic1.name %> -> <%= event.eventable.topic2.name %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Visit Map', map_url(@map), style: button_style %>
|
||||
|
|
Loading…
Reference in a new issue