summaryrefslogtreecommitdiff
path: root/app/helpers/commits_helper.rb
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-02-10 17:44:20 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-19 13:14:53 -0500
commitccd2a8d6b577e9a5a0ea3a350e6bc039550bc1ae (patch)
tree52b7b9e9a4608dd9c6aee759ee8644f56bd028e1 /app/helpers/commits_helper.rb
parent477ae66b4ddd3ace948f47c7bfa60085d6e320ae (diff)
downloadgitlab-ce-ccd2a8d6b577e9a5a0ea3a350e6bc039550bc1ae.tar.gz
Show a tooltip on revert link.
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r--app/helpers/commits_helper.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 17cf4ddcdc0..78e99202a27 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -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