Sha256: e8c49482c0a8558893f3ed2eb8115700f1b16afc5c9731ee88f3dd9c8a6eb42f
Contents?: true
Size: 1.92 KB
Versions: 7
Compression:
Stored size: 1.92 KB
Contents
- renderer = question_group.renderer - locals = {:question_group => question_group, :response_set => response_set, :hide_label => true} - div_for question_group do .head .number= next_number %span.text= question_group.text %span.help= question_group.help_text - case question_group.renderer - when :grid %table.grid %thead %tr %th= " " - reset_cycle("column_highlight") - group_questions.first.answers.each do |answer| %th{:class => "#{cycle("column_highlight", "", :name => "column_highlight")}"}= answer.text %tfoot %tr %th= " " - reset_cycle("column_highlight") - group_questions.first.answers.each do |answer| %th{:class => "#{cycle("column_highlight","", :name => "column_highlight")}"}= answer.text %tbody - group_questions.each do |question| = render(:partial => "/partials/question", :locals => locals.merge({:question => question})) - when :repeater %ul.repeater - (response_set.count_group_responses(group_questions) + 1).times do |group_number| %li.repeater - group_questions.each do |question| = render(:partial => "/partials/question", :locals => locals.merge({:question => question, :response_group => group_number, :disabled => false})) %li.repeater - group_questions.each do |question| = render(:partial => "/partials/question", :locals => locals.merge({:question => question, :response_group => 9999, :disabled => true})) = submit_tag("<= add row", :name => "section[#{group_questions.first.survey_section_id}]question_group_#{question_group.id}", :class => "add_row") - else # :inline %ul - group_questions.each do |question| %li{:class => question_group.renderer == :inline ? "inline" : nil}= render(:partial => "/partials/question", :locals => locals.merge({:question => question}))
Version data entries
7 entries across 7 versions & 1 rubygems