socialforge/app/views/users/_contest_work.html.erb

64 lines
3.9 KiB
Plaintext
Raw Normal View History

2016-12-23 14:41:21 +08:00
<% is_teacher = User.current.admin_of_contest?(activity.contest) %>
2016-12-22 10:01:37 +08:00
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo break_word">
<%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
2016-12-30 13:58:09 +08:00
<% if hw_status == 3 %>
<% elsif hw_status == 2 %>
TO
<%= link_to "提交", works_path(:contest => activity.contest.id), :class => "newsBlue ml15"%>
2016-12-22 10:01:37 +08:00
<% else %>
2016-12-30 13:58:09 +08:00
TO
<%= link_to activity.contest.name.to_s+" | 竞赛提交", works_path(:contest => activity.contest.id), :class => "newsBlue ml15"%>
2016-12-22 10:01:37 +08:00
<% end %>
</div>
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
2016-12-30 13:58:09 +08:00
<%# if hw_status == 3 || hw_status == 5 %>
<%# index = get_work_index(activity, is_teacher) %>
<%= link_to activity.name,contestant_works_path(:work => activity.id),:class => "postGrey"%>
<%# else %>
<%#= link_to activity.name.to_s, contestant_works_path(:work => activity.id), :class => "postGrey"%>
<%# end %>
2016-12-22 10:01:37 +08:00
</div>
2016-12-23 14:41:21 +08:00
<%=get_cw_status(activity).html_safe %>
2016-12-22 10:01:37 +08:00
<div class="cl"></div>
<% if activity.work_type == 3 && activity.work_detail_group.base_on_project %>
<span class="c_red">系统提示:该题目要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"linkBlue",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
<% elsif activity.work_type == 3 && !activity.work_detail_group.base_on_project%>
<span class="c_red">系统提示:该题目要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
<% end %>
<div class="homepagePostSubmitContainer">
<%= render :partial => 'users/work_opr', :locals => {:activity => activity, :is_teacher => is_teacher, :hw_status => hw_status, :user_activity_id => user_activity_id} %>
<% if !activity.end_time.nil? %>
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %>&nbsp;23:59</div>
<% end %>
2016-12-23 14:41:21 +08:00
<% if activity.work_status == 0 && !activity.publish_time.nil? %>
2016-12-22 10:01:37 +08:00
<div class="homepagePostDeadline ml15">
<%= l(:label_publish_time)%><%= activity.publish_time%>&nbsp;00:00
</div>
<% end %>
</div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
<div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div>
<%= render :partial => "users/contest_work_base_info", :locals =>{:activity => activity, :user_activity_id =>user_activity_id, :is_teacher => is_teacher, :hw_status => hw_status} %>
</div>
<div class="cl"></div>
</div>
2016-12-23 14:41:21 +08:00
<%= render :partial => 'users/contest_work_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id, :is_teacher => is_teacher} %>
2016-12-22 10:01:37 +08:00
</div>