Check show ansicht
This commit is contained in:
parent
4f98673205
commit
29a2bd7466
9 changed files with 74 additions and 25 deletions
|
|
@ -4,15 +4,15 @@ div id=dom_id(check)
|
|||
tr
|
||||
th = Check.human_attribute_name(:id)
|
||||
td = check.id
|
||||
tr
|
||||
th = Principle.model_name.human
|
||||
td = check.principle&.t_name
|
||||
tr
|
||||
th = Check.human_attribute_name(:number)
|
||||
td = check.number
|
||||
tr
|
||||
th = Check.human_attribute_name(:name)
|
||||
td = check.t_name
|
||||
tr
|
||||
th = Check.human_attribute_name(:number)
|
||||
td = check.number
|
||||
tr
|
||||
th = Principle.model_name.human
|
||||
td = check.principle&.t_name
|
||||
tr
|
||||
th = Standard.model_name.human(count: check.standard_ids.size)
|
||||
td = check.standards.map(&:t_name).join(", ")
|
||||
|
|
@ -25,36 +25,48 @@ div id=dom_id(check)
|
|||
tr
|
||||
th = Check.human_attribute_name(:external_number)
|
||||
td = check.external_number
|
||||
tr
|
||||
th = Check.human_attribute_name(:external_url)
|
||||
td = check.external_url
|
||||
tr
|
||||
th = Check.human_attribute_name(:conformity_level)
|
||||
td = check.conformity_level
|
||||
tr
|
||||
th = Check.human_attribute_name(:conformity_notice_de)
|
||||
td = check.conformity_notice_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:conformity_notice_en)
|
||||
td = check.conformity_notice_en
|
||||
tr
|
||||
th = Check.human_attribute_name(:priority)
|
||||
td = check.priority
|
||||
td = safe_display(check.priority) { I18n.t("priority.#{_1}") }
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_criterion_de)
|
||||
td = check.quick_criterion_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_criterion_en)
|
||||
td = check.quick_criterion_en
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_fail_de)
|
||||
td = check.quick_fail_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_fail_en)
|
||||
td = check.quick_fail_en
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_fix_de)
|
||||
td = check.quick_fix_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:quick_fix_en)
|
||||
td = check.quick_fix_en
|
||||
th = Check.human_attribute_name(:criterion_de)
|
||||
td = check.criterion_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:criterion_details_de)
|
||||
td = check.criterion_details_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:example_de)
|
||||
td = check.example_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:exemption_details_de)
|
||||
td = check.exemption_details_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:test_instructions)
|
||||
td = check.test_instructions
|
||||
tr
|
||||
th = Check.human_attribute_name(:powerpoint_text_de)
|
||||
td = check.powerpoint_text_de
|
||||
tr
|
||||
th = Check.human_attribute_name(:comment)
|
||||
td = check.comment
|
||||
tr
|
||||
th = Link.model_name.human(count: check.links.size)
|
||||
td
|
||||
|
|
|
|||
|
|
@ -5,23 +5,26 @@
|
|||
.row
|
||||
= form.collection_radio_buttons(:principle_id, Principle.all.sort_by(&:t_name), :id, :t_name) { |b| b.label(class: "col-md-2") { b.radio_button + b.text } }
|
||||
= form.collection_check_boxes :standard_ids, Standard.all.sort_by{ _1.t_name.downcase }, :id, :t_name, include_blank: true
|
||||
|
||||
h2 Zugänglichkeit
|
||||
.row
|
||||
- %w[visual auditory physical cognitive].sort_by { |d| t("disability.#{d}") }.each do |d|
|
||||
.col-md-3
|
||||
= form.check_box d, label: t("disability.#{d}").capitalize
|
||||
|
||||
h2 Anwendbarkeit
|
||||
.row
|
||||
- %w[applicable_to_web applicable_to_app].sort_by { |d| t("applicability.#{d}") }.each do |d|
|
||||
.col-md-6
|
||||
= form.check_box d, label: t("applicability.#{d}").capitalize
|
||||
|
||||
h2 Richtlinie
|
||||
= form.text_field :external_number
|
||||
= form.text_field :external_url
|
||||
= form.select :conformity_level, Check.conformity_levels.keys, include_blank: true
|
||||
= multilang_form_field(form, :conformity_notice, as: :rich_text_area)
|
||||
|
||||
= form.select :priority, Check.priorities.keys.map{ [t("priority.#{_1}"), _1] }, include_blank: true
|
||||
|
||||
h2 Quick Infos
|
||||
= multilang_form_field(form, :quick_criterion, as: :rich_text_area)
|
||||
= multilang_form_field(form, :quick_fail, as: :rich_text_area)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue