% content_for :title, 'Notifications | Metamaps' %>
<% content_for :mobile_title, 'Notifications' %>
Notifications
<% @notifications.each do |notification| %>
<% receipt = @receipts.find_by(notification_id: notification.id) %>
-
<%= link_to notification.subject, notification_path(notification.id) %>
<%= notification.body.truncate(140) %>
<% if receipt.is_read? %>
<%= link_to '(read)', mark_unread_notification_path(notification.id), remote: true, method: :put %>
<% else %>
<%= link_to '(unread)', mark_read_notification_path(notification.id), remote: true, method: :put %>
<% end %>
<% end %>