blob: eb740f2ab8edcc19a9561d6c60b74fa993ace909 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<div class="panel <%= panel_class(notice) %> notice" data-services="<%= notice['affects'].join ' ' %>" data-url="<%= notice.url %>">
<div class="panel-heading">
<h3 class="panel-title"><%= item_icon notice['type']%> <a href="/notice/<%= h notice['id'] %>"><%= h notice['title'] %></a></h3>
</div>
<div class="panel-body">
<%= markdown notice.content %>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top" title="Notice publication date">
<span class="glyphicon glyphicon-send pull-left" title="Notice publication date"></span>
<div style="margin-left: 1.25em"><em><%= date_format notice['created_at'] %></em></div>
</div>
<% if notice.key? 'starts_at' %>
<%- diff = ((DateTime.now - notice['starts_at']) * 24 * 60 * 60).to_i %>
<div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top"
<% if diff < 0 %>
title="Maintenance starts in <%= humanize(-diff) %>"
<% else %>
title="Maintenance started <%= humanize(diff) %> ago"
<% end %>>
<span class="glyphicon glyphicon-wrench pull-left" title="Maintenance start time"></span>
<div style="margin-left: 1.25em;"><em><%= date_format notice['starts_at'] %></em></div>
</div>
<% else %>
<div class="col-sm-4"></div>
<% end %>
<div class="col-sm-4 has-tooltip" data-toggle="tooltip" data-placement="top" title="Estimated time of service recovery">
<span class="glyphicon glyphicon-ok pull-left" title="Estimated time of service recovery"></span>
<div style="margin-left: 1.25em;">
<% if notice.key? 'eta' %>
<em><%= date_format notice['eta'] %></em> (estimated)
<% else %>
No ETA for service recovery available.
<% end %>
</div>
</div>
</div>
</div>
</div>
|