<% object = [] %> <% object << 'course' %> <%= error_messages_for object %> <% unless @course.new_record? %>

<%= render :partial=>"avatar/avatar_form",:locals=> {source:@course} %>

<% end %>

<%= f.fields_for @course do |m| %> <% unless @course.nil?%>

<%= l(:label_class_period) %> *   <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时",:maxlength=>5 %>  <%= l(:label_class_hour)%>

<% else %>

<%= l(:label_class_period) %> *   <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时",:maxlength=>5 %><%= l(:label_class_hour)%>

<% end %>

<% unless @course.nil? %> <% if @course.time == 2008 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2009 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2010 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2011 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2012 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2013 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2014 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2015 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2016 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% elsif @course.time == 2017 %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% else %>

<%= l(:label_term) %> *   <%= select_tag 'time', " ".html_safe %>

<% end %> <% end %>
<% unless @course.nil? %> <% if @course.term == l(:label_spring) %>

<%= select_tag 'term', " ".html_safe %>

<% elsif @course.term == l(:label_summer)%>

<%= select_tag 'term', " ".html_safe %>

<% elsif @course.term == l(:label_autumn)%>

<%= select_tag 'term', " ".html_safe %>

<% elsif @course.term == l(:label_winter)%>

<%= select_tag 'term', " ".html_safe %>

<% else %>

<%= select_tag 'term', " ".html_safe %>

<% end %> <% end %>

<%= l(:text_command) %> <% end %>

<%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_course_public_info) %>

<%= f.text_field :course_type, :value => 1 %>

<%= wikitoolbar_for 'course_description' %> <% @course.custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :course, value %>

<% end %> <%= call_hook(:view_courses_form, :course => @course, :form => f) %> <% unless @course.extra_frozen? %> <% content_for :header_tags do %> <%= javascript_include_tag 'course_identifier' %> <% end %> <% end %>