Show task due date in UTC [SCI-3466]

This commit is contained in:
Oleksii Kriuchykhin 2019-05-15 15:17:44 +02:00
parent 039b2f3754
commit 71a4a1348a
2 changed files with 8 additions and 8 deletions

View file

@ -1,25 +1,25 @@
<% if my_module.completed? %>
<%= t("my_modules.states.completed") %>
<span class="due-date-label">
<%= l(my_module.completed_on, format: :full_date) %>
<%= l(my_module.completed_on.utc, format: :full_date) %>
<span class="fas fa-check"></span>
</span>
<% elsif my_module.is_one_day_prior? %>
<%= t("my_modules.states.due_soon") %>
<span class="due-date-label">
<%=l my_module.due_date, format: :full_date %>
<%=l my_module.due_date.utc, format: :full_date %>
<span class="fas fa-exclamation-triangle"></span>
</span>
<% elsif my_module.is_overdue? %>
<%= t("my_modules.states.overdue") %>
<span class="due-date-label">
<%=l my_module.due_date, format: :full_date %>
<%=l my_module.due_date.utc, format: :full_date %>
<span class="fas fa-exclamation-triangle"></span>
</span>
<% elsif my_module.due_date %>
<%= t("experiments.canvas.full_zoom.due_date") %>
<span class="due-date-label">
<%=l my_module.due_date, format: :full_date %>
<%=l my_module.due_date.utc, format: :full_date %>
</span>
<% else %>
<%= t("experiments.canvas.full_zoom.due_date") %>

View file

@ -4,20 +4,20 @@
<strong>
<% if my_module.completed? %>
<span class="alert-green">
<%= l(my_module.due_date, format: :full) %>
<%= l(my_module.due_date.utc, format: :full) %>
</span>
<% elsif my_module.is_one_day_prior? %>
<span class="alert-yellow">
<%= l(my_module.due_date, format: :full) %>
<%= l(my_module.due_date.utc, format: :full) %>
(<%= t('my_modules.states.due_soon') %>)
</span>
<% elsif my_module.is_overdue? %>
<span class="alert-red">
<%= l(my_module.due_date, format: :full) %>
<%= l(my_module.due_date.utc, format: :full) %>
(<%= t('my_modules.states.overdue') %>)
</span>
<% else %>
<%= l(my_module.due_date, format: :full) %>
<%= l(my_module.due_date.utc, format: :full) %>
<% end %>
</strong>
<% end %>