diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -818,6 +818,20 @@ def person(author, show_attr="username_a return _author or _email +def author_string(email): + if email: + user = User.get_by_email(email, case_insensitive=True, cache=True) + if user: + if user.firstname or user.lastname: + return '%s %s <%s>' % (user.firstname, user.lastname, email) + else: + return email + else: + return email + else: + return None + + def person_by_id(id_, show_attr="username_and_name"): # attr to return from fetched user person_getter = lambda usr: getattr(usr, show_attr) diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less --- a/rhodecode/public/css/main.less +++ b/rhodecode/public/css/main.less @@ -670,6 +670,13 @@ label { } } +.user-inline-data { + display: inline-block; + float: left; + padding-left: .5em; + line-height: 1.3em; +} + .rc-user { // gravatar + user wrapper float: left; position: relative; @@ -1864,15 +1871,6 @@ h3.files_location{ } } -.file_author{ - margin-bottom: @padding; - - div{ - display: inline-block; - margin-right: 0.5em; - } -} - .browser-cur-rev{ margin-bottom: @textmargin; } diff --git a/rhodecode/public/css/summary.less b/rhodecode/public/css/summary.less --- a/rhodecode/public/css/summary.less +++ b/rhodecode/public/css/summary.less @@ -138,6 +138,10 @@ .summary .sidebar-right-content { margin-bottom: @space; + + .rc-user { + min-width: 0; + } } .fieldset { diff --git a/rhodecode/templates/admin/admin_log.html b/rhodecode/templates/admin/admin_log.html --- a/rhodecode/templates/admin/admin_log.html +++ b/rhodecode/templates/admin/admin_log.html @@ -1,4 +1,6 @@ ## -*- coding: utf-8 -*- +<%namespace name="base" file="/base/base.html"/> + %if c.users_log:
- %if l.user is not None: - ${h.link_to(l.user.username,h.url('edit_user', user_id=l.user.user_id))} - %else: - ${l.username} - %endif + %if l.user is not None: + ${base.gravatar_with_user(l.user.email)} + %else: + ${l.username} + %endif | ${h.action_parser(l)[0]()}
diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html
--- a/rhodecode/templates/base/base.html
+++ b/rhodecode/templates/base/base.html
@@ -135,8 +135,9 @@
<%def name="gravatar_with_user(contact, size=16, show_disabled=False)">
-
- ${self.gravatar(h.email_or_none(contact), size)}
+ <% email = h.email_or_none(contact) %>
+
+ ${self.gravatar(email, size)}
${h.link_to_user(contact)}
%def>
diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html
--- a/rhodecode/templates/changelog/changelog.html
+++ b/rhodecode/templates/changelog/changelog.html
@@ -131,8 +131,7 @@
%endif
|
- ${self.gravatar(h.email_or_none(commit.author))} - ${h.link_to_user(commit.author, length=22)} + ${self.gravatar_with_user(commit.author)} | ${h.age_component(commit.date)} diff --git a/rhodecode/templates/changelog/changelog_summary_data.html b/rhodecode/templates/changelog/changelog_summary_data.html --- a/rhodecode/templates/changelog/changelog_summary_data.html +++ b/rhodecode/templates/changelog/changelog_summary_data.html @@ -43,8 +43,7 @@ | - ${base.gravatar(h.email_or_none(cs.author), 16)} - ${h.link_to_user(cs.author, length=22)} + ${base.gravatar_with_user(cs.author)} |
diff --git a/rhodecode/templates/data_table/_dt_elements.html b/rhodecode/templates/data_table/_dt_elements.html
--- a/rhodecode/templates/data_table/_dt_elements.html
+++ b/rhodecode/templates/data_table/_dt_elements.html
@@ -103,7 +103,9 @@
%def>
<%def name="user_gravatar(email, size=16)">
+
% if c.authors:
-
${base.gravatar(email, 16)}
+
%def>
<%def name="repo_actions(repo_name, super_user=True)">
diff --git a/rhodecode/templates/files/file_authors_box.html b/rhodecode/templates/files/file_authors_box.html
--- a/rhodecode/templates/files/file_authors_box.html
+++ b/rhodecode/templates/files/file_authors_box.html
@@ -12,24 +12,18 @@
|