Sha256: abf96c750a6be39b8e82326b7959ffc1e15271e9c1862b47d9e227e6e1811a24
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
- label_width = "#{60 / question.labels.count}%" .radio_matrix class="#{'helena-error' if errors.present?}" = question_label(question, dummy: true) table thead tr td - question.labels.each do |label| th width="#{label_width}" = label.text td tbody - question.sub_questions.each do |sub_question| tr class="#{'error' if errors[sub_question.code]}" id="question_#{sub_question.code}" td = sub_question.parts.first - if errors[sub_question.code] .error= errors[sub_question.code] - question.labels.each_with_index do |label, index| - checked = answers[sub_question.code].to_s == label.value.to_s if answers[sub_question.code].present? - checked ||= (label.preselected? ? true : false) th width="#{label_width}" label = form.simple_fields_for :answers do |answer_form| = answer_form.radio_button sub_question.code, label.value, checked: checked span.label-text - if index < (question.labels.size / 2) = "#{label.text} #{sub_question.parts.first}" - elsif index > (question.labels.size / 2) = "#{label.text} #{sub_question.parts.last}" - else = label.text td = sub_question.parts.last if sub_question.splitted?
Version data entries
4 entries across 4 versions & 1 rubygems