<commit_before><% if root = Alchemy::Page.rootpage %>
<div id="create_language_tree_form" style="display: none">
  <div class="info">
    <%= render_icon('info') %>
    <%= _t(:language_does_not_exist) %>
  </div>
<%- if @language -%>

  <%- if @languages_with_page_tree.size >= 1 -%>
    <%= form_tag(alchemy.copy_language_tree_admin_pages_path) do %>
      <h3><%= _t(:copy_language_tree_heading) %></h3>
      <p><%= _t(:want_to_make_copy_of_existing_language) %></p>
      <div class="input select">
        <%= label_tag('languages[old_lang_id]', _t('Language tree'), class: 'control-label') %>
        <%= select_tag("languages[old_lang_id]", options_for_select(@languages_with_page_tree.map{ |l| [l.name, l.id] }), class: "alchemy_selectbox medium_long") %>
        <%= hidden_field_tag("languages[new_lang_id]", @language.id) %>
      </div>
      <div class="submit">
        <%= button_tag _t(:copy) %>
      </div>
    <% end %>
  <%- end -%>

  <%- if params[:action] == "index" -%>

  <%= form_for([:admin, Alchemy::Page.new], remote: true) do |form| %>
    <h3><%= _t(:create_language_tree_heading) %></h3>
    <p><%= _t(:want_to_create_new_language) %></p>
    <%= form.hidden_field :name, value: @language.frontpage_name %>
    <%= form.hidden_field :language_id, value: @language.id %>
    <%= form.hidden_field :language_code, value: @language.code %>
    <%= form.hidden_field :page_layout, value: @language.page_layout %>
    <%= form.hidden_field :language_root, value: true %>
    <%= form.hidden_field :parent_id, value: root.id %>
    <%= hidden_field_tag :redirect_to, admin_pages_path %>
    <div class="submit">
      <%= form.button _t("create_tree_as_new_language", language: @language.name) %>
    </div>
  <% end %>

  <%- end -%>

<%- else -%>

  <p><%= _t("Actually this language does not exist. Please create this language first.") %></p>

<%- end -%>

</div>
<% else %>
<%= render_message :error do %>
  <h2>Root page not found.</h2>
  <p>Please run <code>rake alchemy:db:seed</code> task.</p>
<% end %>
<% end %>
<commit_msg>Fixes margin of create_language_form info box<commit_after><% if root = Alchemy::Page.rootpage %>
<div id="create_language_tree_form" style="display: none">
  <div class="info with_margin">
    <%= render_icon('info') %>
    <%= _t(:language_does_not_exist) %>
  </div>
<%- if @language -%>

  <%- if @languages_with_page_tree.size >= 1 -%>
    <%= form_tag(alchemy.copy_language_tree_admin_pages_path) do %>
      <h3><%= _t(:copy_language_tree_heading) %></h3>
      <p><%= _t(:want_to_make_copy_of_existing_language) %></p>
      <div class="input select">
        <%= label_tag('languages[old_lang_id]', _t('Language tree'), class: 'control-label') %>
        <%= select_tag("languages[old_lang_id]", options_for_select(@languages_with_page_tree.map{ |l| [l.name, l.id] }), class: "alchemy_selectbox medium_long") %>
        <%= hidden_field_tag("languages[new_lang_id]", @language.id) %>
      </div>
      <div class="submit">
        <%= button_tag _t(:copy) %>
      </div>
    <% end %>
  <%- end -%>

  <%- if params[:action] == "index" -%>

  <%= form_for([:admin, Alchemy::Page.new], remote: true) do |form| %>
    <h3><%= _t(:create_language_tree_heading) %></h3>
    <p><%= _t(:want_to_create_new_language) %></p>
    <%= form.hidden_field :name, value: @language.frontpage_name %>
    <%= form.hidden_field :language_id, value: @language.id %>
    <%= form.hidden_field :language_code, value: @language.code %>
    <%= form.hidden_field :page_layout, value: @language.page_layout %>
    <%= form.hidden_field :language_root, value: true %>
    <%= form.hidden_field :parent_id, value: root.id %>
    <%= hidden_field_tag :redirect_to, admin_pages_path %>
    <div class="submit">
      <%= form.button _t("create_tree_as_new_language", language: @language.name) %>
    </div>
  <% end %>

  <%- end -%>

<%- else -%>

  <p><%= _t("Actually this language does not exist. Please create this language first.") %></p>

<%- end -%>

</div>
<% else %>
<%= render_message :error do %>
  <h2>Root page not found.</h2>
  <p>Please run <code>rake alchemy:db:seed</code> task.</p>
<% end %>
<% end %>

{'fraction_non_alphanumeric': 0.20211233797407585, 'fraction_numerical': 0.003360537686029765, 'mean_word_length': 3.990419161676647, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 127, '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': '6034542', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1515, 'n_words': 274}