codeRIT/hackathon_manager

View on GitHub
app/views/application/_questionnaire_summary.html.haml

Summary

Maintainability
Test Coverage
- if HackathonManager.field_enabled?(:why_attend)
  %p
    %b Why #{HackathonConfig['name']}?
  %p= @questionnaire.why_attend.presence || "(not provided)"
%p
  %b Experience:
  = Questionnaire::POSSIBLE_EXPERIENCES[@questionnaire.experience]
%p
  %b Portfolio link:
  = @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank', rel: 'noopener') : 'Not provided'
%p
  %b GitHub/GitLab/Bitbucket link:
  = @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank', rel: 'noopener') : 'Not provided'
%p
  %b Resume:
  = @questionnaire.resume.attached? ? link_to("Download »".html_safe, @questionnaire.resume) : 'Not provided'
- if !HackathonConfig['digital_hackathon']
  %p
    %b Traveling from:
    = @questionnaire.travel_not_from_school ? "Somewhere else (#{@questionnaire.travel_location})" : "My school (#{@questionnaire.school.full_name})"
%p
  %b Shirt size:
  = @questionnaire.shirt_size
- if !HackathonConfig['digital_hackathon']
  %p
    %b Dietary restrictions
    = @questionnaire.dietary_restrictions || "<i>(none)</i>".html_safe
%p
  %b Special needs
  = @questionnaire.special_needs || "<i>(none)</i>".html_safe

%fieldset
  - if @questionnaire.user.provider == 'mlh'
    %legend Provided by MyMLH
  %p
    %b First name:
    = @questionnaire.user.first_name
  %p
    %b Last name:
    = @questionnaire.user.last_name
  %p
    %b Email:
    = @questionnaire.email
  %p
    %b Phone:
    = @questionnaire.phone
  %p
    %b Date of birth:
    = @questionnaire.date_of_birth_formatted
  %p
    %b Gender:
    = @questionnaire.gender
  %p
    %b School:
    = @questionnaire.school.full_name
  %p
    %b Major:
    = @questionnaire.major
  %p
    %b Level of study:
    = @questionnaire.level_of_study