Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-02 18:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-02 18:09:08 +0300
commit840d5ecdbbf8da3e03a7f0b8b465a89d1519807c (patch)
tree4e197815c026a947057f7b5cbcb5e3cf106cc22f /app/helpers/commits_helper.rb
parentb0107e8756bf3287f8a6221252c800209a9c46f6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r--app/helpers/commits_helper.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 2a0c2e73dd6..680a1a5a919 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -181,15 +181,11 @@ module CommitsHelper
end
def view_file_button(commit_sha, diff_new_path, project, replaced: false)
+ path = project_blob_path(project, tree_join(commit_sha, diff_new_path))
title = replaced ? _('View replaced file @ ') : _('View file @ ')
- link_to(
- project_blob_path(project,
- tree_join(commit_sha, diff_new_path)),
- class: 'btn view-file js-view-file'
- ) do
- raw(title) + content_tag(:span, Commit.truncate_sha(commit_sha),
- class: 'commit-sha')
+ link_to(path, class: 'btn') do
+ raw(title) + content_tag(:span, truncate_sha(commit_sha), class: 'commit-sha')
end
end