Show tooltip with author email for commit
This commit is contained in:
parent
06e98c0f9b
commit
2db010b6a3
2 changed files with 14 additions and 2 deletions
|
@ -440,6 +440,13 @@
|
|||
|
||||
.ui-box.commit-box {
|
||||
margin-top: 0;
|
||||
|
||||
.commit-committer-link,
|
||||
.commit-author-link {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 1px #FFF;
|
||||
}
|
||||
}
|
||||
|
||||
.commit-stat-summary {
|
||||
|
|
|
@ -167,10 +167,15 @@ module CommitsHelper
|
|||
|
||||
user = User.where('name like ? or email like ?', source_name, source_email).first
|
||||
|
||||
options = {
|
||||
class: "commit-#{options[:source]}-link has_tooltip",
|
||||
data: { :'original-title' => sanitize(source_email) }
|
||||
}
|
||||
|
||||
if user.nil?
|
||||
mail_to(source_email, text.html_safe, class: "commit-#{options[:source]}-link")
|
||||
mail_to(source_email, text.html_safe, options)
|
||||
else
|
||||
link_to(text.html_safe, user_path(user), class: "commit-#{options[:source]}-link")
|
||||
link_to(text.html_safe, user_path(user), options)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue