<% if bids.blank? %> <%#= l(:label_uncommit_homework) %> 暂无作业! <% else %> <% bids.each do |bid|%>
<%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %>
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author)) %> <%= l(:label_user_create_project_homework) %> <%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %> <% if User.current.logged? && is_cur_course_student(@course) %> <% cur_user_homework = cur_user_homework_for_bid(bid) %> <% if cur_user_homework && cur_user_homework.empty? %> <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> <% else %> <%= l(:lable_has_commit_homework)%> <% end %> <% end %> <% if (User.current.admin?||User.current.id==bid.author_id) %> <% if bid.open_anonymous_evaluation == 1 && bid.homeworks.count >= 2%> <% case bid.comment_status %> <% when 0 %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> <% when 1 %> <%= link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true %> <% when 2 %> 匿评结束 <% end %> <%end%> <%= link_to( l(:button_edit), {:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id} ) %> <%#= link_to( l(:button_delete), {:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id}, :method => :post, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del' ) %> <% end %>
<% bidding_project = bid.biding_projects.all temp = [] bidding_project.each do |pro| if pro.project && pro.project.project_status temp << pro end temp end %> <% if bid.homework_type == 1%> <%= l(:label_x_homework_project, :count => bid.homeworks.count) %> ( <%= link_to bid.homeworks.count, course_for_bid_path(bid.id) %> ) <% else %> <%= l(:label_x_homework_project, :count => temp.count) %> ( <%= link_to temp.count, course_for_bid_path(bid.id) %> ) <% end %> <%= l(:label_students_responses) %> ( <%= bid.commit.nil? ? 0 : bid.commit %> )
<% if bid.reward_type.nil? or bid.reward_type == 1 %> <%= l(:label_bids_reward_method) %> <%= l(:label_call_bonus) %>   <%= l(:label_RMB_sign) %> <%= bid.budget%> <% elsif bid.reward_type == 2 %> <%= l(:label_bids_reward_method) %> <%= bid.budget%> <% end %>
<%= textilizable bid, :description %>
<%= l(:label_create_time) %> :  <%=format_time bid.created_on %> <% if betweentime(bid.deadline) < 0 %> <%= l(:label_commit_limit)%> <% else %> <% end %>
<% end %> <% end %>