scinote-web/app/views/user_notifications/_recent_notifications.html.erb
2016-09-29 16:05:43 +02:00

22 lines
731 B
Text

<% @recent_notifications.each do |notification| %>
<li class="notification">
<div class="row">
<div class="col-md-3">
<% 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 %>
</div>
<div class="col-md-9">
<strong><%= notification.title %></strong> <br>
<%= l(notification.created_at, format: :full) %> | <%= notification.message %>
</div>
</div>
<li>
<% end %>