2015-12-23 17:26:13 +08:00
|
|
|
|
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
|
|
|
|
<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_id), :alt => "用户头像" %>
|
2016-01-07 10:10:24 +08:00
|
|
|
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostDes">
|
2016-05-10 14:06:34 +08:00
|
|
|
|
<div class="homepagePostTo break_word">
|
2016-06-21 16:53:31 +08:00
|
|
|
|
<%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
|
|
|
|
TO <!--+"(课程名称)" -->
|
2016-09-09 10:23:18 +08:00
|
|
|
|
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
|
|
|
|
<span class="fb" style="color: #269ac9"> • </span>
|
2016-09-19 17:14:14 +08:00
|
|
|
|
<% if hw_status == 3 || hw_status == 5 %>
|
|
|
|
|
<%= link_to activity.course.name, course_path(activity.course_id), :class => "newsBlue"%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue"%>
|
|
|
|
|
<% end %>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
|
2016-09-19 17:14:14 +08:00
|
|
|
|
<% if hw_status == 3 || hw_status == 5 %>
|
|
|
|
|
<% index = get_hw_index(activity, is_teacher) %>
|
|
|
|
|
<%= link_to "<span class='fontBlue2'>作业#{index+1}:</span>".html_safe+activity.name,student_work_index_path(:homework => activity.id),:class => "postGrey"%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
|
|
|
|
<% end %>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
</div>
|
2016-09-09 15:28:32 +08:00
|
|
|
|
<%=get_hw_status(activity).html_safe %>
|
2016-04-15 14:13:44 +08:00
|
|
|
|
|
2015-12-23 17:26:13 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>
|
2016-03-11 11:23:16 +08:00
|
|
|
|
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"linkBlue",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
<% elsif activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 0%>
|
|
|
|
|
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="homepagePostSubmitContainer">
|
2016-09-21 10:34:38 +08:00
|
|
|
|
<%= render :partial => 'users/homework_opr', :locals => {:activity => activity, :is_teacher => is_teacher, :hw_status => hw_status, :user_activity_id => user_activity_id} %>
|
2015-12-29 10:59:26 +08:00
|
|
|
|
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
|
|
|
|
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
2016-03-03 17:39:08 +08:00
|
|
|
|
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 && activity.anonymous_comment == 0%>
|
2015-12-29 10:59:26 +08:00
|
|
|
|
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
|
|
|
|
<% end %>
|
2016-09-19 17:14:14 +08:00
|
|
|
|
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
|
|
|
|
|
<div class="homepagePostDeadline ml15">
|
|
|
|
|
<%= l(:label_publish_time)%>:<%= activity.publish_time%> 00:00
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
</div>
|
2016-01-19 16:53:34 +08:00
|
|
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
|
|
|
|
|
|
2015-12-23 17:26:13 +08:00
|
|
|
|
<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>
|
2016-01-08 16:05:36 +08:00
|
|
|
|
<div class="mt10" style="font-weight:normal;">
|
|
|
|
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
2016-01-07 17:23:32 +08:00
|
|
|
|
</div>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
|
2016-09-21 10:34:38 +08:00
|
|
|
|
<%= render :partial => "users/homework_base_info", :locals =>{:activity => activity, :user_activity_id =>user_activity_id, :is_teacher => is_teacher, :hw_status => hw_status} %>
|
2015-12-23 17:26:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2016-09-21 10:34:38 +08:00
|
|
|
|
<%= render :partial => 'users/homework_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id, :hw_status => hw_status, :is_teacher => is_teacher} %>
|
2016-01-08 14:53:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
2016-01-18 10:13:31 +08:00
|
|
|
|
$("#moreProject_<%=user_activity_id %>").click(function(){
|
|
|
|
|
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
|
|
|
|
|
$("#relatePWrap_<%=user_activity_id %>").css("height","auto");
|
|
|
|
|
$(this).hide();
|
|
|
|
|
});
|
|
|
|
|
$("#hideProject_<%=user_activity_id %>").click(function(){
|
|
|
|
|
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
|
|
|
|
|
$("#moreProject_<%=user_activity_id %>").show();
|
|
|
|
|
});
|
2016-05-03 17:11:30 +08:00
|
|
|
|
$(function(){
|
|
|
|
|
user_card_show_hide();
|
|
|
|
|
});
|
2016-01-08 19:04:22 +08:00
|
|
|
|
</script>
|