21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-28 23:10:49 +02:00
chexpire/app/views/checks/_table.html.erb

50 lines
1.7 KiB
Plaintext

<div class="mb-4 table-responsive">
<table class="table checks-table">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">
<%= t(".th.domain") %>
<span class="sort-links mx-sm-2 text-nowrap">
<%== checks_sort_links(:domain) %>
</span>
</th>
<th scope="col">
<span class="d-none d-sm-inline"><%= t(".th.expiry_date") %></span>
<span class="d-inline d-sm-none"><%= t(".th.expiry_date_short") %></span>
<span class="sort-links mx-sm-2 text-nowrap">
<%== checks_sort_links(:domain_expires_at) %>
</span>
</th>
<th scope="col" class="text-right"><%= t(".th.edit") %></th>
</tr>
</thead>
<tbody>
<% checks.each do |check| %>
<tr class="check-row <%= check_row_class(check) %>">
<td class="kind">
<span class="badge badge-info"><%= t(".kind_labels.#{check.kind}") %></span>
</td>
<td>
<%= check_error(check) if check_in_error?(check) %>
<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-right">
<%= link_to edit_check_path(check), "data-turbolinks" => false do %>
<%== Octicons::Octicon.new("pencil").to_svg %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<%= paginate @checks %>