{% extends "passerelle/manage/service_view.html" %}
{% load i18n passerelle %}

{% block extra-tab-buttons %}
  {% for name, columns in object.description_csv_tables %}
    <button role="tab" aria-selected="false" aria-controls="panel-csv-{{name }}" id="tab-csv-{{ name }}" tabindex="-1">{% blocktrans %}{{ name }} CSV columns{% endblocktrans %}</button>
  {% endfor %}
{% endblock %}

{% block extra-sections %}
  {% for name, columns in object.description_csv_tables %}
    <div id="panel-csv-{{ name }}" role="tabpanel" tabindex="-1" aria-labelledby="tab-csv-{{ name }}" hidden>
      <table class="main">
        <thead>
          <tr>
            <th>{% trans "Field" %}</th>
            <th>{% trans "Title" %}</th>
          </tr>
        </thead>
        <tbody>
          {% for field, title in columns %}
            <tr>
              <td><tt>{{ field }}</tt></td>
              <td>{{ title }}</td>
            </tr>
          {% endfor %}
        </tbody>
      </table></p>
    </div>
  {% endfor %}

{% endblock %}
