Commit 2db010b6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show tooltip with author email for commit

parent 06e98c0f
...@@ -440,6 +440,13 @@ ...@@ -440,6 +440,13 @@
.ui-box.commit-box { .ui-box.commit-box {
margin-top: 0; margin-top: 0;
.commit-committer-link,
.commit-author-link {
color: #333;
font-weight: bold;
text-shadow: 0 1px 1px #FFF;
}
} }
.commit-stat-summary { .commit-stat-summary {
......
...@@ -167,10 +167,15 @@ module CommitsHelper ...@@ -167,10 +167,15 @@ module CommitsHelper
user = User.where('name like ? or email like ?', source_name, source_email).first 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? if user.nil?
mail_to(source_email, text.html_safe, class: "commit-#{options[:source]}-link") mail_to(source_email, text.html_safe, options)
else 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 end
end end
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