<%= t("curation.title") %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>"> <%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :class => "input-large", placeholder: t("curation.title"), :value => (form_section_post.title_translations[locale] rescue nil) %> <% end %>
<% end %>
<%= t("curation.section_type") %>
<%= f.select :section_type, CurationPostSection::SECTION_TYPES.map { |type| [t("curation.#{type}"), type] }, { include_blank: t("curation.please_select"), selected: form_section_post.section_type }, class: 'form-control' %>
<%= t("curation.text") %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>"> <%= f.fields_for :text_translations do |f| %> <%= f.text_area locale, :rows => 2, :class => "ckeditor input-block-level", :placeholder => t("curation.text"), :value => (form_section_post.text_translations[locale] rescue nil) %> <% end %>
<% end %>
<% if defined? UniversalTable %>
<%= t("curation.tables") %>
<%= f.select :universal_table, UTable.all.map { |table| [table.title, table.uid] }, { include_blank: t("curation.please_select") }, class: 'form-control universal_table' %>
<% if !form_section_post.new_record? && form_section_post.section_type == "universal_table" %>
<% form_section_post.get_table_entries.each do |entry| %>
<%= entry.column_entries.first.text %>
<% end %>
<%= t("curation.table_entries") %>
<%= f.text_field :table_entries, :class => "select2" %> <%#= f.select :universal_table, [], {}, class: 'form-control select2', multiple: true, data: { value: tbData } %>
<% else %>
<%= t("curation.table_entries") %>
<%= f.text_field :table_entries, :class => "select2" %>
<% end %> <% end %> <% if defined? UniversalTable %>
<%= t("curation.tables") %>
<%= f.select :universal_table, UTable.all.map { |table| [table.title, table.uid] }, { include_blank: t("curation.please_select") }, class: 'form-control mind_map_select_ut' %>
<% if !form_section_post.new_record? && form_section_post.section_type == "mind_map" %>
<% maps = UTable.where(:uid => form_section_post.universal_table).first.mind_maps %>
<%= t("curation.mind_map") %>
<%= f.select :mind_map_id, maps.map { |m| [m.title, m.id.to_s] }, { include_blank: t("curation.please_select"), selected: form_section_post.mind_map_id }, class: 'form-control mind_map_select' %>
<% else %>
<%= t("curation.mind_map") %>
<%= f.select :mind_map_id, [], {}, class: 'form-control mind_map_select' %>
<% end %> <% end %> <% if form_section_post.new_record? %>
<% else %>
<%= f.hidden_field :id %>
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>