From 2db010b6a39da4a3737e63d86dbdb3390e6ca863 Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Sat, 27 Jul 2013 10:40:38 +0300
Subject: [PATCH] Show tooltip with author email for commit

---
 app/assets/stylesheets/sections/commits.scss | 7 +++++++
 app/helpers/commits_helper.rb                | 9 +++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index 50544535c3d..1a2c5e76706 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -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 {
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 86979156d94..111e1cda19c 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -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
-- 
GitLab