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
return unless current_user
if show_modal_condition
link_to('Revert', '#modal-revert-commit',
'data-target' => '#modal-revert-commit',
'data-toggle' => 'modal',
class: "btn btn-close btn-#{btn_class}",
title: 'Create merge request to revert commit'
)
content_tag :span, 'data-toggle' => 'modal', 'data-target' => '#modal-revert-commit' do
link_to 'Revert', '#modal-revert-commit', 'data-toggle' => 'tooltip',
'data-original-title' => 'Create merge request to revert commit', class: "btn btn-close btn-#{btn_class}"
end
else
continue_params = {
to: continue_to_path,
......@@ -145,7 +143,7 @@ module CommitsHelper
)
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
......
......@@ -7,7 +7,7 @@
.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-group.branch
= label_tag 'target_branch', 'Target branch', class: 'control-label'
= label_tag 'target_branch', 'Revert in branch:', class: 'control-label'
.col-sm-10
= select_tag "target_branch", grouped_options_refs, class: "select2 select2-sm js-target-branch"
- 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