summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/viewers/_text.html.haml
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-05-23 12:36:41 -0500
committerClement Ho <ClemMakesApps@gmail.com>2017-06-06 10:39:23 -0500
commit7b533ef7f140450783485b01cdf0434b77a9f90e (patch)
tree16c4bb003c74c02e858ef835602e87e5709b327d /app/views/projects/diffs/viewers/_text.html.haml
parentd07e85e1033f8026f155c6171cb3ebcd6b93d9ed (diff)
downloadgitlab-ce-7b533ef7f140450783485b01cdf0434b77a9f90e.tar.gz
Change from double click to single click to open dropdownch-test-2
Diffstat (limited to 'app/views/projects/diffs/viewers/_text.html.haml')
-rw-r--r--app/views/projects/diffs/viewers/_text.html.haml8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/projects/diffs/viewers/_text.html.haml b/app/views/projects/diffs/viewers/_text.html.haml
new file mode 100644
index 00000000000..e4b89671724
--- /dev/null
+++ b/app/views/projects/diffs/viewers/_text.html.haml
@@ -0,0 +1,8 @@
+- blob = diff_file.blob
+- blob.load_all_data!(diff_file.repository)
+- total_lines = blob.lines.size
+- total_lines -= 1 if total_lines > 0 && blob.lines.last.blank?
+- if diff_view == :parallel
+ = render "projects/diffs/parallel_view", diff_file: diff_file, total_lines: total_lines
+- else
+ = render "projects/diffs/text_file", diff_file: diff_file, total_lines: total_lines