socialforge/app/views/layouts/_syllabus_base_info.html.erb

62 lines
4.1 KiB
Plaintext

<h3 class="sy_right_title">课程信息
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?) %>
<%= link_to "完善信息", "javascript:void(0);", :id => 'syllabus_attr_edit', :class => 'sy_cmore fr mr10', :onclick => "show_edit_base_info();"%>
<% end %>
<div class="cl"></div>
</h3>
<ul class="sy_info mt15" id="all_syllabus_attr">
<li><label >创建教师</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.user.show_name %></span></li>
<% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
<li><label>课程性质</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.syllabus_type_str %></span></li>
<% end %>
<% unless syllabus.credit.nil? || syllabus.credit == '' %>
<li><label>学分</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.credit %>学分</span></li>
<% end %>
<% unless syllabus.hours.nil? || syllabus.hours == '' %>
<li><label>总学时</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.hours %>学时</span></li>
<% end %>
<% unless syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
<li><label>理论学时</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.theory_hours %>学时</span></li>
<% end %>
<% unless syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
<li><label>实践学时</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.practice_hours %>学时</span></li>
<% end %>
<% unless syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
<li><label>适用专业</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.applicable_major %></span></li>
<% end %>
<% unless syllabus.pre_course.nil? || syllabus.pre_course == '' %>
<li><label>先修课程</label><span class="fl ml10 sy_cgrey w110"><%=syllabus.pre_course %></span></li>
<% end %>
<% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
<li class="none none_attr"><label>课程性质</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.credit.nil? || syllabus.credit == '' %>
<li class="none none_attr"><label>学分</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.hours.nil? || syllabus.hours == '' %>
<li class="none none_attr"><label>总学时</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
<li class="none none_attr"><label>理论学时</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
<li class="none none_attr"><label>实践学时</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
<li class="none none_attr"><label>适用专业</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<% if syllabus.pre_course.nil? || syllabus.pre_course == '' %>
<li class="none none_attr"><label>先修课程</label><span class="fl ml10 sy_cgrey">空</span></li>
<% end %>
<div class="cl"></div>
</ul>
<%# 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="homepageLeftMenuMoreIcon2" id="show_all_syllabus_attr"></a></span>-->
<%# end %>
<script>
function show_edit_base_info() {
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
}
</script>