From 4247599fd52b2474f18ffed6e0ecfc756019f849 Mon Sep 17 00:00:00 2001 From: User Date: Tue, 1 Jul 2025 10:50:13 +0800 Subject: [PATCH] ken --- .../curations/_form_section_post.html.erb | 225 +++++++++--------- 1 file changed, 114 insertions(+), 111 deletions(-) mode change 100644 => 100755 app/views/admin/curations/_form_section_post.html.erb diff --git a/app/views/admin/curations/_form_section_post.html.erb b/app/views/admin/curations/_form_section_post.html.erb old mode 100644 new mode 100755 index e84e987..310fc06 --- a/app/views/admin/curations/_form_section_post.html.erb +++ b/app/views/admin/curations/_form_section_post.html.erb @@ -1,111 +1,114 @@ - -
- - <%= 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' %> - - <% if !form_section_post.new_record? && form_section_post.section_type == "universal_table" %> - <% - tbData = form_section_post.get_table_entries.map{|tb| {id: tb.id.to_s, text: tb.column_entries.first.text}} - %> - - <%= t("curation.table_entries") %> - <%= f.text_field :table_entries, :class => "select2", data: { value: tbData } %> - - <% else %> - - <% 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 %> - - <% end %> - <% end %> - - <% if form_section_post.new_record? %> - - - - <% else %> - - <%= f.hidden_field :id %> - - <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> - - <% end %> -
+ +
+ + <%= 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' %> + + <% if !form_section_post.new_record? && form_section_post.section_type == "universal_table" %> + <% + tbData = form_section_post.get_table_entries.map{|tb| {id: tb.id.to_s, text: tb.column_entries.first.text}} + %> + + <%= t("curation.table_entries") %> + <%= f.text_field :table_entries, :class => "select2", data: { value: tbData } %> + + <% else %> + + <% 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 %> + + <% end %> + <% end %> + + <% if form_section_post.new_record? %> + + + + <% else %> + + <%= f.hidden_field :id %> + + <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> + + <% end %> +