summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2018-07-17 16:28:20 +0100
committerLuke Bennett <lukeeeebennettplus@gmail.com>2018-07-17 16:28:20 +0100
commit14f31eb9963efbaa823845d8c5b77bf5d818fa9a (patch)
treeab6e98239d6fbd3545738f9016295256fbca2642
parent58803cd8e0939a57df48547fa770434d9ea1f9e1 (diff)
downloadgitlab-ce-14f31eb9963efbaa823845d8c5b77bf5d818fa9a.tar.gz
Add has_tooltip bool handling for commit_person_link
-rw-r--r--app/helpers/commits_helper.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index e5c3be47801..2b06b99021d 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -145,15 +145,18 @@ module CommitsHelper
person_name
end
- options = {
- class: "commit-#{options[:source]}-link has-tooltip",
- title: source_email
+ link_options = {
+ class: "commit-#{options[:source]}-link",
}
+ unless options[:has_tooltip] == false
+ link_options[:class] << ' has-tooltip'
+ link_options[:title] = source_email
+ end
if user.nil?
- mail_to(source_email, text, options)
+ mail_to(source_email, text, link_options)
else
- link_to(text, user_path(user), options)
+ link_to(text, user_path(user), link_options)
end
end