57 lines
2.5 KiB
Plaintext
57 lines
2.5 KiB
Plaintext
<div class="input-prepend input-append start-line curation_section">
|
|
<span class="tab-content">
|
|
<span class="add-on"><%= t("curation.title") %></span>
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
<span class="tab-pane fade <%= ( i == 0 ) ? "in active" : '' %> <%= 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 %>
|
|
</span>
|
|
<% end %>
|
|
</span>
|
|
<span class="tab-content section_type">
|
|
<span class="add-on"><%= t("curation.section_type") %></span>
|
|
<%= f.select :section_type, CurationPost::SECTION_TYPES.map { |type| [t("curation.#{type}"), type] },
|
|
{ include_blank: t("curation.please_select") },
|
|
class: 'form-control' %>
|
|
</span>
|
|
|
|
<span class="tab-content section_type_text" style="display:none">
|
|
<span class="add-on"><%= t("curation.text") %></span>
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
<span class="tab-pane fade <%= ( i == 0 ) ? "in active" : '' %> <%= 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 %>
|
|
</span>
|
|
<% end %>
|
|
</span>
|
|
<% if defined? UniversalTable %>
|
|
<span class="tab-content section_type_ut" style="display:none">
|
|
<span class="add-on"><%= t("curation.tables") %></span>
|
|
<%= f.select :section_type, UTable.all.map { |table| [table.title, table.uid] },
|
|
{ include_blank: t("curation.please_select") },
|
|
class: 'form-control' %>
|
|
</span>
|
|
<span class="tab-content section_type_ut_entries" style="display:none">
|
|
<span class="add-on"><%= t("curation.table_entries") %></span>
|
|
<%= f.text_field :table_entries, :class => "select2" %>
|
|
</span>
|
|
<% end %>
|
|
|
|
<% if form_section_post.new_record? %>
|
|
<span class="delete_link add-on btn" title="<%= t(:delete_) %>">
|
|
<a class="icon-trash"></a>
|
|
</span>
|
|
<% else %>
|
|
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
|
|
<%= f.hidden_field :id %>
|
|
<a class="icon-remove"></a>
|
|
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
|
</span>
|
|
<% end %>
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
</div>
|