link entire notification, except read-unread toggler
This commit is contained in:
parent
689a965f9d
commit
1fabfd832b
1 changed files with 8 additions and 6 deletions
|
@ -8,12 +8,14 @@
|
|||
<% @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>
|
||||
<%= link_to notification_path(notification.id) do %>
|
||||
<div class="notification-subject">
|
||||
<%= notification.subject %>
|
||||
</div>
|
||||
<div class="notification-body">
|
||||
<%= notification.body.truncate(70) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="notification-read-unread">
|
||||
<% if receipt.is_read? %>
|
||||
<%= link_to 'mark as unread', mark_unread_notification_path(notification.id), remote: true, method: :put %>
|
||||
|
|
Loading…
Reference in a new issue