Sha256: 007117012ded8df6b47b2849e367142eeac1969940ca198a9f2a25cbaa425be7

Contents?: true

Size: 658 Bytes

Versions: 9

Compression:

Stored size: 658 Bytes

Contents

- div_for @section, :class => @section.custom_class do
  %span.title= @section.title
  - qs ||= []
  - (questions = @section.questions).each_with_index do |q, i|
    - if q.part_of_group?
      - qs << q # gather up the group questions
      - if (i+1 >= questions.size) or (q.question_group_id != questions[i+1].question_group_id)
        - # this is the last question of the section, or the group
        = render q.question_group.custom_renderer || "/partials/question_group", :g => q.question_group, :qs => qs, :f => f
        - qs = []
    - else # gather up the group questions
      = render q.custom_renderer || "/partials/question", :q => q, :f => f

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
surveyor-0.20.0 app/views/partials/_section.html.haml
surveyor-0.19.7 app/views/partials/_section.html.haml
surveyor-0.19.6 app/views/partials/_section.html.haml
surveyor-0.19.5 app/views/partials/_section.html.haml
surveyor-0.19.4 app/views/partials/_section.html.haml
surveyor-0.19.3 app/views/partials/_section.html.haml
surveyor-0.19.2 app/views/partials/_section.html.haml
surveyor-0.19.1 app/views/partials/_section.html.haml
surveyor-0.19.0 app/views/partials/_section.html.haml