Commit aeec71898bd3ecb604030887a382bb409b632da2
1 parent
ad31635e
Exists in
master
and in
1 other branch
Added HTML email template for deployment notifications.
Showing
3 changed files
with
34 additions
and
3 deletions
Show diff stats
app/views/layouts/mailer.html.haml
| ... | ... | @@ -0,0 +1,30 @@ |
| 1 | +%tr | |
| 2 | + %td.section | |
| 3 | + %table(cellpadding="0" cellspacing="0" border="0" align="left") | |
| 4 | + %tbody | |
| 5 | + %tr | |
| 6 | + %td.content(valign="top") | |
| 7 | + %div | |
| 8 | + %p | |
| 9 | + = link_to(@app.name, app_url(@app), :class => "bold") | |
| 10 | + was just deployed to | |
| 11 | + %span.bold= @deploy.environment | |
| 12 | + by | |
| 13 | + %span.bold= @deploy.username + "." | |
| 14 | + | |
| 15 | +%tr | |
| 16 | + %td.section | |
| 17 | + %table(cellpadding="0" cellspacing="0" border="0" align="left") | |
| 18 | + %tbody | |
| 19 | + %tr | |
| 20 | + %td.content(valign="top") | |
| 21 | + %div | |
| 22 | + %p.heading WHAT: | |
| 23 | + %p | |
| 24 | + - revision = @deploy.revision.present? ? content_tag(:span, "@#{@deploy.revision}", :class => "revision") : "" | |
| 25 | + = (@app.name + revision).html_safe | |
| 26 | + %p.heading WHEN: | |
| 27 | + %p= @deploy.created_at.to_s(:rfc822) | |
| 28 | + %p.heading REPOSITORY: | |
| 29 | + %p= @deploy.repository.blank? ? 'n/a' : link_to(nil, @deploy.repository) | |
| 30 | + | ... | ... |
app/views/mailer/deploy_notification.text.erb
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | Details: |
| 4 | 4 | |
| 5 | - What: <%= @app.name %><%= "@#{@deploy.revision}" unless @deploy.revision.blank? %> | |
| 6 | - When: <%= @deploy.created_at.to_s %> | |
| 7 | - From: <%= @deploy.repository.blank? ? 'n/a' : @deploy.repository %> | |
| 5 | + What: <%= @app.name %><%= "@#{@deploy.revision}" unless @deploy.revision.blank? %> | |
| 6 | + When: <%= @deploy.created_at.to_s(:rfc822) %> | |
| 7 | + Repository: <%= @deploy.repository.blank? ? 'n/a' : @deploy.repository %> | |
| 8 | 8 | ... | ... |