% if element.kind == "Fe::QuestionGrid" || element.kind == "Fe::QuestionGridWithTotal"-%>
<%= raw header || ' ' %> | <%- end -%>
---|
<% if %w(Fe::Paragraph).include?(grid_element.kind) -%>
<%= simple_format grid_element.content %>
<% else -%>
<%# el = elements.detect {|el| el.id == grid_element.id } -%>
<% if grid_element.question? -%>
<%- if @collating -%>
<%- for answer_sheet in @collated_answer_sheets[@answer_sheet] -%>
<%= answer_sheet.collat_title %>:
<%= simple_format grid_element.display_response(answer_sheet) %>
<%- end -%>
<%- else -%>
<%= simple_format grid_element.display_response(@answer_sheet) %>
<%- end -%>
<% elsif grid_element.is_a?(Fe::QuestionGrid) || grid_element.is_a?(Fe::QuestionGridWithTotal) %>
|
<%- col_count += 1
if col_count % element.num_cols == 0 then col_count = 0 -%>
<%- end unless col_count == 0-%> |