<div data-behavior="subscription-actions" data-subscribed="<%= !@subscription.nil? %>">
  <% cache ['subscriptions-feed', @subscriptions] do %>
    <% if @subscribable.respond_to?(:project) %>
      <h4 class="d-flex header-underline">
        Subscribers
        <span class="badge bg-primary text-white mx-2">
          <%= @subscribable.subscriptions.count %>
        </span>
        <span class="actions pt-1">
          <div class="action">
            <%= render 'subscriptions/actions', subscribable: @subscribable %>
          </div>
        </span>
      </h4>
      <div class="subscriptions-feed">
        <%= render 'subscriptions/subscribers', subscribable: @subscribable %>
      </div>
    <% else %>
      <div class="card">
        <div class="card-header bg-secondary">
          <div class="card-title">
            Subscribers
            <span>(<%= @subscribable.subscriptions.count %>)</span>
            <span class="actions">
              - <%= render 'subscriptions/actions', subscribable: @subscribable %>
            </span>
          </div>
        </div>
        <div class="card-body subscriptions-feed">
          <%= render 'subscriptions/subscribers', subscribable: @subscribable %>
        </div>
      </div>
    <% end %>
  <% end %>
</div>
