2014-01-23 14:34:54 +08:00
|
|
|
|
<!-- added by bai -->
|
2013-11-08 11:25:33 +08:00
|
|
|
|
<div class="autoscroll">
|
|
|
|
|
<% for user in @users -%>
|
|
|
|
|
<div class="well">
|
|
|
|
|
|
|
|
|
|
<%= 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"%>
|
|
|
|
|
|
|
|
|
|
<div>
|
2014-07-14 11:46:52 +08:00
|
|
|
|
<table style="width: 100%;table-layout: fixed">
|
|
|
|
|
<tr>
|
|
|
|
|
<td rowspan="2" style="width: 60px;">
|
|
|
|
|
<%= image_tag(url_to_avatar(user), :class => 'avatar') %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%= user.name %>">
|
|
|
|
|
<span style="position: relative;font-size: 16px;display:block; "><%= link_to_user(user) %></span>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<span style="color:#ec6300">
|
|
|
|
|
<%= render :partial => 'users/user_score', :locals => {:user => user}%>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<%= l(:label_x_has_fans,:count=>user.watcher_users.count)%>
|
|
|
|
|
<%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="user-bottom">
|
2014-05-23 11:50:36 +08:00
|
|
|
|
<% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
<% memberships = user.memberships.all(:conditions => cond) %>
|
|
|
|
|
<%= l(:label_x_contribute_to, :count => memberships.count) %>
|
|
|
|
|
<% for member in memberships %>
|
2015-05-14 21:40:34 +08:00
|
|
|
|
<%= link_to member.project.name, {:controller => 'projects', :action => 'show',id: member.project.id, host: Setting.host_name } %><%= (memberships.last == member) ? '' : ',' %>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<p>
|
2014-07-04 11:26:37 +08:00
|
|
|
|
<%# unless user.memberships.empty? %>
|
|
|
|
|
<%# cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
|
|
|
|
|
<%# memberships = user.memberships.all(:conditions => cond) %>
|
2014-07-18 10:01:54 +08:00
|
|
|
|
<% user_courses = user_courses_list(user) %>
|
2014-07-04 11:26:37 +08:00
|
|
|
|
<%= l(:label_x_course_contribute_to, :count => user_courses.count) %>
|
2015-04-10 13:21:36 +08:00
|
|
|
|
<%= ":" unless user_courses.empty? %>
|
2014-07-04 11:26:37 +08:00
|
|
|
|
<% for course in user_courses %>
|
|
|
|
|
<%# if course.name != nil %>
|
2015-05-14 21:40:34 +08:00
|
|
|
|
<%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.host_course} %><%= (user_courses.last == course) ? '' : ',' %>
|
2014-07-04 11:26:37 +08:00
|
|
|
|
<%# end %>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
<% end %>
|
2014-07-04 11:26:37 +08:00
|
|
|
|
<%# end %>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
</p>
|
|
|
|
|
|
2014-07-04 13:59:08 +08:00
|
|
|
|
<%= l(:label_x_total_commit, :count => user.changesets.count) %>
|
2013-11-08 11:25:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end -%>
|
|
|
|
|
</div>
|