30 lines
1.2 KiB
Text
30 lines
1.2 KiB
Text
<% content_for :title, 'Notifications | Metamaps' %>
|
|
<% content_for :mobile_title, 'Notifications' %>
|
|
|
|
<div id="yield">
|
|
<div class="centerContent notificationsPage">
|
|
<h2 class="title">My Notifications</h4>
|
|
<ul class="notifications">
|
|
<% @notifications.each do |notification| %>
|
|
<% receipt = @receipts.find_by(notification_id: notification.id) %>
|
|
<li class="notification <%= receipt.is_read? ? 'read' : 'unread' %>" id="notification-<%= notification.id %>">
|
|
<div class="notification-subject">
|
|
<%= link_to notification.subject, notification_path(notification.id) %>
|
|
</div>
|
|
<div class="notification-body">
|
|
<%= notification.body.truncate(70) %>
|
|
</div>
|
|
<div class="notification-read-unread">
|
|
<% 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 %>
|
|
</div>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render partial: 'notifications/header' %>
|