

%table.table
    
  %tr
    %th id
    -@survey.items.each do |survey_item|
      %th
        =survey_item.title
        %br
        =survey_item.questions_type
        
      -if survey_item.questions_type == 3
        -survey_item.answers.each do |survey_item_answer|
          %th=survey_item_answer.label_text
        

  -@survey_sets.each do |survey_set|
    %tr
      %td
        =survey_set.id
      -survey_set.survey_type.items.each do |survey_item|
        -question_set = survey_set.question_sets.find_by_survey_item_id(survey_item.id)
        %td
          =question_set.content
        
        
        -if survey_item.questions_type == 3
          -survey_item.answers.each do |survey_item_answer|
          
            -answer_set = question_set.answer_sets.find_by_survey_item_answer_id(survey_item_answer.id)
            %td
              
              -if answer_set
                -if answer_set.content?
                  =answer_set.content
                -else
                  ="oui" if answer_set.is_checked
            
              
              
:scss
  .table{
    td, th{
    border:1px solid black;}
  }