<% if @type == :daily %>
  Your Notifications From The Past 24h
<% elsif @type == :instant %>
  Your Recent Notifications
<% end %>

<% @notifications.each do |notifiable_group, grouped_notifications| %>
  <%= notifiable_group %>
  <% grouped_notifications.each do |_, notifications| %>
    <% presenter = DigestPresenter.new(notifications, self) %>
    <%= render partial: 'notification_mailer/notification', locals: { presenter: presenter } %>
  <% end %>

  <% if defined?(Dradis::Pro) %>
    See all notifications: <%= notifications_url %>
  <% else %>
    See all notifications: <%= project_notifications_url(Project.new) %>
  <% end %>
<% end %>
