socialforge/app/views/projects/_member_list.html.erb

41 lines
2.2 KiB
Plaintext
Raw Normal View History

2013-10-22 10:02:49 +08:00
<% if members.any? %>
<% members.each do |member| %>
<div class="well">
<% next if member.new_record? %>
<% unless member.created_on.nil? %>
<%= content_tag "p", (User.current.language == ""|| User.current.language == "zh")?("#{format_date(member.created_on)}"+" "+"#{l(:label_member_since)}"):("#{l(:label_member_since)}"+" "+"#{format_date(member.created_on)}"), :class => "float_right member_since" %>
2013-10-22 10:02:49 +08:00
<% end %>
2013-11-01 15:48:23 +08:00
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
2014-03-13 22:06:49 +08:00
<%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>
2013-11-20 09:30:30 +08:00
<!--teacher's code disapeared moified by huang-->
2015-04-08 11:24:40 +08:00
2013-10-22 10:02:49 +08:00
<% if @project.project_type == 1 %>
<% unless member.user.user_extensions.identity ==0 %>
2015-04-08 11:24:40 +08:00
<!-- added by bai 加学号 -->
<%if @canShowCode# if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.nil?) %>
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
<% end %>
<% end %>
2013-11-04 22:00:06 +08:00
<div class ="clear avatar_name"> &nbsp;
2013-10-22 10:02:49 +08:00
<p>
</p>
</div>
<% else%>
2014-03-30 17:03:15 +08:00
<%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
2013-10-22 10:02:49 +08:00
<div class="clear avatar_user">
2014-08-13 16:50:32 +08:00
<p> <!--user_scores(member.user,2,@project).total_score).to_i UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i-->
<%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= format("%.2f" ,read_user_project_scores(member.user,@project)).to_i %></span>
2013-10-22 10:02:49 +08:00
</p>
</div>
<% end %>
2015-04-08 11:24:40 +08:00
2013-10-22 10:02:49 +08:00
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</div>
<% end; reset_cycle %>
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
2013-10-22 10:02:49 +08:00
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>
<% html_title(l(:label_member)) -%>