a11yist/app/views/checks/index.html.erb
david 21ab02d647
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s
Links, mainly...
2024-07-26 00:59:00 +02:00

42 lines
1.5 KiB
Text

<h1><%= t("scaffold.pagetitle_index", model: Check.model_name.human(count: 2)) %></h1>
<%= bootstrap_form_with(url: checks_path(page: params[:page]), method: :get, scope: :filter) do |form| %>
<%= form.hidden_field :page, value: params[:page] if params[:page] %>
<div class="row">
<div class="col-md-3">
<%= form.text_field(:s, placeholder: "suchen...", hide_label: true, value: filter_params[:s]) %>
</div>
<div class="col">
<%= form.submit name: "", value: "Suchen" %>
<%= link_to "Filter löschen", checks_path, class: "btn btn-outline-secondary" if filter_params[:s] %>
</div>
</div>
<% end %>
<table class="table table-striped">
<thead>
<tr>
<th><%= Check.human_attribute_name(:id) %></th>
<th><%= Check.human_attribute_name(:level) %></th>
<th><%= Check.human_attribute_name(:name) %></th>
<th><%= Check.human_attribute_name(:success_criterion_html) %></th>
</thead>
<tbody>
<% @checks.each do |check| %>
<tr>
<td><%= check.id %></td>
<td><%= check.level %></td>
<td><%= link_to(check.name, url_for(check)) %></td>
<td><%= link_to(truncate(strip_tags(check.success_criterion_html.to_s)), url_for(check)) %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="my-3">
<%== pagy_info(@pagy) %>
</div>
<%== pagy_bootstrap_nav(@pagy) %>
<div class="action-row">
<%= link_to t("scaffold.link_new", model: Check.model_name.human), new_check_path %>
</div>