diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-30 21:06:09 -0600 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 17:44:14 +0100 |
commit | 21e10888c3fc0fe545c0443cf0e23f593df847a4 (patch) | |
tree | c6c89c2ea2c75ffae4529ab4dceb937ce2f6299a /app/views/notify | |
parent | fe26b8af94e8e12a66249e28e34196a4f8b987c4 (diff) | |
download | gitlab-ce-21e10888c3fc0fe545c0443cf0e23f593df847a4.tar.gz |
Address review comments
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/_note_email.html.haml | 17 | ||||
-rw-r--r-- | app/views/notify/_note_email.text.erb | 13 | ||||
-rw-r--r-- | app/views/notify/note_commit_email.text.erb | 2 | ||||
-rw-r--r-- | app/views/notify/note_issue_email.text.erb | 2 | ||||
-rw-r--r-- | app/views/notify/note_personal_snippet_email.text.erb | 2 | ||||
-rw-r--r-- | app/views/notify/note_snippet_email.text.erb | 2 |
6 files changed, 20 insertions, 18 deletions
diff --git a/app/views/notify/_note_email.html.haml b/app/views/notify/_note_email.html.haml index 8b139a150b7..9e5aaed6f49 100644 --- a/app/views/notify/_note_email.html.haml +++ b/app/views/notify/_note_email.html.haml @@ -1,17 +1,18 @@ -- if @discussion +- discussion = @note.discussion unless @discussion.individual_note? +- if discussion %p.details = succeed ':' do = link_to @note.author_name, user_url(@note.author) - - if @discussion.diff_discussion? - - if @discussion.new_discussion? + - if discussion.diff_discussion? + - if discussion.new_discussion? started a new discussion - else commented on a discussion - on #{link_to @discussion.file_path, @target_url} + on #{link_to discussion.file_path, @target_url} - else - - if @discussion.new_discussion? + - if discussion.new_discussion? started a new discussion - else commented on a #{link_to 'discussion', @target_url} @@ -20,15 +21,15 @@ %p.details #{link_to @note.author_name, user_url(@note.author)} commented: -- if @discussion&.diff_discussion? +- if discussion&.diff_discussion? = content_for :head do = stylesheet_link_tag 'mailers/highlighted_diff_email' %table = render partial: "projects/diffs/line", - collection: @discussion.truncated_diff_lines, + collection: discussion.truncated_diff_lines, as: :line, - locals: { diff_file: @discussion.diff_file, + locals: { diff_file: discussion.diff_file, plain: true, email: true } diff --git a/app/views/notify/_note_email.text.erb b/app/views/notify/_note_email.text.erb index f2db321859f..b25b513f4d8 100644 --- a/app/views/notify/_note_email.text.erb +++ b/app/views/notify/_note_email.text.erb @@ -1,12 +1,13 @@ -<% if @discussion -%> +<% discussion = @note.discussion unless @discussion.individual_note? -%> +<% if discussion && !discussion.individual_note? -%> <%= @note.author_name -%> -<% if @discussion.new_discussion? -%> +<% if discussion.new_discussion? -%> <%= " started a new discussion" -%> <% else -%> <%= " commented on a discussion" -%> <% end -%> -<% if @discussion.diff_discussion? -%> -<%= " on #{@discussion.file_path}" -%> +<% if discussion.diff_discussion? -%> +<%= " on #{discussion.file_path}" -%> <% end -%> <%= ":" -%> @@ -16,8 +17,8 @@ <% end -%> -<% if @discussion&.diff_discussion? -%> -<% @discussion.truncated_diff_lines(highlight: false).each do |line| -%> +<% if discussion&.diff_discussion? -%> +<% discussion.truncated_diff_lines(highlight: false).each do |line| -%> <%= "> #{line.text}\n" -%> <% end -%> diff --git a/app/views/notify/note_commit_email.text.erb b/app/views/notify/note_commit_email.text.erb index 5585e7c3ee8..413d9e6e9ac 100644 --- a/app/views/notify/note_commit_email.text.erb +++ b/app/views/notify/note_commit_email.text.erb @@ -1 +1 @@ -<%= render partial: 'note_email' %> +<%= render 'note_email' %> diff --git a/app/views/notify/note_issue_email.text.erb b/app/views/notify/note_issue_email.text.erb index 5585e7c3ee8..413d9e6e9ac 100644 --- a/app/views/notify/note_issue_email.text.erb +++ b/app/views/notify/note_issue_email.text.erb @@ -1 +1 @@ -<%= render partial: 'note_email' %> +<%= render 'note_email' %> diff --git a/app/views/notify/note_personal_snippet_email.text.erb b/app/views/notify/note_personal_snippet_email.text.erb index 5585e7c3ee8..413d9e6e9ac 100644 --- a/app/views/notify/note_personal_snippet_email.text.erb +++ b/app/views/notify/note_personal_snippet_email.text.erb @@ -1 +1 @@ -<%= render partial: 'note_email' %> +<%= render 'note_email' %> diff --git a/app/views/notify/note_snippet_email.text.erb b/app/views/notify/note_snippet_email.text.erb index 5585e7c3ee8..413d9e6e9ac 100644 --- a/app/views/notify/note_snippet_email.text.erb +++ b/app/views/notify/note_snippet_email.text.erb @@ -1 +1 @@ -<%= render partial: 'note_email' %> +<%= render 'note_email' %> |