scinote-web/app/views/user_notifications/_recent_notifications.html.erb

23 lines
731 B
Text
Raw Normal View History

2016-09-29 20:49:58 +08:00
<% @recent_notifications.each do |notification| %>
<li class="notification">
<div class="row">
<div class="col-md-3">
2016-09-29 22:05:43 +08:00
<% if notification.type_of == 'recent_changes' %>
<div class="text-center">
2016-09-29 20:49:58 +08:00
<%= image_tag avatar_path(notification.generator_user, :icon_small), class: "avatar" %>
2016-09-29 22:05:43 +08:00
</div>
<% end %>
<% if notification.type_of == 'assignment' %>
<div class="text-center">
<span class="assignment"><%= fa_icon 'newspaper-o' %></span>
</div>
2016-09-29 20:49:58 +08:00
<% end %>
</div>
<div class="col-md-9">
2016-09-29 22:05:43 +08:00
<strong><%= notification.title %></strong> <br>
<%= l(notification.created_at, format: :full) %> | <%= notification.message %>
2016-09-29 20:49:58 +08:00
</div>
</div>
<li>
<% end %>