<commit_before><%
content_for :title, t('messages.write_new_answer')
content_for :h1, t('messages.new_answer_to', name: @parent.author)
%>

<article class="thread-message">
  <% if @parent and not @preview %>
    <%= message_header(@thread, @parent) %>

    <div class="posting-content">
      <%= @parent.to_html(self) %>
    </div>

  <% elsif @preview %>
    <%= message_header(@thread, @message, first: true, show_icons: false) %>

    <div class="posting-content">
      <%= @message.to_html(self) %>
    </div>
  <% end %>
</article>

<% if @parent %>
<article class="thread posting root">
  <%= message_header(@thread, @thread.message, first: true, show_icons: true) %>

  <% if not @thread.message.messages.blank? %>
    <%= message_tree(@thread, @thread.message.messages, show_icons: true,
                     hide_repeating_subjects: uconf('hide_subjects_unchanged') == 'yes') %>
  <% end %>
</article>
<% end %>

<%= form_for @message, :url => cf_message_path(@thread, @parent), html: {:class => 'form-horizontal'} do |f| %>
  <% if @message.errors.any? %>
    <div id="error_explanation" class="cf-error">
      <h4><%= t('messages.error_message', errors_count: pluralize(@message.errors.count, t("global.error"), t('global.errors'))) %></h4>

      <ul>
        <% @message.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <%= render "form", f: f %>

  <% if @parent and not params.has_key?(:quote_old_message) %>
    <script>
     cforum.cf_messages.quotedMessage = <%== @parent.to_quote(self).to_json %>;
    </script>
  <% end %>

  <ul id="charta">
    <li>Formuliere <a href="http://wiki.selfhtml.org/wiki/SELFHTML:Forum/Charta_des_SELFHTML-Forums"><strong>höflich und wertschätzend</strong></a>.</li>
    <li><strong>Vermeide</strong> <a href="http://de.wikipedia.org/wiki/Fullquote">Vollzitate</a>.</li>
    <li>Dein Beitrag wird <strong>dauerhaft</strong> <a href="http://forum.selfhtml.org/self/archive">archiviert</a>.</li>
  </ul>

  <p class="form-actions">
    <%= f.submit t('messages.preview'), :class => 'cf-btn', name: 'preview' %>
    <%= f.submit t('global.save'), :class => 'cf-primary-btn' %>
    <%= link_to t('global.cancel'), cf_forum_path(current_forum), :class => 'cf-btn' %>
  </p>

<% end %>

<commit_msg>fix: move thread tree below form<commit_after><%
content_for :title, t('messages.write_new_answer')
content_for :h1, t('messages.new_answer_to', name: @parent.author)
%>

<article class="thread-message">
  <% if @parent and not @preview %>
    <%= message_header(@thread, @parent) %>

    <div class="posting-content">
      <%= @parent.to_html(self) %>
    </div>

  <% elsif @preview %>
    <%= message_header(@thread, @message, first: true, show_icons: false) %>

    <div class="posting-content">
      <%= @message.to_html(self) %>
    </div>
  <% end %>
</article>

<%= form_for @message, :url => cf_message_path(@thread, @parent), html: {:class => 'form-horizontal'} do |f| %>
  <% if @message.errors.any? %>
    <div id="error_explanation" class="cf-error">
      <h4><%= t('messages.error_message', errors_count: pluralize(@message.errors.count, t("global.error"), t('global.errors'))) %></h4>

      <ul>
        <% @message.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <%= render "form", f: f %>

  <% if @parent and not params.has_key?(:quote_old_message) %>
    <script>
     cforum.cf_messages.quotedMessage = <%== @parent.to_quote(self).to_json %>;
    </script>
  <% end %>

  <ul id="charta">
    <li>Formuliere <a href="http://wiki.selfhtml.org/wiki/SELFHTML:Forum/Charta_des_SELFHTML-Forums"><strong>höflich und wertschätzend</strong></a>.</li>
    <li><strong>Vermeide</strong> <a href="http://de.wikipedia.org/wiki/Fullquote">Vollzitate</a>.</li>
    <li>Dein Beitrag wird <strong>dauerhaft</strong> <a href="http://forum.selfhtml.org/self/archive">archiviert</a>.</li>
  </ul>

  <p class="form-actions">
    <%= f.submit t('messages.preview'), :class => 'cf-btn', name: 'preview' %>
    <%= f.submit t('global.save'), :class => 'cf-primary-btn' %>
    <%= link_to t('global.cancel'), cf_forum_path(current_forum), :class => 'cf-btn' %>
  </p>

<% end %>

<% if @parent %>
  <article class="thread posting root">
    <%= message_header(@thread, @thread.message, first: true, show_icons: true) %>

    <% if not @thread.message.messages.blank? %>
      <%= message_tree(@thread, @thread.message.messages, show_icons: true,
                       hide_repeating_subjects: uconf('hide_subjects_unchanged') == 'yes') %>
    <% end %>
  </article>
<% end %>

{'fraction_non_alphanumeric': 0.2132164242942686, 'fraction_numerical': 0.0012831479897348161, 'mean_word_length': 3.757884028484232, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 151, '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': '7639690', 'n_tokens_mistral': 1794, 'n_tokens_neox': 1663, 'n_words': 293}