62 lines
2.2 KiB
Text
62 lines
2.2 KiB
Text
h1
|
|
= t("scaffold.pagetitle_index", model: Check.model_name.human(count: 2))
|
|
|
|
/= search_form_for @q do |f|
|
|
= f.search_field :name_cont
|
|
/= f.select :principle_id_in, options_from_collection_for_select(Principle.all.sort_by(&:name_de), :id, :name_de, filter_params[:principle_id_in]), { include_blank: false }, { multiple: true, class: "form-select" }
|
|
= f.label :principle_id_in, "Prinzip"
|
|
.d-flex.flex-row.mb-3
|
|
- Principle.all.sort_by(&:name_de).each do |principle|
|
|
.me-3
|
|
= f.check_box :principle_id_in, checked: @q[:principle_id_in].include?(principle.id), label: principle.name_de, id: "principle_id_in_#{principle.id}"
|
|
= f.submit
|
|
|
|
= 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]
|
|
.row
|
|
.col-md-3
|
|
= form.text_field(:s, placeholder: "suchen...", hide_label: true, value: filter_params[:s])
|
|
.col
|
|
= form.submit name: "", value: "Suchen"
|
|
= link_to "Filter löschen", checks_path, class: "btn btn-outline-secondary ms-3" if filter_params[:s]
|
|
table.table.table-striped
|
|
thead
|
|
tr
|
|
th ID
|
|
th
|
|
= Check.human_attribute_name(:number)
|
|
th
|
|
= Check.human_attribute_name(:name)
|
|
th
|
|
= Check.human_attribute_name(:standard_ids)
|
|
th
|
|
= Check.human_attribute_name(:target_disability)
|
|
th
|
|
= Check.human_attribute_name(:applicability)
|
|
th
|
|
= Check.human_attribute_name(:external_number)
|
|
th
|
|
= Check.human_attribute_name(:conformity_level)
|
|
tbody
|
|
- @checks.each do |check|
|
|
tr
|
|
td = link_to check.id, check
|
|
td
|
|
= link_to(check.number, check)
|
|
td
|
|
= link_to check.t_name&.truncate(64), check
|
|
td
|
|
= link_to check.standards.map(&:t_name).join(", "), check
|
|
td
|
|
= link_to check.display_target_disabilities, check
|
|
td
|
|
= link_to check.display_applicabilities, check
|
|
td
|
|
= link_to check.external_number, check
|
|
td
|
|
= link_to check.conformity_level, check
|
|
.my-3
|
|
== pagy_info(@pagy)
|
|
== pagy_bootstrap_nav(@pagy)
|
|
.action-row
|
|
= link_to t("scaffold.link_new", model: Check.model_name.human), new_check_path
|