summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_file.html.haml
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-09-29 14:48:05 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-09-29 14:48:05 +0200
commitda4eff4addb89caa8afebf7ec9fb836864a9255e (patch)
tree115904d73c44ad37454753c3ed7661ab9b453d22 /app/views/projects/diffs/_file.html.haml
parent376e004c16510174dd29ab2953ebdbb28ce2e91b (diff)
downloadgitlab-ce-da4eff4addb89caa8afebf7ec9fb836864a9255e.tar.gz
Only show text wrap and diff notes for text in MR.
Diffstat (limited to 'app/views/projects/diffs/_file.html.haml')
-rw-r--r--app/views/projects/diffs/_file.html.haml19
1 files changed, 10 insertions, 9 deletions
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index be9389172b7..751df6a02e9 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -15,15 +15,16 @@
%span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}"
.diff-btn-group
- - unless params[:view] == 'parallel'
- %label
- = check_box_tag nil, 1, false, class: "js-toggle-diff-line-wrap"
- Wrap text
- &nbsp;
- = link_to "#", class: "js-toggle-diff-comments btn btn-small" do
- %i.icon-chevron-down
- Diff comments
- &nbsp;
+ - if blob.text?
+ - unless params[:view] == 'parallel'
+ %label
+ = check_box_tag nil, 1, false, class: 'js-toggle-diff-line-wrap'
+ Wrap text
+ &nbsp;
+ = link_to '#', class: 'js-toggle-diff-comments btn btn-small' do
+ %i.icon-chevron-down
+ Diff comments
+ &nbsp;
- if @merge_request && @merge_request.source_project
= link_to project_edit_tree_path(@merge_request.source_project, tree_join(@merge_request.source_branch, diff_file.new_path), from_merge_request_id: @merge_request.id), { class: 'btn btn-small' } do