Permalink
Browse files

More email template stuff

  • Loading branch information...
1 parent 4fd3bf7 commit b63baf81f57cf9fe947ffde4d77c7f0e15a39497 @thurtt committed Apr 13, 2012
Showing with 14 additions and 69 deletions.
  1. +2 −0 app/mailers/event_mailer.rb
  2. +12 −69 app/views/event_mailer/verification_email.html.erb
@@ -8,6 +8,8 @@ def verification_email(event)
@url = "http://www.flyerzero.com/events/verify/#{@event.validation_hash}"
@edit_url = "http://www.flyerzero.com/events/edit/#{@event.validation_hash}?event_id=#{event.id}"
@del_url = "http://www.flyerzero.com/events/delete/#{@event.validation_hash}?event_id=#{event.id}"
+ attachments.inline['logo.png'] = Net::HTTP.get('flyerzero.com', '/assets/mainlogo-text.png')
+ attachments.inline['flyer.png'] = Net::HTTP.get('flyerzero.com', @event.photo.url(:thumb))
mail(:to => event.email, :subject => "Verify Your Event on Flyerzero")
end
@@ -1,97 +1,40 @@
-<!DOCTYPE html>
+ <!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
- <style type="text/css">
- a:link {color:#000000;text-decoration:none;} /* unvisited link */
- a:visited {color:#000000;text-decoration:none;} /* visited link */
- a:hover {color:#000000;text-decoration:none;} /* mouse over link */
- a:active {color:#000000;text-decoration:none;} /* selected link */
- .outer_border{
- background:#000000;
- padding:30px;
- margin:50px;
- border-radius: 5px;
- }
- .inner_content{
- background:#fcfcfc;
- padding: 10px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- }
- .button{
- width: 75px;
- border: 1px solid #bbbbbb;
- background: #cccccc;
- text-align: center;
- font-size: 1.2em;
- border-radius: 5px;
- padding: 5px;
- }
- .button:hover{
- background: #000000;
- color: #fcfcfc;
- cursor: pointer;
-
- }
- .footer{
- background: #f9e101;
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- text-align: center;
- padding-top: 10px;
- padding-bottom: 10px;
- }
- .header{
- background: #f9e101;
- //border-top-left-radius: 5px;
- //border-top-right-radius: 5px;
- border-radius: 5px;
- text-align: center;
- padding: 10px;
- margin-bottom: 20px;
- font-size: 2em;
- font-weight: 800;
- }
- .cool_points{
- color: #ff0000;
- font-weight: 700;
- }
- </style>
</head>
<body>
- <div class="outer_border">
- <img src="http://flyerzero.com/assets/mainlogo-text.png" />
- <div class="header">Thanks for submitting an event on Flyerzero!</div>
- <div class="inner_content">
+ <div style="background:#000000;padding:30px;margin:50px;border-radius: 5px;">
+ <%= image_tag attachments['logo.png'].url %>
+ <div style="background: #f9e101;border-radius: 5px;text-align: center;padding: 10px;margin-bottom: 20px;font-size: 2em;font-weight: 800;">Thanks for submitting an event on Flyerzero!</div>
+ <div style="background:#fcfcfc;padding:10px;border-top-left-radius: 5px;border-top-right-radius: 5px;">
<h2>Your Event</h2>
<table>
<tr>
<td rowspan="4">
- <img src="<%= @event.photo.url(:thumb) %>" />
+ <%= image_tag attachments['flyer.png'].url %>
<div>Event Date: <%= @event.expiry.strftime("%m/%d/%Y") %></div>
<div>Event Location: <%= foursquare_venue @event.venue_id %></div>
</td>
- <td><a href="<%= @url %>"><div class="button">Activate</div></a></td>
+ <td><a href="<%= @url %>" style="text-decoration:none; color:#000000;"><div style="width:75px;border:1px solid #bbbbbb;background:#cccccc;text-align: center;font-size: 1.2em;border-radius:5px;padding:5px;">Activate</div></a></td>
<td>Before your event can show up on the Zero board and map, you need to activate it.</td>
</tr>
<tr>
- <td><a href="<%= @edit_url %>"><div class="button">Edit</div></a></td>
+ <td><a href="<%= @edit_url %>" style="text-decoration:none; color:#000000;"><div style="width:75px;border:1px solid #bbbbbb;background:#cccccc;text-align: center;font-size: 1.2em;border-radius:5px;padding:5px;">Edit</div></a></td>
<td>You can edit your event at any time before it expires by clicking this link</td>
</tr>
<tr>
- <td><a href="<%= @del_url %>"><div class="button">Delete</div></a></td>
+ <td><a href="<%= @del_url %> style="text-decoration:none; color:#000000;""><div style="width:75px;border:1px solid #bbbbbb;background:#cccccc;text-align: center;font-size: 1.2em;border-radius:5px;padding:5px;">Delete</div></a></td>
<td>You can delete your event any time</td>
</tr>
</table>
<h2>Your Profile</h2>
- <img src="<%= gravatar_url( @event.email, :r=>'pg', :d=>'mm') %>" />
+ <%= image_tag gravatar_url( @event.email, :r=>'pg', :d=>'mm' ) %>
<p><%= @event.email %> </p>
- <p> You currently have <span class="cool_points"><%= @achievements ? @achievements.points : '0' %></span> cool points</p>
-
+ <p> You currently have <span style="color: #ff0000;font-weight: 700;"><%= @achievements ? @achievements.points : '0' %></span> cool points</p>
</div>
- <div class="footer">Flyerzero is a kickass <a href="http://www.openformfoundation.org/">Open Form Foundation</a> joint.</div>
+ <div style="background:#f9e101;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;text-align: center;padding-top: 10px;padding-bottom: 10px;">Flyerzero is a kickass <a href="http://www.openformfoundation.org/">Open Form Foundation</a> joint.</div>
</div>
</body>
</html>

0 comments on commit b63baf8

Please sign in to comment.