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

58 lines
3.7 KiB
Plaintext
Raw Normal View History

<ul class="syllabus_leftinfo" id="all_syllabus_attr">
<li class="fl"><label >创建教师:</label><span><%=syllabus.user.show_name %></span></li>
2016-07-01 11:11:53 +08:00
<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?) %>
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :id => 'syllabus_attr_edit', :class => 'undis fr', :onclick => "show_edit_base_info();"%>
2016-07-01 11:11:53 +08:00
<% end %>
<div class="cl"></div>
2016-07-01 21:38:37 +08:00
<% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
2016-07-01 11:11:53 +08:00
<li><label>课程性质:</label><%=syllabus.syllabus_type_str %></li>
<% end %>
<% unless syllabus.credit.nil? || syllabus.credit == '' %>
<li><label>学分:</label><%=syllabus.credit %></li>
<% end %>
<% unless syllabus.hours.nil? || syllabus.hours == '' %>
<li><label>总学时:</label><%=syllabus.hours %></li>
<% end %>
<% unless syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
<li><label>理论学时:</label><%=syllabus.theory_hours %></li>
<% end %>
<% unless syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
<li><label>实践学时:</label><%=syllabus.practice_hours %></li>
<% end %>
<% unless syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
<li><label>适用专业:</label><%=syllabus.applicable_major %></li>
<% end %>
<% unless syllabus.pre_course.nil? || syllabus.pre_course == '' %>
<li><label>先修课程:</label><%=syllabus.pre_course %></li>
<% end %>
2016-07-01 21:38:37 +08:00
<% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
2016-07-01 11:11:53 +08:00
<li class="none none_attr"><label>课程性质:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.credit.nil? || syllabus.credit == '' %>
<li class="none none_attr"><label>学分:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.hours.nil? || syllabus.hours == '' %>
<li class="none none_attr"><label>总学时:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.theory_hours.nil? || syllabus.theory_hours == '' %>
<li class="none none_attr"><label>理论学时:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.practice_hours.nil? || syllabus.practice_hours == '' %>
<li class="none none_attr"><label>实践学时:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.applicable_major.nil? || syllabus.applicable_major == '' %>
<li class="none none_attr"><label>适用专业:</label><span class="fontGrey3">空</span></li>
<% end %>
<% if syllabus.pre_course.nil? || syllabus.pre_course == '' %>
<li class="none none_attr"><label>先修课程:</label><span class="fontGrey3">空</span></li>
<% end %>
</ul>
2016-07-01 21:38:37 +08:00
<% 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 == '')%>
2016-07-01 11:11:53 +08:00
<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>
function show_edit_base_info() {
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
}
</script>