summaryrefslogtreecommitdiff
path: root/app/views/projects/notes
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-20 18:57:10 +0200
committerDouwe Maan <douwe@selenight.nl>2016-07-06 18:50:59 -0400
commit375193455aa5cb752f1035a6cc69160170a58477 (patch)
treee54ec42a455c02ab61ead34268841ef19ae339b4 /app/views/projects/notes
parent4c1bf77c7fd3e62be4b9f6fd54520db0f7fc346b (diff)
downloadgitlab-ce-375193455aa5cb752f1035a6cc69160170a58477.tar.gz
Style diff and blob file headers the same way
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r--app/views/projects/notes/discussions/_diff_with_notes.html.haml19
1 files changed, 8 insertions, 11 deletions
diff --git a/app/views/projects/notes/discussions/_diff_with_notes.html.haml b/app/views/projects/notes/discussions/_diff_with_notes.html.haml
index 6401245bf73..b924ed31b42 100644
--- a/app/views/projects/notes/discussions/_diff_with_notes.html.haml
+++ b/app/views/projects/notes/discussions/_diff_with_notes.html.haml
@@ -1,16 +1,13 @@
- note = discussion_notes.first
-- diff = note.diff
-- return unless diff
+- diff_file = note.diff_file
+- return unless diff_file
+
+- blob = note.blob
+
+.diff-file.file-holder
+ .file-title
+ = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_file.content_commit, project: note.project, url: diff_note_path(note)
-.diff-file
- .diff-header
- %span
- - if diff.deleted_file
- = diff.old_path
- - else
- = diff.new_path
- - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
- %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
.diff-content.code.js-syntax-highlight
%table
- note.truncated_diff_lines.each do |line|