<% step ||= report_element.step %>
<% comments = step.step_comments.order(created_at: :desc) %>
<% export_all = defined?(export_all) && export_all %>
<% if comments.present? %>
  <div class="report-element report-comments-element report-step-comments-element">
    <div class="report-element-header">
      <div class="pull-left comments-name">
        <%= t('projects.reports.elements.step_comments.name') %>
      </div>
    </div>
    <div class="report-element-body">
      <div class="comments-container simple">
        <ul class="no-style content-comments">
          <% comments.each do |comment| %>
            <%= render partial: 'reports/elements/comment_element',
                        locals: { comment: comment, export_all: export_all } %>
          <% end %>
        </ul>
      </div>
    </div>
    <% if defined?(children) %>
      <div class="report-element-children">
        <%= children %>
      </div>
    <% end %>
  </div>
<% end %>
