Sha256: 2644ff8af79ecba5cb532c5996de01d9360dffe588245677f9d385e862ce1b6c

Contents?: true

Size: 1.63 KB

Versions: 28

Compression:

Stored size: 1.63 KB

Contents

= render('layout') do
  - cpd_audit_level_section = resource.cpd_audit.cpd_audit_level_section(step)
  - raise("no cpd audit section for #{step}") if cpd_audit_level_section.blank?

  %h2 Review Section
  %p Please review auditee responses to the #{cpd_audit_level_section} section:

  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
    = f.hidden_field :current_step

    - if cpd_audit_level_section.top_content.present?
      .mb-2= cpd_audit_level_section.top_content.to_s

    %table.table.table-hover
      %thead
        %th Responses submitted by #{resource.cpd_audit.name}
        %th Review by #{resource.name}
      %tbody
        - cpd_audit_level_section.cpd_audit_level_questions.each_with_index do |cpd_audit_level_question, index|
          - cpd_audit_response = resource.cpd_audit.cpd_audit_response(cpd_audit_level_question)
          - next if cpd_audit_response.new_record?

          - cpd_audit_review_item = resource.cpd_audit_review_item(cpd_audit_response)

          %tr
            %td
              .mb-3= render(cpd_audit_level_question)

              %p
                %strong Auditee Response:

              .mb-3= render(cpd_audit_response)
            %td
              = f.fields_for :cpd_audit_review_items, cpd_audit_review_item do |fi|
                = render('/effective/cpd_audit_review_items/fields', f: fi, cpd_audit_review: resource)

    - if cpd_audit_level_section.bottom_content.present?
      .mb-2= cpd_audit_level_section.bottom_content.to_s

    %hr
    = f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"

    = f.submit 'Save and Continue', center: true

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
effective_cpd-1.7.2 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.7.1 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.7.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.5 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.4 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.3 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.2 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.1 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.6.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.5.1 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.5.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.8 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.7 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.6 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.5 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.4 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.3 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.2 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.1 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.4.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml