better email
This commit is contained in:
parent
46540ff753
commit
d90e51eb1e
5 changed files with 17 additions and 7 deletions
|
@ -4,7 +4,6 @@ class MapMailer < ApplicationMailer
|
|||
def invite_to_edit_email(map, inviter, invitee)
|
||||
@inviter = inviter
|
||||
@map = map
|
||||
@url = map_url(@map)
|
||||
subject = @map.name + ' - Invitation to edit'
|
||||
mail(to: invitee.email, subject: subject)
|
||||
end
|
||||
|
|
|
@ -3,11 +3,20 @@
|
|||
<head>
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
||||
</head>
|
||||
<body>
|
||||
<body style="font-family: sans-serif; width: 100%; padding: 24px 16px 16px 16px; background-color: #f5f5f5; text-align: center;">
|
||||
|
||||
<p><%= @inviter.name %> has invited you to <span style="font-weight: bold">collaboratively edit</span> the following map on Metamaps:</p>
|
||||
<p style="font-weight: bold;"><%= link_to @map.name, @url %></p>
|
||||
<div style="padding: 16px; background: white; text-align: left;">
|
||||
<% button_style = "background-color:#a354cd;border:1px solid #673AB7;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" %>
|
||||
|
||||
<p style="font-size: 11px;">Make sense with Metamaps</p>
|
||||
<p><span style="font-weight: bold;"><%= @inviter.name %></span> has invited you to <span style="font-weight: bold">collaboratively edit</span> the following map on Metamaps:</p>
|
||||
<p><%= link_to @map.name, map_url(@map), target: "_blank", style: "font-size: 18px; text-decoration: none; color: #a354cd;" %></p>
|
||||
<% if @map.desc %>
|
||||
<p style="font-size: 12px;"><%= @map.desc %></p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Open in Metamaps', map_url(@map), target: "_blank", style: button_style %>
|
||||
|
||||
<p style="font-size: 12px;">Make sense with Metamaps</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= @inviter.name %> has invited you to collaboratively edit the following map on Metamaps:
|
||||
|
||||
<%= @map.name + ' [' + @url + ']' %>
|
||||
<%= @map.name %> [<%= map_url(@map) %>]
|
||||
|
||||
Make sense with Metamaps
|
||||
|
||||
|
|
BIN
spec/mailers/previews/.map_mailer_preview.rb.swp
Normal file
BIN
spec/mailers/previews/.map_mailer_preview.rb.swp
Normal file
Binary file not shown.
|
@ -1,4 +1,6 @@
|
|||
# Preview all emails at http://localhost:3000/rails/mailers/map_mailer
|
||||
class MapMailerPreview < ActionMailer::Preview
|
||||
|
||||
def invite_to_edit_email
|
||||
MapMailer.invite_to_edit_email(Map.first, User.first, User.second)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue