<commit_before><h1><%= _('Select the groups where you want to publish your article') %></h1>

<% if !@failed.blank? %>
  <div class="errorExplanation" id="errorExplanation">
    <p><%=_("There were errors with the following communities: ")%></p>
    <% @failed.each do |error, communities|%>
      <strong> <%= error %>: </strong>
      <ul>
        <% communities.each do |community| %>
            <li> <%= community %> </li>
        <% end %>
      </ul>
    <% end %>
  </div>
<% end %>


<!-- Workaroud while the publish feature isn't ready for Events -->
<% if @article.type != "Event" %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %><br />
      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>
      <hr />
    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>
  <div class='atention'>
    <%= _("This option is temporarily disabled.") %>
  </div>
<% end %>

<commit_msg>Replace checking of type attribute with is_a? call<commit_after><h1><%= _('Select the groups where you want to publish your article') %></h1>

<% if !@failed.blank? %>
  <div class="errorExplanation" id="errorExplanation">
    <p><%=_("There were errors with the following communities: ")%></p>
    <% @failed.each do |error, communities|%>
      <strong> <%= error %>: </strong>
      <ul>
        <% communities.each do |community| %>
            <li> <%= community %> </li>
        <% end %>
      </ul>
    <% end %>
  </div>
<% end %>


<!-- Workaroud while the publish feature isn't ready for Events -->
<% unless @article.is_a?(Event) %>
  <% form_tag do%>
    <%= hidden_field_tag :back_to, @back_to %>
    <% @groups.each do |group| %>
      <%= labelled_check_box group.name, 'marked_groups[][group_id]', group.id, @marked_groups.include?(group) %><br />
      <%= labelled_text_field _('Title') + ': ', 'marked_groups[][name]', @article.name, :style => 'width: 100%' %>
      <hr />
    <% end %>

    <% button_bar do %>
      <%= submit_button 'spread', _('Publish') %>
    <% end %>
  <% end %>
<% else %>
  <div class='atention'>
    <%= _("This option is temporarily disabled.") %>
  </div>
<% end %>


{'fraction_non_alphanumeric': 0.21267723102585487, 'fraction_numerical': 0.004170141784820684, 'mean_word_length': 3.0661016949152544, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 87, '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': '4367866', 'n_tokens_mistral': 902, 'n_tokens_neox': 785, 'n_words': 198}