Sha256: e3c267cfd9bb79ddb2d96e1099ec4116bb4a98f1f9712d508362fa197120785b

Contents?: true

Size: 899 Bytes

Versions: 13

Compression:

Stored size: 899 Bytes

Contents

- div_for @section, :class => @section.custom_class do
  %span.title= @section.title
  .questions
    - group_questions ||= []
    - @questions.each_with_index do |question, index|
      - unless question.part_of_group?
        = render(:partial => question.custom_renderer || "/partials/question", :locals => {:question => question, :response_set => @response_set})
      - else # gather up the group questions
        - group_questions << question
        - if (index + 1 >= @questions.size) or (question.question_group_id != @questions[index + 1].question_group_id)
          - # this is the last question of the section, or the group
          = render(:partial => question.question_group.custom_renderer || "/partials/question_group", :locals => {:question_group => question.question_group, :response_set => @response_set, :group_questions => group_questions})
          - group_questions = []

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
surveyor-0.18.2 app/views/partials/_section.html.haml
surveyor-0.18.1 app/views/partials/_section.html.haml
surveyor-0.18.0 app/views/partials/_section.html.haml
surveyor-0.17.0 app/views/partials/_section.html.haml
surveyor-0.16.1 app/views/partials/_section.html.haml
surveyor-0.16.0 app/views/partials/_section.html.haml
surveyor-0.15.0 app/views/partials/_section.html.haml
surveyor-0.14.5 app/views/partials/_section.html.haml
surveyor-0.14.4 app/views/partials/_section.html.haml
surveyor-0.14.3 app/views/partials/_section.html.haml
surveyor-0.14.2 app/views/partials/_section.html.haml
surveyor-0.14.1 app/views/partials/_section.html.haml
surveyor-0.14.0 app/views/partials/_section.html.haml