Add has_tooltip bool handling for commit_person_link
This commit is contained in:
parent
58803cd8e0
commit
14f31eb996
|
@ -145,15 +145,18 @@ module CommitsHelper
|
||||||
person_name
|
person_name
|
||||||
end
|
end
|
||||||
|
|
||||||
options = {
|
link_options = {
|
||||||
class: "commit-#{options[:source]}-link has-tooltip",
|
class: "commit-#{options[:source]}-link",
|
||||||
title: source_email
|
|
||||||
}
|
}
|
||||||
|
unless options[:has_tooltip] == false
|
||||||
|
link_options[:class] << ' has-tooltip'
|
||||||
|
link_options[:title] = source_email
|
||||||
|
end
|
||||||
|
|
||||||
if user.nil?
|
if user.nil?
|
||||||
mail_to(source_email, text, options)
|
mail_to(source_email, text, link_options)
|
||||||
else
|
else
|
||||||
link_to(text, user_path(user), options)
|
link_to(text, user_path(user), link_options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue