Sha256: b9fa10dea6d6e596bcbbf7fe3262a6bea9f33289d3dfc8af93ac8262b3ae4806

Contents?: true

Size: 809 Bytes

Versions: 6

Compression:

Stored size: 809 Bytes

Contents

= div_for @section, :class => @section.custom_class do
  %span.title= @section.translation(I18n.locale)[:title]
  - qs ||= []
  - (questions = @section.questions).each_with_index do |q, i|
    - if q.part_of_group?
      - qs << q if q.is_comment != true # 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 = []
      = render q.custom_renderer || "/partials/question", :q => q, :f => f if q.is_comment == true
    - else # gather up the group questions
      = render q.custom_renderer || "/partials/question", :q => q, :f => f

Version data entries

6 entries across 6 versions & 2 rubygems

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