{% spaceless %} {% set structure = structure is defined ? structure : null -%} {% set structureEditable = structureEditable is defined ? structureEditable : false -%} {% if structure -%} {% set basePadding = (showCheckboxes ? 14 : 24) + (structureEditable ? 14 : 0) %} {% set padding = craft.app.locale.getOrientation() == 'ltr' ? 'left' : 'right' -%} {% endif -%} {% for element in elements %} {% set totalDescendants = structure ? element.getDescendants() .anyStatus() .drafts(null) .draftOf(false) .savedDraftsOnly() .count() : 0 %} {% if showCheckboxes %}
{% endif %} {% for attribute in attributes %} {% if loop.first %} {%- if structureEditable %} {% endif %} {%- if structure and totalDescendants %}{% endif %} {%- include "_elements/element" -%} {% else %} {{- element.getTableAttributeHtml(attribute[0])|raw -}} {% endif %} {% endfor %} {% endfor %} {% endspaceless -%}