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

110 lines
4.7 KiB
Plaintext
Raw Normal View History

<script type=" text/javascript" charset="utf-8">
function change_pic(id){
var classname = document.getElementById(id).className
if(classname == 'st_up') {
document.getElementById(id).className = 'st_down'
}
else
document.getElementById(id).className = 'st_up'
}
</script>
<div style="margin-left: 15px" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
<% if !@canShowCode %>
<%= join_in_course_group(@course.course_groups,@group, User.current) %>
<% end %>
<span style="font-size: 12px; float: left; margin-right: 5px">
<%= l(:label_current_group)%>:&nbsp;
<%= @group.name %>
</span>
<% end %>
</div>
<div class="cl"></div>
<% if members.any? %>
<% if @result_count %>
2014-12-25 09:02:58 +08:00
<p style="font-size: 18px;">
<%= l(:label_search_member_count) %>
<%= @result_count %>
<%= l(:label_member_people) %>
</p>
<% end %>
<div class="cl"></div>
<div class="st_box">
<ul class="st_box_top" style="margin-left: 17px;">
<% if @subPage_title == l(:label_student_list) %>
<li class="ml358"><%= link_to '作业积分', member_score_sort_course_path ,method: 'get', remote: true, :onclick => "change_pic('pic')"%>
2014-12-25 09:02:58 +08:00
<a id="pic" href="#" class="st_down"></a>
</li>
<li class="ml50">
<a href="#" >加入时间</a>
</li>
<% else %>
2014-12-25 09:02:58 +08:00
<li class="ml50" style="margin-left: 470px">
</li>
<li class="ml50">
<a href="#" >加入时间</a>
</li>
<% end %>
</ul>
<div id="list_detail" style="margin-left: 17px">
<% members.each do |member| %>
<div class="cl"></div><!--st_box_top end-->
<div class="st_boxlist">
<% next if member.new_record? %>
2014-12-25 09:02:58 +08:00
<a href="#" class="st_img" style="float:left;">
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
</a>
<ul style="margin-left: 15px">
<% if @canShowCode %>
<li>
<%= l(:label_bidding_user_studentname) %> :
<%= link_to member.user.show_name, user_path(member.user) %>
2014-12-25 09:02:58 +08:00
</li>
</br>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
<%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
<% end %>
<!--teacher's code disapeared moified by huang-->
<% if @canShowCode %>
<li>
<%= l(:label_bidding_user_studentcode) %> :
<%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
</li>
<%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
<% end %>
</ul>
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.to_s), {
:action => 'show_member_score',
:member_id => member.id,
:remote => true},
:class => 'ml258 c_red', :style => "color:red;" %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey" %>
<% end %>
<% else %>
<% unless member.created_on.nil? %>
<%= content_tag "span", "#{format_date(member.created_on)}#{l(:label_member_since)}", :class => "ml65 c_grey", :style=>"margin-left:195px" %>
<% end %>
<% end %>
<%= call_hook(:view_projects_settings_members_table_row, { :course => @course, :member => member}) %>
</div>
<% end; reset_cycle %>
</div>
</div>
2014-12-25 09:02:58 +08:00
<div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
</div>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>