socialforge/app/views/bids/show_participator.html.erb

71 lines
2.5 KiB
Plaintext
Raw Normal View History

<!--add by bai-->
2013-11-16 10:51:22 +08:00
<h3><%=link_to l(:label_x_join_in_contest, :count => @bid.join_in_contests.count)+"("+@bid.join_in_contests(@user.id).count.to_s+")", :controller=>"bids", :action=>"show_participator"%></h3>
<div class="inf_user_image">
<% for temp in @bid.join_in_contests %>
<% user = temp.user %>
2013-12-17 16:01:46 +08:00
<ul class="list_watch">
<li>
<table width="660px" border="0" align="center">
<tr>
<!-- modified by bai 显示人名全称-->
<td colspan="2" valign="top" width="50" >
2014-03-13 22:06:49 +08:00
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %>
2013-12-17 16:01:46 +08:00
</td>
<td>
<table width="580px" border="0">
<tr>
2014-03-13 22:06:49 +08:00
<td colspan="2" valign="top"><%= content_tag "div", link_to(user.name, user_path(user)), :class => "project_avatar_name" , :title => "#{user.name}" %>
2013-12-17 16:01:46 +08:00
<!-- added by bai 增加了学员的学号 -->
<% if (im_watching_student_id? @bid) && user.user_extensions.identity.to_i.eql?(1) %>
<%= l(:label_bidding_user_studentcode) %> <%= user.user_extensions.student_id%>
<% end %>
</td>
</tr>
<tr>
<!-- modified by bai 区分课程与项目-->
<td colspan="2" width="580px" >
<p class="font_description">
<% unless user.memberships.empty? %>
<% 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) %>
<%
links = Array.new
memberships.collect{|member| links << link_to_project(member.project) }
%>
<%= raw links.join(" , ") %>
2013-12-17 16:01:46 +08:00
<% end %>
</p>
<!-- added by bai -->
<!--
2013-12-17 16:01:46 +08:00
<p class="font_description">
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p>
-->
2013-12-17 16:01:46 +08:00
</td>
</tr>
2013-12-17 16:01:46 +08:00
<!-- end -->
<tr>
<td width="200" align="right" class="font_lighter">
<%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
</td>
</tr>
</table>
</td>
2013-12-17 16:01:46 +08:00
</tr>
</table>
</li>
</ul>
<% end %>
</div>