<% @notifications.each do |notification| %>
<% receipt = @receipts.find_by(notification_id: notification.id) %>
-
<%= link_to notification_path(notification.id) do %>
<%= notification.subject %>
<%= strip_tags(notification.body).truncate(70) %>
<% end %>
<% if receipt.is_read? %>
<%= link_to 'mark as unread', mark_unread_notification_path(notification.id), remote: true, method: :put %>
<% else %>
<%= link_to 'mark as read', mark_read_notification_path(notification.id), remote: true, method: :put %>
<% end %>
<% end %>
<% if @notifications.count == 0 %>
You have ZERO unread notifications. Huzzah!
<% end %>
<% if @notifications.total_pages > 1 %>
<% end %>
<%= render partial: 'shared/go_to_maps' %>