summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-08 18:52:55 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-09 17:23:08 -0500
commitcc37d1dfa11691f2d8357151d4b722b3d114881e (patch)
tree7a92d6ac84f5e5827ce959d7a04e27f45e1db503
parentecc6cc8be75b5c66fdf7f5595b71aabf9366a5e1 (diff)
downloadgitlab-ce-cc37d1dfa11691f2d8357151d4b722b3d114881e.tar.gz
Remove unused toggle from diff discussion diff headersdm-discussion-diff-header-toggle
-rw-r--r--app/views/discussions/_diff_with_notes.html.haml2
-rw-r--r--app/views/projects/diffs/_file_header.html.haml6
2 files changed, 6 insertions, 2 deletions
diff --git a/app/views/discussions/_diff_with_notes.html.haml b/app/views/discussions/_diff_with_notes.html.haml
index 78c5b0c1dda..c3f55ff821f 100644
--- a/app/views/discussions/_diff_with_notes.html.haml
+++ b/app/views/discussions/_diff_with_notes.html.haml
@@ -3,7 +3,7 @@
.diff-file.file-holder
.js-file-title.file-title
- = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_file.content_commit, project: discussion.project, url: discussion_path(discussion)
+ = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_file.content_commit, project: discussion.project, url: discussion_path(discussion), show_toggle: false
.diff-content.code.js-syntax-highlight
%table
diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml
index 7d6b3701f95..4e4fdb73ae3 100644
--- a/app/views/projects/diffs/_file_header.html.haml
+++ b/app/views/projects/diffs/_file_header.html.haml
@@ -1,4 +1,8 @@
-%i.fa.diff-toggle-caret.fa-fw
+- show_toggle = local_assigns.fetch(:show_toggle, true)
+
+- if show_toggle
+ %i.fa.diff-toggle-caret.fa-fw
+
- if defined?(blob) && blob && diff_file.submodule?
%span
= icon('archive fw')