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>2021-01-08 21:10:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-08 21:10:43 +0300
commit9bcb655610575956a858ae6fdb1d00deef5f6ad8 (patch)
tree8c2e013c86cf94d2596655bceab865feef53bd38 /app/helpers/commits_helper.rb
parent6e734c809b18a0470d81c78e1ecd9b3f8278de89 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r--app/helpers/commits_helper.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 02d48386e31..e6e2b5b128b 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -110,8 +110,16 @@ module CommitsHelper
end
end
- def revert_commit_link(commit, continue_to_path, btn_class: nil, has_tooltip: true)
- commit_action_link('revert', commit, continue_to_path, btn_class: btn_class, has_tooltip: has_tooltip)
+ def revert_commit_link(commit, continue_to_path, btn_class: nil, pajamas: false)
+ return unless current_user
+
+ action = 'revert'
+
+ if pajamas && can_collaborate_with_project?(@project)
+ tag(:div, data: { display_text: action.capitalize }, class: "js-revert-commit-trigger")
+ else
+ commit_action_link(action, commit, continue_to_path, btn_class: btn_class, has_tooltip: false)
+ end
end
def cherry_pick_commit_link(commit, continue_to_path, btn_class: nil, has_tooltip: true)