summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre de La Morinerie <pierre@capitainetrain.com>2014-02-18 14:27:39 +0100
committerPierre de La Morinerie <pierre@capitainetrain.com>2014-03-03 16:58:44 +0100
commit306744bbb0a5e1fc6253ec9512cbae87df2a94c7 (patch)
treedf004beb36a470f1fabefc98bfc4e9eab702e8c1
parent7959455f4d5dc25963176b9f83981b17b415996e (diff)
downloadgitlab-ce-306744bbb0a5e1fc6253ec9512cbae87df2a94c7.tar.gz
Simplify the default layout of notification emails
* Less margin: the content appears as the text of the message. * Streamlined footer: everything on one line, with a small separator. * Zimbra (www.zimbra.com) chokes on HTML tables, and doesn't display the content of the message. Switching to a simpler layout fixes the issue.
-rw-r--r--app/views/layouts/notify.html.haml31
-rw-r--r--app/views/notify/new_merge_request_email.html.haml4
-rw-r--r--app/views/notify/note_merge_request_email.html.haml2
3 files changed, 21 insertions, 16 deletions
diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml
index c632fdeb3e2..09d84a3eb9f 100644
--- a/app/views/layouts/notify.html.haml
+++ b/app/views/layouts/notify.html.haml
@@ -3,17 +3,24 @@
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title
GitLab
+ :css
+ p.details {
+ font-style:italic;
+ color:#777
+ }
+ .footer p {
+ font-size:small;
+ color:#777
+ }
%body
- %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"}
- %tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- = yield
- %tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- %p{style: "font-size:small;color:#777"}
- - if @project
- You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team.
- %br
- - if @target_url
- #{link_to "View in GitLab", @target_url}
+ %div.content
+ = yield
+ %div.footer{style: "margin-top: 10px;"}
+ %p
+ \—
+ %br
+ - if @project
+ You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team.
+ - if @target_url
+ #{link_to "View in GitLab", @target_url}
diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml
index 2c012c4b215..f02d5111b22 100644
--- a/app/views/notify/new_merge_request_email.html.haml
+++ b/app/views/notify/new_merge_request_email.html.haml
@@ -1,6 +1,4 @@
-%p
- = "New Merge Request ##{@merge_request.iid}"
-%p
+%p.details
!= merge_path_description(@merge_request, '&rarr;')
- if @merge_request.assignee_id.present?
diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml
index 83d07aa0c92..f5287176fbc 100644
--- a/app/views/notify/note_merge_request_email.html.haml
+++ b/app/views/notify/note_merge_request_email.html.haml
@@ -1,4 +1,4 @@
-%p
+%p.details
- if @note.for_diff_line?
= link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")
- else