<% for user in @users -%>
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %> <%= image_tag "/images/time_member.png", :class => "img_member_time"%>
<%= image_tag(url_to_avatar(user), :class => 'avatar') %> <%= link_to_user(user) %> <%= render :partial => 'users/user_score', :locals => {:user => user}%>
<%= l(:label_x_has_fans,:count=>user.watcher_users.count, :remote => true)%> <%= l(:label_has_watchers,:count=>User.watched_by(user.id).count, :remote => true) %> <% if User.current.logged?%> <% if User.current == user%> 编辑资料 <%else%> <%if(user.watched_by?(User.current))%> 取消关注 <% else %> 添加关注 <% end %> <% end%> <% end %>
<% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %> <% memberships = user.memberships.all(:conditions => cond) %> <%= l(:label_x_contribute_to, :count => memberships.count) %> <% for member in memberships %> <%= link_to member.project.name, {:controller => 'projects', :action => 'show',id: member.project.id, host: Setting.host_name } %><%= (memberships.last == member) ? '' : ',' %> <% end %>

<%# unless user.memberships.empty? %> <%# cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %> <%# memberships = user.memberships.all(:conditions => cond) %> <% user_courses = user_courses_list(user) %> <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> <%#= ":" unless user_courses.empty? %> <% for course in user_courses %> <%# if course.name != nil %> <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.host_course} %><%= (user_courses.last == course) ? '' : ',' %> <%# end %> <% end %> <%# end %>

<%= l(:label_x_total_commit, :count => user.changesets.count) %>
<% end -%>