Sha256: ff6ca1a57c2c852e84d93dc2c524cd7e2ea47558ad1ef88a9f0eb17ba1eab2a2

Contents?: true

Size: 1.61 KB

Versions: 14

Compression:

Stored size: 1.61 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 Question and #{resource.cpd_audit.user}'s Response
        %th #{resource.user}'s Review
      %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, label: 'Reviewer comments'

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
effective_cpd-0.6.9 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-1.0.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.8 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.7 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.6 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.5 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.4 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.3 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.2 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.1 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.6.0 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.5.4 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.5.3 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml
effective_cpd-0.5.2 app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml