Commit 2db010b6a39da4a3737e63d86dbdb3390e6ca863
1 parent
06e98c0f
Exists in
master
and in
4 other branches
Show tooltip with author email for commit
Showing
2 changed files
with
14 additions
and
2 deletions
Show diff stats
app/assets/stylesheets/sections/commits.scss
app/helpers/commits_helper.rb
... | ... | @@ -167,10 +167,15 @@ module CommitsHelper |
167 | 167 | |
168 | 168 | user = User.where('name like ? or email like ?', source_name, source_email).first |
169 | 169 | |
170 | + options = { | |
171 | + class: "commit-#{options[:source]}-link has_tooltip", | |
172 | + data: { :'original-title' => sanitize(source_email) } | |
173 | + } | |
174 | + | |
170 | 175 | if user.nil? |
171 | - mail_to(source_email, text.html_safe, class: "commit-#{options[:source]}-link") | |
176 | + mail_to(source_email, text.html_safe, options) | |
172 | 177 | else |
173 | - link_to(text.html_safe, user_path(user), class: "commit-#{options[:source]}-link") | |
178 | + link_to(text.html_safe, user_path(user), options) | |
174 | 179 | end |
175 | 180 | end |
176 | 181 | end | ... | ... |