57 lines
2.5 KiB
Plaintext
57 lines
2.5 KiB
Plaintext
<!-- added by bai -->
|
||
<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>
|
||
<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>
|
||
</div>
|
||
<div class="user-bottom">
|
||
<% 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.project_domain } %><%= (memberships.last == member) ? '' : ',' %>
|
||
<% end %>
|
||
<p>
|
||
<%# 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) %>
|
||
<% for course in user_courses %>
|
||
<%# if course.name != nil %>
|
||
<%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %>
|
||
<%# end %>
|
||
<% end %>
|
||
<%# end %>
|
||
</p>
|
||
|
||
<%= l(:label_x_total_commit, :count => user.changesets.count) %>
|
||
</div>
|
||
</div>
|
||
<% end -%>
|
||
</div> |