课程大纲bug修复

This commit is contained in:
yuanke 2016-07-01 21:38:37 +08:00
parent 62a7d56c97
commit 447e624f36
6 changed files with 14 additions and 14 deletions

View File

@ -48,17 +48,17 @@ module SyllabusesHelper
option6 = []
option1 << "请选择"
option1 << 1
option1 << 0
option2 << "公共必修课"
option2 << 2
option2 << 1
option3 << "学科必修课"
option3 << 3
option3 << 2
option4 << "专业选修课"
option4 << 4
option4 << 3
option5 << "实践必修课"
option5 << 5
option5 << 4
option6 << "实践选修课"
option6 << 6
option6 << 5
type << option1
type << option2

View File

@ -9,9 +9,9 @@
}
<% else %>
<% if @course.is_public? %>
$("#show_course_<%= @course.id %>").attr("title","公开课程<%= @course.name %><%= @course.time.to_s+ @course.term %>");
$("#show_course_<%= @course.id %>").attr("title","公开班级<%= @course.name %><%= @course.time.to_s+ @course.term %>");
<% else %>
$("#show_course_<%= @course.id %>").attr("title","私有课程<%= @course.name %><%= @course.time.to_s+ @course.term %>");
$("#show_course_<%= @course.id %>").attr("title","私有班级<%= @course.name %><%= @course.time.to_s+ @course.term %>");
<% end %>
$("#set_course_public_<%= @course.id %>").replaceWith('<%= escape_javascript(link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => "courses", :action => "private_or_public", :id => @course,:user_page => true},
:id => "set_course_public_#{@course.id.to_s}",:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗") %>');

View File

@ -4,7 +4,7 @@
<% end %>
<div class="cl"></div>
<li><label >创建教师:</label><span><%=syllabus.user.show_name %></span></li>
<% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 %>
<% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
<li><label>课程性质:</label><%=syllabus.syllabus_type_str %></li>
<% end %>
<% unless syllabus.credit.nil? || syllabus.credit == '' %>
@ -26,7 +26,7 @@
<li><label>先修课程:</label><%=syllabus.pre_course %></li>
<% end %>
<% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == '' %>
<% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
<li class="none none_attr"><label>课程性质:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.credit.nil? || syllabus.credit == '' %>
@ -48,7 +48,7 @@
<li class="none none_attr"><label>先修课程:</label><span class="fontGrey3">空</span></li>
<% end %>
</ul>
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?)&&(syllabus.syllabus_type.nil? || syllabus.syllabus_type == ''||syllabus.credit.nil? || syllabus.credit == ''||syllabus.hours.nil? || syllabus.hours == ''||syllabus.theory_hours.nil? || syllabus.theory_hours == ''||syllabus.practice_hours.nil? || syllabus.practice_hours == ''||syllabus.applicable_major.nil? || syllabus.applicable_major == ''||syllabus.pre_course.nil? || syllabus.pre_course == '')%>
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?)&&(syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == ''||syllabus.credit.nil? || syllabus.credit == ''||syllabus.hours.nil? || syllabus.hours == ''||syllabus.theory_hours.nil? || syllabus.theory_hours == ''||syllabus.practice_hours.nil? || syllabus.practice_hours == ''||syllabus.applicable_major.nil? || syllabus.applicable_major == ''||syllabus.pre_course.nil? || syllabus.pre_course == '')%>
<span class="homepageLeftMenuMore"><a href="javascript:void(0);" data-init="0" onclick="toggle_all_syllabus_attr();" class="homepageLeftMenuMoreIcon" id="show_all_syllabus_attr"></a></span>
<% end %>
<script>

View File

@ -23,7 +23,7 @@
<li>
<span class="item_list fl"></span>
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "list-title fl #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开课程:":"私有课程")+course.name+""+current_time_and_term(course)+""%>
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级")+course.name+""+current_time_and_term(course)+""%>
<% teacher = User.where("id=?",course.tea_id).first%>
<span class="fr grayTxt">
<%='主讲老师:'+(teacher.try(:realname) != " " ? teacher.lastname + teacher.firstname : teacher.try(:login)) %>

View File

@ -20,7 +20,7 @@
<li>
<span class="item_list fl"></span>
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "list-title fl #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开课程:":"私有课程")+course.name+""+current_time_and_term(course)+""%>
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级")+course.name+""+current_time_and_term(course)+""%>
<% teacher = User.where("id=?",course.tea_id).first%>
<span class="fr grayTxt">
<%='主讲老师:'+(teacher.try(:realname) != " " ? teacher.lastname + teacher.firstname : teacher.try(:login)) %>

View File

@ -74,7 +74,7 @@
<%=link_to '查看课程', syllabus_path(syllabus.id), :class => 'postOptionLink',:target =>'_blank', :title => '查看课程' %>
</li>
<% if User.current == syllabus.user %>
<li><%=link_to '删除', delete_syllabus_syllabus_path(syllabus), :class => 'postOptionLink', :remote => 'true'%></li>
<li><%=link_to '删除课程', delete_syllabus_syllabus_path(syllabus), :class => 'postOptionLink', :remote => 'true'%></li>
<% end %>
</ul>
</li>