Sha256: de4ff05f4906a5e8fa39a96a365c80f332e5ef5e60c0fec81e65f766b5ade893

Contents?: true

Size: 1.65 KB

Versions: 8

Compression:

Stored size: 1.65 KB

Contents

- cache assessment do
  .assessment
    - if !assessment.completed_at && !assessment.by_mail?
      p.section-count<>
        | (#{assessment.results.select(&:finished?).count}/#{assessment.results.count})
    p.updated<> = link_to without_timezone(assessment.assessment_updated_at), edit_admin_assessment_path(assessment.id)

    - if assessment.group_index
      p<>
        span.set-requested title="Randomization Set #{assessment.group_index_name}" = assessment.group_index_name

    - if assessment.method_applied.present?
      - title = assessment.by_url? ? "By URL #{study_url}#{assessment_path(assessment)}" : assessment.method_applied
      - title += " - #{assessment.coordinator.email} " if assessment.coordinator
      p<> title=title class="assessment-method #{assessment.method_applied.parameterize}"
        span = title

    .note-wrapper.admin-only<>
      = form_tag admin_assessment_notes_path(assessment), method: :put do |form|
        input.toggle-note type="checkbox" id="notes-toggle-#{assessment.id}"
        label.note for="notes-toggle-#{assessment.id}" class="#{"-saved" if assessment.notes?}"
          span Take note

        .note-modal
          label.close for="notes-toggle-#{assessment.id}"
          .field
            label for="notes-#{assessment.id}" Assessment note:
            textarea id="notes-#{assessment.id}" name="notes" = assessment.notes
          .field
            .save-wrapper
              input type="submit" value="Save note"

    p.admin-only<>
      = link_to [:admin, assessment], method: :delete, class: "delete", data: { confirm: "Are you sure you want to delete this assessment?" } do
        span Delete #{assessment.event}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
study_engine-0.3.1 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.3.0 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.2.2 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.2.1 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.2.0 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.1.1 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.1.0 app/views/study_engine/admin/assessments/_assessment.html.slim
study_engine-0.0.2 app/views/study_engine/admin/assessments/_assessment.html.slim