Commit ccd2a8d6 authored by Rubén Dávila's avatar Rubén Dávila Committed by Robert Speicher

Show a tooltip on revert link.

parent 477ae66b
...@@ -127,12 +127,10 @@ module CommitsHelper ...@@ -127,12 +127,10 @@ module CommitsHelper
return unless current_user return unless current_user
if show_modal_condition if show_modal_condition
link_to('Revert', '#modal-revert-commit', content_tag :span, 'data-toggle' => 'modal', 'data-target' => '#modal-revert-commit' do
'data-target' => '#modal-revert-commit', link_to 'Revert', '#modal-revert-commit', 'data-toggle' => 'tooltip',
'data-toggle' => 'modal', 'data-original-title' => 'Create merge request to revert commit', class: "btn btn-close btn-#{btn_class}"
class: "btn btn-close btn-#{btn_class}", end
title: 'Create merge request to revert commit'
)
else else
continue_params = { continue_params = {
to: continue_to_path, to: continue_to_path,
...@@ -145,7 +143,7 @@ module CommitsHelper ...@@ -145,7 +143,7 @@ module CommitsHelper
) )
link_to 'Revert', fork_path, class: 'btn btn-grouped btn-close', method: :post, link_to 'Revert', fork_path, class: 'btn btn-grouped btn-close', method: :post,
title: 'Create merge request to revert commit' 'data-toggle' => 'tooltip', 'data-original-title' => 'Create merge request to revert commit'
end end
end end
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.modal-body .modal-body
= form_tag revert_namespace_project_commit_path(@project.namespace, @project, commit_id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-requires-input' do = form_tag revert_namespace_project_commit_path(@project.namespace, @project, commit_id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-requires-input' do
.form-group.branch .form-group.branch
= label_tag 'target_branch', 'Target branch', class: 'control-label' = label_tag 'target_branch', 'Revert in branch:', class: 'control-label'
.col-sm-10 .col-sm-10
= select_tag "target_branch", grouped_options_refs, class: "select2 select2-sm js-target-branch" = select_tag "target_branch", grouped_options_refs, class: "select2 select2-sm js-target-branch"
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment