2013-08-08 22:19:15 +08:00
|
|
|
|
<h3><%= l(:label_user_watcher)%></h3>
|
|
|
|
|
<div class="inf_user_image">
|
|
|
|
|
<% for user in User.watched_by(@user.id) %>
|
|
|
|
|
<ul class="list_watch"><li>
|
|
|
|
|
<table width="660px" border="0" align="center">
|
|
|
|
|
<tr>
|
2013-11-02 12:42:30 +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>
|
|
|
|
|
<td><table width="580px" border="0">
|
2013-11-15 10:25:07 +08:00
|
|
|
|
<tr> <!-- modified by bai 增加了关注人的名字全称-->
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %></strong>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2013-11-15 10:25:07 +08:00
|
|
|
|
<tr> <!-- modified by bai 区别了“关注”里个人参与的项目与课程-->
|
2013-08-08 22:19:15 +08:00
|
|
|
|
<td colspan="2" width="580px" ><p class="font_description">
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<%# unless user.memberships.empty? %>
|
2014-06-09 15:07:08 +08:00
|
|
|
|
<% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %>
|
2013-11-15 10:25:07 +08:00
|
|
|
|
<% memberships = user.memberships.all(:conditions => cond) %>
|
|
|
|
|
<%= l(:label_x_contribute_to, :count => memberships.count) %>
|
2013-11-22 10:37:58 +08:00
|
|
|
|
<% for member in memberships %>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
|
|
|
|
<% end %>
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<%# end %>
|
2013-11-15 10:25:07 +08:00
|
|
|
|
</p>
|
|
|
|
|
<p class="font_description">
|
2014-08-29 09:40:57 +08:00
|
|
|
|
<%# unless user.memberships.empty? %>
|
|
|
|
|
<% 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 %>
|
2013-11-15 10:25:07 +08:00
|
|
|
|
</p>
|
2014-08-29 09:40:57 +08:00
|
|
|
|
</td>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
</tr>
|
2013-11-15 10:25:07 +08:00
|
|
|
|
<!-- end -->
|
|
|
|
|
|
2013-08-08 22:19:15 +08:00
|
|
|
|
<tr>
|
2013-08-22 21:54:52 +08:00
|
|
|
|
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
|
2013-08-08 22:19:15 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></li></ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|