scinote-web/app/views/user_notifications/_list.html.erb
Jure Grabnar 553ac4c360 Refactor code according to PR review
PR review: https://github.com/biosistemika/scinote-web/pull/1304

Closes: [SCI-2640], [SCI-2642], [SCI-2643], [SCI-2644].
2018-09-30 16:37:18 +02:00

20 lines
834 B
Plaintext

<% @notifications.each do |notification| %>
<li class="notification <%= 'unseen' unless notification.already_seen(current_user) %>">
<div class="row">
<div class="col-xs-3 col-md-1">
<span style="display: none;" data-hook="user-notification-list-item"></span>
<%= render partial: "user_notifications/icons/#{notification.type_of}",
locals: {notification: notification},
formats: [:html] %>
</div>
<div class="col-xs-9 col-md-11">
<strong><%= sanitize_input(notification.title) %></strong> <br>
<% if notification.deliver? %>
Click the link to download the file.</br>
<% end %>
<%= l(notification.created_at, format: :full) %> | <%= sanitize_input(notification.message) %>
</div>
</div>
</li>
<% end %>