improve filter
This commit is contained in:
parent
0d2e10d243
commit
351dc53029
3 changed files with 25 additions and 8 deletions
|
|
@ -19,7 +19,7 @@ h1
|
|||
= bootstrap_form_with(url: checks_path, method: :get, scope: :filter) do |form|
|
||||
= form.hidden_field :page, value: params[:page] if params[:page]
|
||||
.row
|
||||
.col-lg-5
|
||||
.col-lg-12
|
||||
= form.text_field(:s, placeholder: "suchen...", hide_label: true, value: filter_params[:s])
|
||||
.col-lg-2
|
||||
- Principle.all.sort_by(&:name_de).each do |principle|
|
||||
|
|
@ -37,6 +37,10 @@ h1
|
|||
- Check.priorities.each do |priority, value|
|
||||
.form-check.form-check-inline
|
||||
= form.check_box :priority, { label: t("priority.#{priority}"), multiple: true, checked: (filter_params[:priority] || []).include?(value.to_s) }, value, nil
|
||||
.col-lg-1
|
||||
- Check.target_disabilities.map { |d, _v| [I18n.t("disability.#{d}"), d] }.each do |target_disability, value|
|
||||
.form-check.form-check-inline
|
||||
= form.check_box :target_disabilities, { label: target_disability, multiple: true, checked: (filter_params[:target_disabilities] || []).include?(value.to_s) }, value, nil
|
||||
.row
|
||||
.col
|
||||
= form.submit name: "", value: "Filtern"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue