diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 671483ce..cec680bc 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -148,12 +148,15 @@ class Notify < ActionMailer::Base # >> @project = Project.last # => # # >> subject('Lorem ipsum') - # => "GitLab | Lorem ipsum | Ruby on Rails" + # => "GitLab | Ruby on Rails | Lorem ipsum " # # # Accepts multiple arguments # >> subject('Lorem ipsum', 'Dolor sit amet') # => "GitLab | Lorem ipsum | Dolor sit amet" def subject(*extra) - "GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name_with_namespace}" : "") + subject = "GitLab" + subject << (@project ? " | #{@project.name_with_namespace}" : "") + subject << " | " + extra.join(' | ') if extra.present? + subject end end diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index c418e1db..3db1f59b 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -13,10 +13,10 @@ %td{style: "font-size: 0px;", width: "20"} \  %td{align: "left", style: "padding: 10px 0", width: "580"} - %h1{style: "font-size: 24px; color: #BBBBBB; font: normal 22px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"} + %h1{style: "color: #BBBBBB; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"} GITLAB - if @project - → #{@project.name_with_namespace} + \/ #{@project.name_with_namespace} %table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"} %tr= yield %tr diff --git a/app/views/notify/issue_status_changed_email.html.haml b/app/views/notify/issue_status_changed_email.html.haml index c433e80c..27168eef 100644 --- a/app/views/notify/issue_status_changed_email.html.haml +++ b/app/views/notify/issue_status_changed_email.html.haml @@ -1,8 +1,8 @@ %td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td{width: "21"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Issue was #{@issue_status} by #{@updated_by.name}" %td{style: "font-size: 1px; line-height: 1px;", width: "21"} diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index fba4b865..3cb53513 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,13 +1,13 @@ %td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"} %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td{width: "21"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} New Issue was created and assigned to you. - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} %tr - %td{style: "font-size: 1px; line-height: 1px;", width: "21"} + %td{width: "21"} %td{align: "left", style: "padding: 20px 0 0;"} %p{style: "color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "} = "Issue ##{@issue.id}" diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml index 4bc3bae0..3857f2f0 100644 --- a/app/views/notify/note_merge_request_email.html.haml +++ b/app/views/notify/note_merge_request_email.html.haml @@ -2,7 +2,7 @@ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr %td{width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td %h2{style: "color:#646464; font-weight: normal;"} - if @note.for_diff_line? = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}") diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml index 31a5d232..bc2d6f70 100644 --- a/app/views/notify/reassigned_issue_email.html.haml +++ b/app/views/notify/reassigned_issue_email.html.haml @@ -2,7 +2,7 @@ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"} %tr %td{style: "font-size: 1px; line-height: 1px;", width: "21"} - %td{align: "left", style: "padding: 20px 0 0;"} + %td %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "} = "Reassigned Issue ##{@issue.id}" = link_to_gfm truncate(@issue.title, length: 30), project_issue_url(@issue.project, @issue) diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 58698eec..e5b4cdaf 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -60,7 +60,7 @@ describe Notify do it_behaves_like 'an assignee email' it 'has the correct subject' do - should have_subject /new issue ##{issue.id} \| #{issue.title} \| #{project.name}/ + should have_subject /#{project.name} \| new issue ##{issue.id} \| #{issue.title}/ end it 'contains a link to the new issue' do