added bg color to sections

This commit is contained in:
Connor Turland 2017-09-03 08:27:05 -04:00
parent 958bd8c70c
commit 42f4ecb37b

View file

@ -1,4 +1,4 @@
<% 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>
@ -35,48 +35,57 @@
<% end %>
</div>
<hr>
<% 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>
<% 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] %>
<h3 style="color:#424242;">Topics Removed</h3>
<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] %>
<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>
<% 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] %>
<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>
</div>
<% end %>
<%= link_to 'Visit Map', map_url(@map), style: button_style %>