{% extends "@MapbenderManager/Repository/instance.html.twig" %}

{% block form_layers %}
    <table id="instanceTable" class="table table-outlined table-condensed instanceTable">
      <thead>
      {% set _proto = form.layers.vars.prototype %}
        <tr>
          <th></th>
          <th>{{ form.title.vars.label | trans}}</th>
          {%- block layer_table_headers1 -%}
          <th class="checkboxColumn">{{"mb.wms.wmsloader.repo.instance.label.active"|trans}}</th>
          <th colspan="2" class="{{- ['checkboxColumn', _proto.allowselected.vars.columnClass | default(''), _proto.selected.vars.columnClass | default('')] | join(' ') -}}">{{"mb.wms.wmsloader.repo.instance.label.select"|trans}}</th>
          <th class="checkboxColumn group-start group-end" colspan="2">{{"mb.wms.wmsloader.repo.instance.label.toggle"|trans}}</th>
          {%- endblock -%}
          <th></th>
        </tr>
        <tr>
          <th colspan="3"></th>
          {%- block layer_table_headers2 -%}
          <th class="{{- ['checkboxColumn smallText', _proto.allowselected.vars.columnClass | default('')] | join(' ') -}}">{{"mb.wms.wmsloader.repo.instance.label.allow"|trans}}</th>
          <th class="{{- ['checkboxColumn smallText', _proto.selected.vars.columnClass | default('')] | join(' ') -}}">{{"mb.wms.wmsloader.repo.instance.label.on"|trans}}</th>
          <th class="checkboxColumn smallText group-start">{{"mb.wms.wmsloader.repo.instance.label.allow"|trans}}</th>
          <th class="checkboxColumn smallText group-end">{{"mb.wms.wmsloader.repo.instance.label.on"|trans}}</th>
          {%- endblock -%}
          <th></th>
        </tr>
        <tr>
          <th colspan="2"></th>
          {%- block layer_table_headers3 -%}
          {{ form_row(_proto.active, {'tagName': 'th'}) }}
          {{ form_row(_proto.allowselected, {'tagName': 'th'}) }}
          {{ form_row(_proto.selected, {'tagName': 'th'}) }}
          {{ form_row(_proto.allowtoggle, {'tagName': 'th'}) }}
          {{ form_row(_proto.toggle, {'tagName': 'th'}) }}
          {%- endblock -%}
          <th></th>
        </tr>
      </thead>
      <tbody>
      {%- block layer_rows -%}
      {%- endblock -%}
        <tr class="dummy">
          <td colspan="20"></td>
        </tr>
      </tbody>
    </table>
{% endblock %}
