<commit_before><%= form_for [main_app, :refinery_admin, @page] do |f| %>

  <%= render :partial => "/refinery/admin/error_messages",
             :locals => {
               :object => @page,
               :include_object_name => true
             } %>

  <%= render :partial => "locale_picker",
             :locals => {
               :current_locale => Thread.current[:globalize_locale]
             } if ::Refinery.i18n_enabled? %>

  <div class="field">
    <%= f.label :title %>
    <%= f.text_field :title, :class => "larger widest" %>
  </div>

  <%= render :partial => "form_fields_after_title",
             :locals => {
               :f => f
             } %>

  <div class='field'>
    <%= render :partial => "form_page_parts",
               :locals => {
                 :f => f
               } %>
  </div>

  <%= render :partial => "form_advanced_options",
             :locals => {
                :f => f
              } %>

  <%= render :partial => "/refinery/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => true,
               :delete_title => t('delete', :scope => 'refinery.admin.pages'),
               :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @page.title)
             } %>

  <%= render :partial => "form_new_page_parts",
             :locals => {
               :f => f
             } if ::Refinery::Setting.find_or_set(:new_page_parts, false) %>
<% end %>

<% content_for :javascripts do %>
  <script>
    $(document).ready(function(){
      page_options.init(
        <%= ::Refinery::Setting.find_or_set(:new_page_parts, false).to_s %>
        , "<%= main_app.new_refinery_admin_page_part_path %>"<commit_msg>Use Refinery::Pages.new_page_parts config instead of Refinery::Setting.<commit_after><%= form_for [main_app, :refinery_admin, @page] do |f| %>

  <%= render :partial => "/refinery/admin/error_messages",
             :locals => {
               :object => @page,
               :include_object_name => true
             } %>

  <%= render :partial => "locale_picker",
             :locals => {
               :current_locale => Thread.current[:globalize_locale]
             } if ::Refinery.i18n_enabled? %>

  <div class="field">
    <%= f.label :title %>
    <%= f.text_field :title, :class => "larger widest" %>
  </div>

  <%= render :partial => "form_fields_after_title",
             :locals => {
               :f => f
             } %>

  <div class='field'>
    <%= render :partial => "form_page_parts",
               :locals => {
                 :f => f
               } %>
  </div>

  <%= render :partial => "form_advanced_options",
             :locals => {
                :f => f
              } %>

  <%= render :partial => "/refinery/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => true,
               :delete_title => t('delete', :scope => 'refinery.admin.pages'),
               :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @page.title)
             } %>

  <%= render :partial => "form_new_page_parts",
             :locals => {
               :f => f
             } if Refinery::Pages.new_page_parts %>
<% end %>

<% content_for :javascripts do %>
  <script>
    $(document).ready(function(){
      page_options.init(
        <%= ::Refinery::Setting.find_or_set(:new_page_parts, false).to_s %>
        , "<%= main_app.new_refinery_admin_page_part_path %>"
{'fraction_non_alphanumeric': 0.1707941929974381, 'fraction_numerical': 0.001138627953316254, 'mean_word_length': 1.8732624693376942, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4549738', 'n_tokens_mistral': 1138, 'n_tokens_neox': 1061, 'n_words': 186}