mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
33 lines
1.4 KiB
Text
33 lines
1.4 KiB
Text
<% @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>
|
|
<% if notification.type_of == 'recent_changes' %>
|
|
<div class="text-center">
|
|
<%= image_tag avatar_path(notification.generator_user, :icon_small), class: 'avatar img-circle' %>
|
|
</div>
|
|
<% end %>
|
|
<% if notification.type_of == 'assignment' %>
|
|
<div class="text-center">
|
|
<span class="assignment"><%= fa_icon 'newspaper-o' %></span>
|
|
</div>
|
|
<% end %>
|
|
<% if notification.type_of == 'system_message' %>
|
|
<div class="text-center">
|
|
<span class="system-message"><i class="glyphicon glyphicon-tower" aria-hidden="true"></i></span>
|
|
</div>
|
|
<% end %>
|
|
<% if notification.type_of == 'deliver' %>
|
|
<div class="text-center">
|
|
<span class="deliver"><%= fa_icon 'truck' %></span>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="col-xs-9 col-md-11">
|
|
<strong><%= sanitize_input(notification.title) %></strong> <br>
|
|
<%= l(notification.created_at, format: :full) %> | <%= sanitize_input(notification.message) %>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<% end %>
|