{% extends "base_tables.html" %}

{% block content_title %}
  <a href="{{ url_for('index') }}">{{ dataset.base_name }}</a> &mdash; {{ table }}
{% endblock %}

{% block content %}
  <ul class="nav nav-tabs">
    <li class="nav-item">
      <a class="nav-link{% block structure_tab_class %}{% endblock %}" href="{{ url_for('table_structure', table=table) }}">Structure</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block content_tab_class %}{% endblock %}" href="{{ url_for('table_content', table=table) }}">Content</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block query_tab_class %}{% endblock %}" href="{{ url_for('table_query', table=table) }}">Query</a>
    </li>
    {% if not dataset.is_readonly %}
    <li class="nav-item ml-auto">
      <a class="nav-link{% block drop_tab_class %}{% endblock %}" href="{{ url_for('drop_table', table=table) }}">Drop</a>
    </li>
    <li class="nav-item">
      <a class="nav-link{% block import_tab_class %}{% endblock %}" href="{{ url_for('table_import', table=table) }}">Import</a>
    </li>
    {% endif %}
    {% block inner_nav %}{% endblock %}
  </ul>
  <div style="margin-top: 20px;">
    {% block inner_content %}
    {% endblock %}
  </div>
{% endblock %}
