diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-12 17:24:49 -0600 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-12-21 02:36:05 -0500 |
commit | 35adeee5148eddebc003abcd690ad01a50219bde (patch) | |
tree | 0cac0815ff16b80241f6111bb577b9e5b845d80a /app/helpers/commits_helper.rb | |
parent | 528c3e2b8d2d65257e489601220f34b918b80e17 (diff) | |
download | gitlab-ce-35adeee5148eddebc003abcd690ad01a50219bde.tar.gz |
homogenize revert and cherry-pick button styles generated by commits_helper
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r-- | app/helpers/commits_helper.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 66a720a9426..4d61833d624 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -131,9 +131,9 @@ module CommitsHelper return unless current_user tooltip = "Revert this #{commit.change_type_title(current_user)} in a new merge request" if has_tooltip + btn_class = "btn btn-warning btn-#{btn_class}" unless btn_class.nil? if can_collaborate_with_project? - btn_class = "btn btn-warning btn-#{btn_class}" unless btn_class.nil? link_to 'Revert', '#modal-revert-commit', 'data-toggle' => 'modal', 'data-container' => 'body', title: (tooltip if has_tooltip), class: "#{btn_class} #{'has-tooltip' if has_tooltip}" elsif can?(current_user, :fork_project, @project) continue_params = { @@ -145,8 +145,6 @@ module CommitsHelper namespace_key: current_user.namespace.id, continue: continue_params) - btn_class = "btn btn-grouped btn-warning" unless btn_class.nil? - link_to 'Revert', fork_path, class: btn_class, method: :post, 'data-toggle' => 'tooltip', 'data-container' => 'body', title: (tooltip if has_tooltip) end end @@ -154,10 +152,10 @@ module CommitsHelper def cherry_pick_commit_link(commit, continue_to_path, btn_class: nil, has_tooltip: true) return unless current_user - tooltip = "Cherry-pick this #{commit.change_type_title(current_user)} in a new merge request" + tooltip = "Cherry-pick this #{commit.change_type_title(current_user)} in a new merge request" if has_tooltip + btn_class = "btn btn-default btn-#{btn_class}" unless btn_class.nil? if can_collaborate_with_project? - btn_class = "btn btn-default btn-#{btn_class}" unless btn_class.nil? link_to 'Cherry-pick', '#modal-cherry-pick-commit', 'data-toggle' => 'modal', 'data-container' => 'body', title: (tooltip if has_tooltip), class: "#{btn_class} #{'has-tooltip' if has_tooltip}" elsif can?(current_user, :fork_project, @project) continue_params = { @@ -169,8 +167,7 @@ module CommitsHelper namespace_key: current_user.namespace.id, continue: continue_params) - btn_class = "btn btn-grouped btn-close" unless btn_class.nil? - link_to 'Cherry-pick', fork_path, class: "#{btn_class}", method: :post, 'data-toggle' => 'tooltip', 'data-container' => 'body', title: (tooltip if has_tooltip) + link_to 'Cherry-pick', fork_path, class: btn_class, method: :post, 'data-toggle' => 'tooltip', 'data-container' => 'body', title: (tooltip if has_tooltip) end end |