Sha256: a716b51aa05445d0c0099d46c670e24d1b302250ee1723b2ba8bbfcea098bd4c

Contents?: true

Size: 924 Bytes

Versions: 6

Compression:

Stored size: 924 Bytes

Contents

%tr.question_group
  %td
  %td
  %td
    %table
      %tr.question_group_header
        - question_group.questions.each do |group_question|
          %td
            = group_question.text
     
      - question_ids = question_group.questions.collect(&:id)
      - responses = @responses.where('responses.question_id in (?)', question_ids).map{|r| {response_set_id: r.response_set_id, question_id: r.question_id, response: r.response_value}}
      - (responses.select{|response| response[:response_set_id]==@response_set.id}.count/question_ids.count).times do |index|
        %tr{class: index==0 ? "first_row" : nil}
          - question_ids.each do |question_id|
            %td
              - if response = responses.select{|response| response[:response_set_id] == @response_set.id && response[:question_id] == question_id}[index]
                = response[:response]
      %tr
        %td
           
             

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
upgrade_surveyor_gui-0.1.3 app/views/surveyor_gui/responses/_repeater.html.haml
upgrade_surveyor_gui-0.1.2 app/views/surveyor_gui/responses/_repeater.html.haml
surveyor_gui-0.1.2 app/views/surveyor_gui/responses/_repeater.html.haml
surveyor_gui-0.1.1 app/views/surveyor_gui/responses/_repeater.html.haml
surveyor_gui-0.1.0 app/views/surveyor_gui/responses/_repeater.html.haml
surveyor_gui-0.0.3 app/views/surveyor_gui/responses/_repeater.html.haml