2013-08-08 22:19:15 +08:00
|
|
|
|
<!--add by huang-->
|
2014-06-17 15:16:17 +08:00
|
|
|
|
<h3><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></h3>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
<div class="inf_user_image">
|
2014-06-17 15:16:17 +08:00
|
|
|
|
<% for user in @user.watcher_users %>
|
|
|
|
|
<ul class="list_watch">
|
|
|
|
|
<li>
|
|
|
|
|
<table width="660px" border="0" align="center">
|
|
|
|
|
<tr>
|
2014-08-23 09:19:05 +08:00
|
|
|
|
<td colspan="2" valign="top" width="50">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"),user_path(user),:title => "#{user.name}" %>
|
|
|
|
|
</td>
|
2014-06-17 15:16:17 +08:00
|
|
|
|
<td>
|
|
|
|
|
<table width="580px" border="0">
|
|
|
|
|
<tr> <!-- modified by bai -->
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong><%= content_tag "div", link_to(user.name, user_path(user)), :class => "project_avatar_name" %></strong>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<!-- added by bai 区分了个人列表里的项目与课程 -->
|
|
|
|
|
<td colspan="2" width="580px"><p class="font_description">
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<% 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_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
2014-06-17 15:16:17 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<p class="font_description">
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<% 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? %>
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<% for course in user_courses %>
|
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-06-17 15:16:17 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
</div>
|