<% page = f.object %>
  • <%= t :drag %>
    <%= t(:'spotlight.feature_pages.options') %> <%= f.check_box :published, label: '' %>

    <%= page.title_or_default %>

    <%= f.text_field :title, label: t('spotlight.administration.page_title') %> <%= f.hidden_field :id %> <%= f.hidden_field :weight, data: {property: "weight"} %> <%- if page.feature_page? -%>
    <%= f.hidden_field :parent_page_id, data: {property: "parent_page"} %> <%= f.check_box :display_sidebar, label: t('spotlight.administration.show_sidebar') %>
    <% end %>
    <% if page.feature_page? and page.child_pages.present? %>
      <% page.child_pages.each do |child_page| %> <%= parent_form.fields_for page_collection_name, child_page do |p| %> <%= render partial: 'page', locals: {f: p, parent_form: parent_form} %> <% end %> <% end %>
    <% end %>