{% extends "project.html" %}

{% block title %}Project - Tables{% endblock %}

{% block project_actions %}
  <form id="search_table" method="post" action="{{ url_for('project_tables', filename=project.filename) }}">
    <div class="input-group">
      <div class="form-outline">
        <input type="search" id="form1" name="query" class="form-control" placeholder="Table Name" value="{{ query }}"/>
      </div>
      <button type="submit" class="btn btn-primary">Search</button>
    </div>
  </form>
{% endblock %}

{% block project_content %}
  <table class="table table-striped table-bordered table-hover">
    <thead>
      <tr>
        <th>Table Name</th>
      </tr>
    </thead>
    <tbody>
      {% if project.nodes | length == 0 %}
        <tr>
          <td colspan="10">No results</td>
        </tr>
      {% endif %}
      {% for table_name in project.nodes %}
        <tr>
          <td>{{ table_name }}</td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}