Index: app/models/user.rb =================================================================== --- app/models/user.rb (revision 1747) +++ app/models/user.rb (working copy) @@ -265,6 +265,12 @@ anonymous_user end + def self.author_to_name(author, formatter = nil) + return author if author == "" + user = find(:first, :conditions => ["login=?", author]) + return (user ? user.name(formatter) : author) + end + private # Return password digest def self.hash_password(clear_password) Index: app/controllers/repositories_controller.rb =================================================================== --- app/controllers/repositories_controller.rb (revision 1747) +++ app/controllers/repositories_controller.rb (working copy) @@ -268,7 +268,7 @@ changes_data = changes_data + [0]*(10 - changes_data.length) if changes_data.length<10 # Remove email adress in usernames - fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') } + fields = fields.collect {|c| User.author_to_name(c.gsub(%r{<.+@.+>}, ''))+" " } graph = SVG::Graph::BarHorizontal.new( :height => 400, Index: app/views/repositories/revision.rhtml =================================================================== --- app/views/repositories/revision.rhtml (revision 1747) +++ app/views/repositories/revision.rhtml (working copy) @@ -22,7 +22,7 @@

<%= l(:label_revision) %> <%= format_revision(@changeset.revision) %>

<% if @changeset.scmid %>ID: <%= @changeset.scmid %>
<% end %> -<%= @changeset.committer.to_s.split('<').first %>, <%= format_time(@changeset.committed_on) %>

+<%= User.author_to_name(@changeset.committer.to_s.split('<').first) %>, <%= format_time(@changeset.committed_on) %>

<%= textilizable @changeset.comments %> Index: app/views/repositories/_revisions.rhtml =================================================================== --- app/views/repositories/_revisions.rhtml (revision 1747) +++ app/views/repositories/_revisions.rhtml (working copy) @@ -17,7 +17,7 @@ <%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %> <%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %> <%= format_time(changeset.committed_on) %> -<%=h changeset.committer.to_s.split('<').first %> +<%=h User.author_to_name(changeset.committer.to_s.split('<').first) %> <%= textilizable(changeset.comments) %> <% line_num += 1 %> Index: app/views/repositories/_dir_list_content.rhtml =================================================================== --- app/views/repositories/_dir_list_content.rhtml (revision 1747) +++ app/views/repositories/_dir_list_content.rhtml (working copy) @@ -17,7 +17,7 @@ <%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %> <%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> -<%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %> +<%=h(User.author_to_name(entry.lastrev.author.to_s.split('<').first)) if entry.lastrev %> <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> <%=h truncate(changeset.comments, 50) unless changeset.nil? %> Index: app/views/repositories/annotate.rhtml =================================================================== --- app/views/repositories/annotate.rhtml (revision 1747) +++ app/views/repositories/annotate.rhtml (working copy) @@ -12,7 +12,7 @@ <%= line_num %> <%= (revision.identifier ? link_to(format_revision(revision.identifier), :action => 'revision', :id => @project, :rev => revision.identifier) : format_revision(revision.revision)) if revision %> - <%= h(revision.author.to_s.split('<').first) if revision %> + <%= h(User.author_to_name(revision.author.to_s.split('<').first)) if revision %>
<%= line %>
<% line_num += 1 %> Index: app/views/projects/activity.rhtml =================================================================== --- app/views/projects/activity.rhtml (revision 1747) +++ app/views/projects/activity.rhtml (working copy) @@ -11,7 +11,7 @@ <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> <%= link_to format_activity_title(e.event_title), e.event_url %>
<%= format_activity_description(e.event_description) %> - <%= e.event_author if e.respond_to?(:event_author) %>
+ <%= (e.event_type=="changeset" ? User.author_to_name(e.event_author) : e.event_author) if e.respond_to?(:event_author) %> <% end -%> <% end -%>