metamaps/metamaps

View on GitHub
app/views/topic_mailer/connected.html.erb

Summary

Maintainability
Test Coverage
<% topic1 = @entity || entity
   synapse = @event || event
   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"
   topic2 = (topic1.id == synapse.topic1_id ? synapse.topic2 : synapse.topic1) %>

<p>
  <span style="font-weight: bold;"><%= synapse.user.name %></span>
  connected topic <span style="font-weight: bold"><%= topic1.name %></span>
  to topic <span style="font-weight: bold"><%= topic2.name %></span>
  <% if synapse.desc.length > 0 %>
    with the description "<%= synapse.desc %>".
  <% end %>
</p>

<%= link_to 'View the connection', topic_url(topic1), style: button_style %>

<%= render :partial => 'topic_mailer/unfollow', locals: { topic: topic1 } %>