1·、 老师不能点赞

2、作业在开启匿评、关闭匿评阶段取消显示编辑和删除按钮
This commit is contained in:
sw 2015-05-28 17:50:26 +08:00
parent 2293ef66d1
commit 4aa18ee1a1
1 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,8 @@
<%=format_time @work.created_at %>
</li>
<% if @work.user == User.current %> <!-- 我的作业,显示编辑和删除按钮 -->
<% if !@is_teacher && @work.user == User.current && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1) %>
<!-- 我的作业 && (非匿评作业 || 为开启匿评),显示编辑和删除按钮 -->
<li class="fr" >
<%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
</li>
@ -14,7 +15,8 @@
<%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
</li>
<% end%>
<% if (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3) && @work.user != User.current%> <!-- 普通作业或者编程作业,或者是匿评结束阶段,显示点赞按钮 -->
<% if (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3) && @work.user != User.current%>
<!-- 普通作业或者编程作业,或者是匿评结束阶段,显示点赞按钮 -->
<li class="fr" id="student_work_praise_<%= @homework.id%>">
<%= render :partial => 'student_work_praise' %>
</li>