socialforge/app/views/users/_user_show.html.erb

58 lines
2.5 KiB
Plaintext
Raw Normal View History

<!-- 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>
<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">
<% 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 %>
<%= 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>
<%# 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) %>
2015-04-10 13:21:36 +08:00
<%= "" 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 %>
2013-11-08 11:25:33 +08:00
<% end %>
<%# end %>
2013-11-08 11:25:33 +08:00
</p>
<%= l(:label_x_total_commit, :count => user.changesets.count) %>
2013-11-08 11:25:33 +08:00
</div>
</div>
<% end -%>
</div>