2016-09-29 20:49:58 +08:00
|
|
|
<% @recent_notifications.each do |notification| %>
|
2016-10-03 14:20:23 +08:00
|
|
|
<li class="notification <%= 'unseen' unless notification.already_seen(current_user) %>">
|
2016-09-29 20:49:58 +08:00
|
|
|
<div class="row">
|
2016-10-03 14:20:23 +08:00
|
|
|
<div class="col-xs-2">
|
2016-11-03 21:48:01 +08:00
|
|
|
<span style="display: none;" data-hook="user-notification-recent-list-item"></span>
|
2016-09-29 22:05:43 +08:00
|
|
|
<% if notification.type_of == 'recent_changes' %>
|
|
|
|
<div class="text-center">
|
2016-10-03 14:20:23 +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 %>
|
2016-10-03 14:20:23 +08:00
|
|
|
<% if notification.type_of == 'system_message' %>
|
|
|
|
<div class="text-center">
|
2016-10-12 21:32:40 +08:00
|
|
|
<span class="system-message"><i class="glyphicon glyphicon-tower" aria-hidden="true"></i></span>
|
2016-10-03 14:20:23 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-09-29 20:49:58 +08:00
|
|
|
</div>
|
2016-10-03 22:14:22 +08:00
|
|
|
|
2016-10-03 14:20:23 +08:00
|
|
|
<div class="col-xs-10">
|
2017-01-04 00:27:22 +08:00
|
|
|
<strong><%= sanitize_input(notification.title) %></strong> <br>
|
|
|
|
<%= l(notification.created_at, format: :full) %> | <%= sanitize_input(notification.message) %>
|
2016-09-29 20:49:58 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<li>
|
|
|
|
<% end %>
|