2016-10-04 17:51:47 +08:00
|
|
|
<% @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">
|
|
|
|
<% if notification.type_of == 'recent_changes' %>
|
|
|
|
<div class="text-center">
|
2016-10-06 18:09:01 +08:00
|
|
|
<%= image_tag avatar_path(notification.generator_user, :icon_small), class: 'avatar img-circle' %>
|
2016-10-04 17:51:47 +08:00
|
|
|
</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">
|
2016-10-04 20:16:18 +08:00
|
|
|
<span class="system-message"><i class="glyphicon glyphicon-tower" aria-hidden="true"></i></span>
|
2016-10-04 17:51:47 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-9 col-md-11">
|
2016-10-05 20:30:17 +08:00
|
|
|
<strong><%= notification.title.html_safe %></strong> <br>
|
2016-10-06 18:09:01 +08:00
|
|
|
<%= l(notification.created_at, format: :full) %> | <%= notification.message.html_safe %>
|
2016-10-04 17:51:47 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|