diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-03-29 16:13:39 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-26 14:01:40 -0500 |
commit | f0bdf5c692fbfe7623eda509f17fe34f7424f141 (patch) | |
tree | bb1cf6d480e757070a664417fcaf7e53cd126d40 /app | |
parent | d8d00b5bc29f7b89f95c436cd6900d1548f111b7 (diff) | |
download | gitlab-ce-f0bdf5c692fbfe7623eda509f17fe34f7424f141.tar.gz |
Hide whitespace toggle button for new merge requests
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/diffs/_diffs.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_new_submit.html.haml | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index fbfff9bc895..6d2b85ed994 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -1,3 +1,4 @@ +- show_whitespace_toggle = local_assigns.fetch :show_whitespace_toggle, true - if diff_view == 'parallel' - fluid_layout true @@ -5,10 +6,11 @@ .content-block.oneline-block.files-changed .inline-parallel-buttons - - if current_controller?(:commit) - = commit_diff_whitespace_link(@project, @commit) - - if current_controller?(:merge_requests) - = diff_merge_request_whitespace_link(@project, @merge_request) + - if show_whitespace_toggle + - if current_controller?(:commit) + = commit_diff_whitespace_link(@project, @commit) + - if current_controller?(:merge_requests) + = diff_merge_request_whitespace_link(@project, @merge_request) .btn-group = inline_diff_btn = parallel_diff_btn diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml index 2f14a91e64f..18b3f9e1549 100644 --- a/app/views/projects/merge_requests/_new_submit.html.haml +++ b/app/views/projects/merge_requests/_new_submit.html.haml @@ -42,7 +42,7 @@ %h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits. %p To preserve performance the line changes are not shown. - else - = render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs + = render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs, show_whitespace_toggle: false - if @ci_commit #builds.builds.tab-pane = render "projects/merge_requests/show/builds" |