<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 %>


<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 %>


Replace checking of type attribute with is_a? call
Replace checking of type attribute with is_a? call
