Skip to content

Commit

Permalink
[webui] if the user can't be found in commit history, then don't put …
Browse files Browse the repository at this point in the history
…up invalid links
  • Loading branch information
coolo committed Mar 27, 2012
1 parent 360ad5e commit 2fac25e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/webui/app/views/package/_commit_item.html.erb
Expand Up @@ -3,13 +3,17 @@
<% if commit[:user] == "_service" %>
<%= image_tag('icons/cog.png') %> automatic update by service
<% else %>
<% user = commit[:user] || '-' %>
<% realname = Person.realname_for_login(user) %>
<%= user_icon(user) %>
<% if not realname.empty? %>
<%= link_to(realname + " (" + user + ")", :controller => :home, :user => user) %>
<% user = Person.find_hashed(commit[:user]) %>
<% if user["login"] %>
<% realname = user["realname"] %>
<%= user_icon(user["login"]) %>
<% if not realname.empty? %>
<%= link_to(realname + " (" + user["login"] + ")", :controller => :home, :user => user["login"]) %>
<% else %>
<%= link_to(user["login"], :controller => :home, :user => user["login"]) %>
<% end %>
<% else %>
<%= link_to(user, :controller => :home, :user => user) %>
-
<% end %>
<% if commit[:requestid] %>
accepted <%= link_to("request #{commit[:requestid]}", {:controller => :request, :action => :show, :id => commit[:requestid]}) %>
Expand Down

0 comments on commit 2fac25e

Please sign in to comment.