<% cache "activity-aggregated-follows-#{group['activities'].last['id']}_#{group['activities'].first['id']}_#{group['is_seen']}" do %>
  <% unless group['activities'][0]['object'].class.name == "String" %> 
    <% followers = group['activities'].map { |a| a['actor'] } %>
    <div class="single-article single-article-small-pic <%= 'unseen' if group['is_seen'] == false %>">
    <% cache "activity-profile-pic-#{followers.first.id}-#{followers.first.profile_image_url}" do %>
            <a href="<%= followers.first.path %>" class="small-pic-link-wrapper">
              <div class="small-pic">
                <img src="<%= ProfileImage.new(followers.first).get %>" alt="<%= followers.first.name %>">
              </div>
            </a>
  <% end %>
      <div class="content notification-content reaction-content">
        <% if followers.size == 1 %>
            <a href="<%= followers.first.path %>"><% followers.first.name %></a> followed you!
            <%= follow_button(activity['actor'], "follow-back") %>
        <% elsif followers.size == 2 %>
            <div class="follower-pic-row">
              <div class="tiny-pic">
                <a href="<%= followers.last.path %>">
                  <img src="<%= ProfileImage.new(followers.last).get %>" alt="<%= followers.last.name %>" class="round">
                </a>
              </div>
            </div>
            <br>
            <a href="<%= followers.first.path %>"><%= followers.first.name %></a> and
              <a href="<%= followers.second.path %>"><%= followers.second.name %></a> followed you!
        <% else %>
            <div class="follower-pic-row">
              <% followers.first(10)[1..-1].each do |follower| %>
                <div class="tiny-pic">
                  <a href="<%= follower.path %>">
                    <img src="<%= ProfileImage.new(follower).get %>" alt="<%= follower.name %>" class="round">
                  </a>
                </div>
              <% end %>
            </div>
            <br>
            <a href="<%= followers.first.path %>"><%= followers.first.name %></a>
              and <%= followers.size - 1 %> others followed you!
        <% end %>
      </div>
    </div>
  <% end %>
<% end %>
