<% is_teacher = User.current.admin_of_contest?(@contestwork.contest) || User.current.judge_of_contest?(@contestwork.contest) || User.current.admin? %>
<% if @contestwork.work_type != 3 %>
<% is_my_work = work.user == User.current%>
<% else %>
<% pro = @contestwork.contestant_work_projects.where(:user_id => User.current.id).first %>
<% is_my_work = pro && pro.contestant_work_id == work.id%>
<% end %>
<% is_member_work = @contestwork.work_type == 3 && work.contestant_work_projects.empty? %>
<% if !is_member_work %>
-
上交时间:
<%=format_time work.commit_time %>
<% if work.user == User.current && @contestwork.work_status == 1 %>
-
<%= link_to("", contestant_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del",:title=>"删除") %>
-
<%= link_to "",edit_contestant_work_path(work),:class => "pic_edit",:title => "修改"%>
<% end%>
<% if @contestwork.work_type == 3 && work.contestant_work_projects %>
-
参与人员:
<%= link_to(work.user.show_name+"(组长)", user_path(work.user.id), :class => "linkBlue" )%>
<% members = work.contestant_work_projects.where("is_leader = 0") %>
<% members.each do |member| if !members.empty? %>
、<%=link_to((User.find member.user_id).show_name, user_path(member.user.id), :class => "linkBlue" ) %>
<% end %>
<% end %>
<% if @contestwork.work_detail_group.base_on_project %>
-
关联项目:
<% if work.project_id == 0 || work.project_id.nil? %>
暂无
<% elsif work.project.is_public || User.current.member_of?(work.project) || User.current.admin? %>
<%= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
(综合评分:<%=static_project_score(work.project.project_score).to_i %>)
<% else %>
<%=work.project.name %>
(综合评分:<%=static_project_score(work.project.project_score).to_i %>)
<% end %>
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
<% end %>
<% end%>
-
内容:
<%= work.description.html_safe if work.description%>
-
附件:
<% com_attachments = work.attachments.where("attachtype IS NULL OR attachtype <> 7") %>
<% if com_attachments.empty?%>
尚未提交附件
<% else%>
<%= render :partial => 'contest_work_attachments_status', :locals => {:attachments => com_attachments, :status => 1} %>
<% end%>
-
<% if @is_evaluation %>
<%= render :partial => 'add_score',:locals => {:work => work,:score => score,:is_member_work => is_member_work}%>
<% end%>
<% else %>
-->
<% end %>
<%= render :partial => 'contestant_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => is_member_work} %>
收起