2019-04-30 19:30:09 +08:00
|
|
|
<div class="title text-bold"><b><%= t("projects.index.notifications_tab") %></b></div>
|
2016-02-12 23:52:43 +08:00
|
|
|
<hr>
|
|
|
|
<ul class="no-style double-line content-notifications">
|
|
|
|
<% nr_of_notifications = 0 %>
|
|
|
|
<% @modules.each do |mod| %>
|
2019-04-12 15:17:34 +08:00
|
|
|
<% if mod.is_overdue? && !mod.completed? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% nr_of_notifications += 1 %>
|
|
|
|
<% days = t("projects.index.module_overdue_days", count: mod.overdue_for_days) %>
|
|
|
|
<li class="notification alert-red">
|
|
|
|
<div class="date-time">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-exclamation-triangle"></span>
|
2019-04-30 19:30:09 +08:00
|
|
|
<span><%= l(mod.due_date, format: :full) %></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<%=t "projects.index.module_overdue_html", module: mod.name, days: days %>
|
|
|
|
</li>
|
2019-04-12 15:17:34 +08:00
|
|
|
<% elsif mod.is_one_day_prior? && !mod.completed? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% nr_of_notifications += 1 %>
|
|
|
|
<li class="notification alert-yellow">
|
|
|
|
<div class="date-time">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-exclamation-triangle"></span>
|
2019-04-30 19:30:09 +08:00
|
|
|
<span><%= l(mod.due_date, format: :full) %></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<%=t "projects.index.module_one_day_due_html", module: mod.name %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if nr_of_notifications == 0 %>
|
2019-04-30 19:30:09 +08:00
|
|
|
<li><%= t 'projects.index.no_notifications' %></li>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</ul>
|