From: Chuck Hagenbuch Date: Mon, 6 Dec 2010 03:27:00 +0000 (-0500) Subject: Show Gravatars for authors in the commit log partial X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=151eb2c35730c8b38c187846eaaa8c1360a1d47a;p=horde.git Show Gravatars for authors in the commit log partial --- diff --git a/chora/app/views/_logMessage.html.php b/chora/app/views/_logMessage.html.php index a02b2e095..c9be18ce9 100644 --- a/chora/app/views/_logMessage.html.php +++ b/chora/app/views/_logMessage.html.php @@ -33,6 +33,9 @@
queryLog()) ?>
+
+ +
queryAuthor(), true) ?>
queryDate()) ?>
diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index 045bdd760..e0b84dfc4 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -442,6 +442,26 @@ class Chora return htmlspecialchars($name); } + public function getAuthorEmail($name) + { + try { + $users = $GLOBALS['VC']->getUsers($GLOBALS['conf']['paths']['cvsusers']); + if (isset($users[$name])) { + return $users[$name]['mail']; + } + } catch (Horde_Vcs_Exception $e) {} + + try { + $parser = new Horde_Mail_Rfc822(); + $results = $parser->parseAddressList($name); + if (count($results)) { + return $results[0]->mailbox . '@' . $results[0]->host; + } + } catch (Horde_Mail_Exception $e) {} + + return $name; + } + /** * Return formatted date information. * diff --git a/chora/themes/default/screen.css b/chora/themes/default/screen.css index 23c6cbf3b..39ea79f8d 100644 --- a/chora/themes/default/screen.css +++ b/chora/themes/default/screen.css @@ -179,7 +179,12 @@ h3.file-view-header { list-style: none; margin-bottom: .5em; } -.commit-author { +.commit-author-avatar { + float: left; + margin-right: .5em; + padding: 2px; + background: #fff; + border: 1px solid #ddd; } ul.commit-filelist {