summaryrefslogtreecommitdiff
path: root/app/views/notify
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-11-17 22:22:39 +0000
committerSean McGivern <sean@gitlab.com>2016-11-28 19:40:48 +0000
commit854fbbfb07b84394cc952d0ae20b7f29957e6555 (patch)
treecd6ba08f6a0a1d2205a1ef651e4cba8ba7f35a9b /app/views/notify
parent938de31167e262cb3eb952f6be1797b4c891d34c (diff)
downloadgitlab-ce-854fbbfb07b84394cc952d0ae20b7f29957e6555.tar.gz
Tidy up text emails
Diffstat (limited to 'app/views/notify')
-rw-r--r--app/views/notify/_note_mr_or_commit_email.text.erb2
-rw-r--r--app/views/notify/_simple_diff.text.erb2
-rw-r--r--app/views/notify/note_commit_email.text.erb4
-rw-r--r--app/views/notify/note_merge_request_email.text.erb4
4 files changed, 4 insertions, 8 deletions
diff --git a/app/views/notify/_note_mr_or_commit_email.text.erb b/app/views/notify/_note_mr_or_commit_email.text.erb
index 3dd1b4d4c0e..b4fcdf6b1e9 100644
--- a/app/views/notify/_note_mr_or_commit_email.text.erb
+++ b/app/views/notify/_note_mr_or_commit_email.text.erb
@@ -1,4 +1,4 @@
-<% if @note.diff_note? && @note.diff_file -%>
+<% if @discussion && @discussion.diff_file -%>
on <%= @note.diff_file.file_path -%>
<% end -%>:
diff --git a/app/views/notify/_simple_diff.text.erb b/app/views/notify/_simple_diff.text.erb
index 58b0018c0ca..c28d1cc34d3 100644
--- a/app/views/notify/_simple_diff.text.erb
+++ b/app/views/notify/_simple_diff.text.erb
@@ -1,3 +1,3 @@
<% @discussion.truncated_diff_lines(highlight: false).each do |line| %>
- <%= "> " + line.text %>
+> <%= line.text %>
<% end %>
diff --git a/app/views/notify/note_commit_email.text.erb b/app/views/notify/note_commit_email.text.erb
index dc764b61659..6aa085a172e 100644
--- a/app/views/notify/note_commit_email.text.erb
+++ b/app/views/notify/note_commit_email.text.erb
@@ -1,4 +1,2 @@
-<% url = url_for(namespace_project_commit_url(@note.project.namespace, @note.project, id: @commit.id, anchor: "note_#{@note.id}")) %>
-
New comment for Commit <%= @commit.short_id -%>
-<%= render partial: 'note_mr_or_commit_email', locals: { url: url } %>
+<%= render partial: 'note_mr_or_commit_email', locals: { url: @target_url } %>
diff --git a/app/views/notify/note_merge_request_email.text.erb b/app/views/notify/note_merge_request_email.text.erb
index e33d15daded..2ce64c494cf 100644
--- a/app/views/notify/note_merge_request_email.text.erb
+++ b/app/views/notify/note_merge_request_email.text.erb
@@ -1,4 +1,2 @@
-<% url = url_for(namespace_project_merge_request_url(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")) %>
-
New comment for Merge Request <%= @merge_request.to_reference -%>
-<%= render partial: 'note_mr_or_commit_email', locals: { url: url }%>
+<%= render partial: 'note_mr_or_commit_email', locals: { url: @target_url }%>