add pagy, improve checks#index
This commit is contained in:
parent
c44c9ccaba
commit
6d3a269231
11 changed files with 274 additions and 10 deletions
|
|
@ -1,5 +1,18 @@
|
|||
<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 %>
|
||||
|
||||
<%== pagy_info(@pagy) %>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -20,6 +33,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<%== pagy_bootstrap_nav(@pagy) %>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: Check.model_name.human), new_check_path %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue