Sha256: 811d20e4ccd0a064a0a574015d9897058e39fb458ff488ab2e3ebe7bee0d5bfb

Contents?: true

Size: 1.14 KB

Versions: 20

Compression:

Stored size: 1.14 KB

Contents

.row
  .col-3
    = render_wizard_sidebar(resource)

    - last_3_cycles = Effective::CpdCycle.sorted.where('start_at <= ?', Time.zone.now).last(3)
    - last_3_scores = Effective::CpdStatement.where(cpd_cycle: last_3_cycles, user: resource.user).sum(&:score)

    %table.table.mt-4
      %tbody
        - if resource.due_date.present? && !resource.was_submitted?
          %tr{title: "#{resource} is due on #{resource.due_date.strftime('%F')}"}
            %td
              %h4= (resource.due_date - Time.zone.now.to_date).to_i.abs

            %td
              = (Time.zone.now > resource.due_date) ? 'days overdue' : 'days left to submit'

        %tr
          %td
            %h4= last_3_scores.to_i

          %td #{cpd_credits_label} in last 3 #{cpd_cycles_label} (including this #{cpd_cycle_label})

  .col-9
    %h1= @page_title

    - if resource.cpd_audit_level.rich_text_all_steps_audit_content.present?
      .mb-2= resource.cpd_audit_level.rich_text_all_steps_audit_content

    - if resource.cpd_audit_level.send("rich_text_#{step}_audit_content").present?
      .mb-2= resource.cpd_audit_level.send("rich_text_#{step}_audit_content")

    = yield

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
effective_cpd-0.1.19 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.18 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.17 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.16 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.15 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.14 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.13 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.12 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.11 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.10 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.9 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.8 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.7 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.6 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.5 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.4 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.3 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.2 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1.1 app/views/effective/cpd_audits/_layout.html.haml
effective_cpd-0.1 app/views/effective/cpd_audits/_layout.html.haml