41 lines
2.6 KiB
Plaintext
41 lines
2.6 KiB
Plaintext
<% work = cur_user_works_for_work activity %>
|
|
<% if activity.work_type == 3 && User.current.contestant_of_contest?(activity.contest) && activity.work_detail_group.base_on_project %>
|
|
<% projects = cur_user_projects_for_work activity %>
|
|
<% if work.nil? && projects.nil? %>
|
|
<div class="homepagePostSubmit">
|
|
<%=link_to "关联项目",new_student_work_project_contestant_works_path(:work => activity.id,:hw_status=>hw_status,:user_activity_id=>user_activity_id),remote: true,:class=> 'c_blue', :title=> '请各组长关联项目' %>
|
|
</div>
|
|
<% elsif work.nil? %>
|
|
<div class="homepagePostSubmit">
|
|
<%=link_to "取消关联",cancel_relate_project_contestant_works_path(:work => activity.id,:hw_status=>hw_status,:user_activity_id=>user_activity_id), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<div class="homepagePostSubmit">
|
|
<%= user_for_contest_work activity,User.current.contestant_of_contest?(activity.contest),work %>
|
|
</div>
|
|
<%# if User.current.contestant_of_contest?(activity.contest) && !work.nil? && work.user == User.current && activity.end_time < Date.today %>
|
|
<!--<div class="homepagePostSubmit">-->
|
|
<!--<%#=link_to "追加附件", contestant_work_index_url_in_org(activity.id, 2, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>-->
|
|
<!--</div>-->
|
|
<%# end %>
|
|
<%# if activity.homework_type == 2 && is_teacher%>
|
|
<!--<div class="homepagePostSubmit">-->
|
|
<!--<%#= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>-->
|
|
<!--</div>-->
|
|
<!--<%# if activity.homework_detail_manual.comment_status != 0 %>-->
|
|
<!--<div class="homepagePostSubmit">-->
|
|
<!--<%#= link_to "代码查重", work_canrepeat_student_work_index_path(homework: activity.id, course_id: activity.course.id), class: 'c_blue test-program-btn',:remote => true %>-->
|
|
<!--</div>-->
|
|
<%# end %>
|
|
<%# end %>
|
|
<% if activity.work_type == 3 && activity.work_detail_group%>
|
|
<% if activity.work_detail_group.base_on_project %>
|
|
<div class="homepagePostSubmit mr15">
|
|
<%=link_to "项目(#{activity.contestant_work_projects.where(:is_leader => true).count})",contestant_works_path(:work =>activity.id, :tab => 3),:class => "c_blue" %>
|
|
</div>
|
|
<% end %>
|
|
<div class="homepagePostDeadline mr15">
|
|
分组人数:<%=activity.work_detail_group.min_num %>-<%=activity.work_detail_group.max_num %> 人
|
|
</div>
|
|
<% end %> |