summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-06 18:07:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-06 18:07:44 +0000
commite1867c38fc5a4b931b4b2256d4909182e94f1051 (patch)
tree3047b637f7f9a31e74c62d3fe054b24c95e3534e /app/helpers/blob_helper.rb
parent63894d59abd34f76f399d755012cdcd32c5b1103 (diff)
downloadgitlab-ce-e1867c38fc5a4b931b4b2256d4909182e94f1051.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index 659f9778892..656e6039dbd 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -215,14 +215,29 @@ module BlobHelper
return if blob.binary? || blob.stored_externally?
title = _('Open raw')
- link_to icon('file-code-o'), blob_raw_path, class: 'btn btn-sm has-tooltip', target: '_blank', rel: 'noopener noreferrer', title: title, data: { container: 'body' }
+ link_to sprite_icon('doc-code'),
+ external_storage_url_or_path(blob_raw_path),
+ class: 'btn btn-sm has-tooltip',
+ target: '_blank',
+ rel: 'noopener noreferrer',
+ aria: { label: title },
+ title: title,
+ data: { container: 'body' }
end
def download_blob_button(blob)
return if blob.empty?
title = _('Download')
- link_to sprite_icon('download'), blob_raw_path(inline: false), download: @path, class: 'btn btn-sm has-tooltip', target: '_blank', rel: 'noopener noreferrer', title: title, data: { container: 'body' }
+ link_to sprite_icon('download'),
+ external_storage_url_or_path(blob_raw_path(inline: false)),
+ download: @path,
+ class: 'btn btn-sm has-tooltip',
+ target: '_blank',
+ rel: 'noopener noreferrer',
+ aria: { label: title },
+ title: title,
+ data: { container: 'body' }
end
def blob_render_error_reason(viewer)