<% content_for :title, 'All Activity' %>

<% content_for :breadcrumbs do %>
  <nav>
    <ol class="breadcrumb">
      <li class="breadcrumb-item">
        <%= link_to current_project.name, project_path(current_project) %>
      </li>
      <li class="breadcrumb-item active">All Activity</li>
    </ol>
  </nav>
<% end %>

<div class="content-container">
  <% if @activities_groups.any? %>
    <div class="container">
      <div class="activities-groups-container" data-behavior="infinite-scroll-container" data-page="<%= @page %>" data-url="<%= project_activities_path(current_project, format: :js) %>" data-can-load-more="true">
        <%= render 'activities_groups', activities_groups: @activities_groups %>
      </div>

      <div class="text-center mt-3 activities-spinner" data-behavior="activities-spinner">
        <div class="spinner-border text-primary" role="status"></div>
      </div>
    </div>
  <% else %>
    <%= render 'shared/empty_state',
      name: 'activity',
      docs_link: 'https://dradis.com/support/guides/projects/activity.html',
      docs_name: 'the activity feed',
      text: 'As you make progress this page will show you different milestones you go through. Have to step out for a meeting or off on leave for a couple of days? Review the feed when you get back to get a sense of what\'s new.'
    %>
  <% end %>
  <div>
