%- if ['question_pages', 'question_sheets', 'elements'].include?(controller.controller_name) -%>
<%= header || ' ' %> | <%- end -%>||
---|---|---|
<%# grid_el = @elements.to_a.find {|el| el.id == element.id} %> <% col_count = (col_count + 1) % question_grid_with_total.num_cols %> <%= render :partial => 'fe/answer_pages/element', :object => element, :locals => {:in_grid => true, :col => col_count} %> | <%- 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| ci = i + 2 if total_cols.include?(ci) -%><%= text_field_tag "total_#{question_grid_with_total.id}_#{i + 1}", '', :class => 'text validate-number', :readonly => true %> | <% else %><% end %> <%- end -%> |