Commit 2db010b6a39da4a3737e63d86dbdb3390e6ca863

Authored by Dmitriy Zaporozhets
1 parent 06e98c0f

Show tooltip with author email for commit

app/assets/stylesheets/sections/commits.scss
... ... @@ -440,6 +440,13 @@
440 440  
441 441 .ui-box.commit-box {
442 442 margin-top: 0;
  443 +
  444 + .commit-committer-link,
  445 + .commit-author-link {
  446 + color: #333;
  447 + font-weight: bold;
  448 + text-shadow: 0 1px 1px #FFF;
  449 + }
443 450 }
444 451  
445 452 .commit-stat-summary {
... ...
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
... ...