<% # encoding: utf-8 %> <% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <%= stylesheet_link_tag "lib/main-form-col2" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker.js" %> <%= javascript_include_tag "lib/bootstrap-typeahead.js" %> <%= javascript_include_tag "lib/datetimepicker/date.time.picker.js" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker" %> <% end %>
<%= @journal_paper.errors.full_messages.first if @journal_paper.errors.any? %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :paper_title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t("personal_journal.paper_title"), value: (@journal_paper.paper_title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :journal_title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t("personal_journal.journal_title"), value: (@journal_paper.journal_title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :authors_translations do |f| %> <%= f.text_area locale, class: "ckeditor input-block-level", placeholder: t("personal_journal.authors"), value: (@journal_paper.authors_translations[locale] rescue nil) %> <% end %>
<% end %>
<% if @journal_paper && !@journal_paper.journal_paper_files.blank? %>
<% @journal_paper.journal_paper_files.each_with_index do |writing_journal_file, i| %> <%= f.fields_for :journal_paper_files, writing_journal_file do |f| %> <%= render :partial => 'form_file', :object => writing_journal_file, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>

<%= hidden_field_tag 'plugin_file_field_count', @journal_paper.journal_paper_files.count %> <%= t(:add) %>

<% 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((@journal_paper.year ? @journal_paper.year.to_i : DateTime.now.year), {:start_year => (DateTime.now.year+5), :end_year => 1930}, {:name => 'journal_paper[year]', :class => "span1"} ) %>
<%= f.text_field :vol_no %>
<%= f.text_field :issue_no %>
<%= f.text_field :form_to_start, :class=>'span1' %> ~ <%= f.text_field :form_to_end, :class=>'span1' %>
<%= f.text_field :total_pages %>
<% @journal_levels.each do |level_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> <%= check_box_tag 'journal_paper[journal_level_ids][]', level_type.id, @journal_paper.journal_level_ids.include?(level_type.id)%> <%= level_type.title %> <%= hidden_field_tag 'journal_paper[journal_level_ids][]', '' %> <% end %> <% end %>
<%= f.select :journal_type_ids, @journal_types.collect {|t| [ t.title, t.id ]}, {include_blank: ''}, {multiple: true, :class => "span3"} %>
<%= f.select :journal_paper_type_id, @paper_types.collect {|t| [ t.title, t.id ]}, :class => "span3" %>
<% @author_types.each do |author_type| %> <%= content_tag :label,:class => "checkbox inline" do -%> <%= check_box_tag 'journal_paper[journal_paper_author_type_ids][]', author_type.id, @journal_paper.journal_paper_author_type_ids.include?(author_type.id)%> <%= author_type.title %> <% end %> <% end %>
<%= f.text_field :number_of_authors, :class=>'span1' %>
<%= f.text_field :isbn %>
<%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @journal_paper.publication_date, :new_record => @journal_paper.new_record? %>
<%= f.text_field :url , :class => "span6" %>
<%= f.text_field :keywords %>
<%= f.text_area :abstract, rows: 2, class: "input-block-level" %>
<%= f.text_area :note, rows: 2, class: "input-block-level" %>
<%= f.text_field :associated_project %>
<%= f.submit t('submit'), class: 'btn btn-primary' %> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>