Sha256: 5b11065d16361d81dd1f468642d75f63d2a9166dcdd9769479be42cd435db265

Contents?: true

Size: 1.16 KB

Versions: 16

Compression:

Stored size: 1.16 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= cpd_score(last_3_scores.to_d)

          %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.to_s

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

    = yield

Version data entries

16 entries across 16 versions & 1 rubygems

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