21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-29 07:20:50 +02:00
chexpire/app/views/checks/_table.html.erb
2018-07-05 10:27:48 +02:00

48 lines
1.5 KiB
Plaintext

<div class="mb-4 table-responsive">
<table class="table table-checks">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">
<%= t(".domain") %>
<span class="sort-links mx-sm-3 text-nowrap">
<%== checks_sort_links(:domain) %>
</span>
</th>
<th scope="col">
<%= t(".expiry_date") %>
<span class="sort-links mx-sm-3 text-nowrap">
<%== checks_sort_links(:domain_expires_at) %>
</span>
</th>
<th scope="col" class="text-center"><%= t(".edit") %></th>
</tr>
</thead>
<tbody>
<% checks.each do |check| %>
<tr class="check-row <%= check_row_class(check) %>">
<td>
<span class="badge badge-info"><%= t(".kind_labels.#{check.kind}") %></span>
</td>
<td>
<strong><%= check.domain %></strong>
</td>
<td>
<% if check.domain_expires_at.present? %>
<%= content_tag :span, format_date(check.domain_expires_at), class: "d-none d-md-inline" %>
<%= content_tag :span, format_date(check.domain_expires_at, format: :short), class: "d-inline d-md-none" %>
<% end %>
</td>
<td class="action text-center">
<%= link_to edit_check_path(check) do %>
<%== Octicons::Octicon.new("pencil").to_svg %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<%= paginate @checks %>