<% if !@member.nil? %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'author_members[]', email_members:@member} %>
<% else %>
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'author_members[]', email_members:[]} %>
<% end %>
<%= select_year((@book.year ? @book.year.to_i : DateTime.now.year), {:start_year => (DateTime.now.year+5), :end_year => 1930}, {:name => 'book[year]',:class => 'span1'} ) %>
<%= f.select :book_type_id, @book_types.collect {|t| [ t.title, t.id ]} %>
<%= f.text_field :pages %>
<% @author_types.each do |author_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'book[book_author_type_ids][]', author_type.id, @book.book_author_type_ids.include?(author_type.id)%>
<%= author_type.title %>
<% end %>
<% end %>
<%= f.text_field :number_of_authors, :class=>'span1' %>
<%= f.datetime_picker :publish_date, :no_label => true,:format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @book.publish_date, :new_record => @book.new_record? %>
<%= f.datetime_picker :publication_date, :no_label => true,:format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @book.publication_date, :new_record => @book.new_record? %>
<%= f.text_field :isbn %>
<%= f.text_field :url , :class => "span6" %>
<%= f.text_field :keywords %>
<%= f.text_area :note, rows: 2, class: "ckeditor input-block-level" %>