修复删除班级后再删除课程,提示错误的问题

This commit is contained in:
daiao 2016-07-07 16:55:34 +08:00
parent 87d99a1908
commit 5c4e4e7c8a
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<br>
<div style='width:470px;text-align:center;font-family: "微软雅黑","宋体"' class="f14">
<% if @syllabus.courses.empty? %>
<% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %>
确认删除该课程吗?
<% else %>
该课程下已经存在班级,不能删除。
@ -8,7 +8,7 @@
</div>
</br>
<div style='width:164px; margin:0 auto; text-align:center; font-family: "微软雅黑","宋体"'>
<% if @syllabus.courses.empty? %>
<% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %>
<%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%>
<a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>关闭</a>
<% else %>