{% comment %} Table where each questiongroup occupies one row. The first column is filled with the label of the questiongroup. Further questions are rendered either before the table (questiongroup_config.layout == 'before_table') or after the table. {% endcomment %} <{{ label_tag|default:"h5" }}>{{ numbering|default:'' }} {{ label }} {% if subcategories %} {% for subcategory in subcategories %} {{ subcategory }} {% endfor %} {% else %} {% for qg_config, qg_rendered in questiongroups %} {% if qg_config.layout == 'before_table' %} {{ qg_rendered }} {% endif %} {% endfor %} {% if raw_questiongroups %} {% if layout != 'no_label_row' %} {% endif %} {% for header in table_headers %} {% endfor %} {% for questiongroup in raw_questiongroups %} {% if questiongroup.qg_keyword in table_grouping.0 %} {% for qg in questiongroup.data_labelled %} {% if questiongroup.layout != 'no_label_row' %} {% if qg|length == 2 %} {% endfor %} {% endfor %} {% endif %} {% endfor %}
{{ header }}
{{ questiongroup.label }} {% endif %} {% endif %} {% for k, values in qg %} {% for v in values %} {{ v }} {% endfor %}
{% endif %} {% for qg_config, qg_rendered in questiongroups %} {% if qg_config.layout != 'before_table' %} {{ qg_rendered }} {% endif %} {% endfor %} {% endif %}