<% # encoding: utf-8 %> <%= f.error_messages %>

<%= f.label :author_type ,t("personal_book.author_type")%>

<% @author_types.each do |author_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> <%= check_box_tag 'writing_book[book_author_type_ids][]', author_type.id, @writing_book.book_author_type_ids.include?(author_type.id)%> <%= author_type.title %> <%= hidden_field_tag 'writing_book[book_author_type_ids][]', '' %> <% end %> <% end %>

Tags

<% @tags.each do |tag| %> <%= content_tag :label,:class => "checkbox inline" do -%> <%= check_box_tag 'writing_book[tag_ids][]', tag.id, @writing_book.tag_ids.include?(tag.id)%> <%= tag.name %> <%= hidden_field_tag 'writing_book[tag_ids][]', '' %> <% end %> <% end %>
<%= f.label :year ,t("personal_book.year")%> <%= select_year((@writing_book.year ? @writing_book.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_book[year]'} ) %>
<%= f.label :book_paper_type ,t("personal_book.book_paper_type")%> <%= f.select :book_paper_type_id, @paper_types.collect {|t| [ t.title, t.id ]} %>
<%= f.label :publish_date ,t("personal_book.publish_date")%> <%= f.date_select :publish_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
<% @site_valid_locales.each_with_index do |locale, i| %>
">
<%= f.label :paper_title ,t("personal_book.paper_title")%> <%= f.fields_for :paper_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@writing_book.paper_title_translations[locale] rescue nil) %> <% end %>
<%= f.label :book_title ,t("personal_book.book_title")%> <%= f.fields_for :book_title_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@writing_book.book_title_translations[locale] rescue nil) %> <% end %>
<%= f.label :extracted_chapters ,t("personal_book.extracted_chapters")%> <%= f.fields_for :extracted_chapters_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@writing_book.extracted_chapters_translations[locale] rescue nil) %> <% end %>
<%= f.label :publisher ,t("personal_book.publisher")%> <%= f.fields_for :publisher_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@writing_book.publisher_translations[locale] rescue nil) %> <% end %>
<%= f.label :editor ,t("personal_book.editor")%> <%= f.fields_for :editor_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_field locale, :class=>'post-title', :value => (@writing_book.editor_translations[locale] rescue nil) %> <% end %>
<%= f.label :authors,t("web_resource.authors") %> <%= f.fields_for :authors_translations do |f| %> <%= I18nVariable.from_locale(locale) %> <%= f.text_area locale, :size => "60x3", :value => (@writing_book.authors_translations[locale] rescue nil) %> <% end %>
<% end %>
<%= f.label :publication_date ,t("personal_book.publication_date")%> <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
<%= f.label :url, t("personal_book.url") %> <%= f.text_field :url %>
<%= f.label :keywords, t("personal_book.keywords") %> <%= f.text_field :keywords %>
<%= f.label :pages, t("personal_book.pages") %> <%= f.text_field :pages %>
<%= f.label :isbn, t("personal_book.isbn") %> <%= f.text_field :isbn %>
<%= f.label :language, t("personal_book.language") %> <%= f.radio_button :language, "Chinese" %> <%= t("personal_book.Chinese") %> <%= f.radio_button :language, "English" %> <%= t("personal_book.English") %>
<%= f.label :note, t("personal_book.note") %> <%= f.text_area :note, :size => "60x3" %>
<% @writing_book.writing_book_files.each_with_index do |writing_book_file, i| %> <%= f.fields_for :writing_book_files, writing_book_file do |f| %> <%= render :partial => 'form_file', :object => writing_book_file, :locals => {:f => f, :i => i} %> <% end %> <% end %>
File File Name
<%= hidden_field_tag 'plugin_file_field_count', @writing_book.writing_book_files.count %> ADD/新增
<%= f.submit t('submit'), :class=>'btn btn-primary' %> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
<% content_for :page_specific_javascript do %> <%= javascript_include_tag "archive_plugin_form" %> <% end %>