mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
28 lines
1 KiB
Text
28 lines
1 KiB
Text
<% @recent_notifications.each do |notification| %>
|
|
<li class="notification <%= 'unseen' unless notification.already_seen(current_user) %>">
|
|
<div class="row">
|
|
<div class="col-xs-2">
|
|
<% if notification.type_of == 'recent_changes' %>
|
|
<div class="text-center">
|
|
<%= image_tag avatar_path(notification.generator_user, :icon_small), class: 'avatar' %>
|
|
</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 %>
|
|
</div>
|
|
|
|
<div class="col-xs-10">
|
|
<strong><%= notification.title.html_safe %></strong> <br>
|
|
<%= l(notification.created_at, format: :full) %> | <%= notification.message.html_safe %>
|
|
</div>
|
|
</div>
|
|
<li>
|
|
<% end %>
|