summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_blob.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-04-10 21:23:19 +0000
committerRobert Speicher <robert@gitlab.com>2017-04-10 21:23:19 +0000
commitfb8a12c8fea422a9054fcbdb2e6b22770e9dfab3 (patch)
treedd8b86df7d03857238a994683a6b7f5014208570 /app/views/projects/blob/_blob.html.haml
parent520ed0781cc86f3c158b3ebcfb2457dba3b41a6e (diff)
downloadgitlab-ce-fb8a12c8fea422a9054fcbdb2e6b22770e9dfab3.tar.gz
Don't show 'Copy content' button on text files that are not rendered as text
Diffstat (limited to 'app/views/projects/blob/_blob.html.haml')
-rw-r--r--app/views/projects/blob/_blob.html.haml8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml
index aa9b852035e..fd0ae42571e 100644
--- a/app/views/projects/blob/_blob.html.haml
+++ b/app/views/projects/blob/_blob.html.haml
@@ -32,4 +32,10 @@
= link_to 'Fork', fork_path, method: :post, class: 'btn btn-grouped btn-inverted btn-new'
%button.js-cancel-fork-suggestion.btn.btn-grouped{ type: 'button' }
Cancel
- = render blob.to_partial_path(@project), blob: blob
+
+ - if blob.empty?
+ .file-content.code
+ .nothing-here-block
+ Empty file
+ - else
+ = render blob.to_partial_path(@project), blob: blob