%- if ['question_pages', 'question_sheets', 'elements'].include?(controller.controller_name) -%>
<%= header || ' ' %> | <%- end -%>||
---|---|---|
<% grid_el = @elements.to_a.find {|el| el.id == element.id} %> <%= render :partial => 'answer_pages/element', :object => grid_el, :locals => {:in_grid => true, :col => col_count} if grid_el %> | <%- col_count += 1 if col_count % question_grid_with_total.num_cols == 0 && element != question_grid_with_total.elements.last then col_count = 0 -%>||
<%- end unless col_count == 0-%> | ||
Total | <%- total_cols = question_grid_with_total.total_cols.split(',').collect(&:to_i) (question_grid_with_total.num_cols - 1).times do |i| if total_cols.include?(i + 2) -%><%= text_field_tag "total_#{question_grid_with_total.id}_#{i + 1}", '', :class => 'text validate-number', :readonly => true %> | <% else %><% end %> <%- end -%> |