{{api-usage-documentation database=model.database}}

<div class='push-down'>

<h1>Tables</h1>

<table class='table'>
  <thead>
    <tr>
      <th colspan='3'>Name</th>
    </tr>
  </thead>
  <tbody>
    {{#each model.tables as |table|}}
    <tr>
      <td>
        <span>{{table.name}}</span>
      </td>
      <td>
        {{#link-to 'table.rows' table.id class='btn btn-primary'}} Show {{/link-to}} {{#link-to 'functions' table.id class='btn btn-secondary
        push-left-sm'}} Functions {{/link-to}} {{#bs-button type="danger" onClick=(action "deleteTable" table.id) class='push-left-sm'}}
        Delete {{/bs-button}}
      </td>
    </tr>
    {{/each}}
  </tbody>
</table>

<div class='float-right'>
  {{#bs-button type="primary" onClick=(action "addTable")}} Add table {{/bs-button}} {{#bs-button onClick=(action 'transitionBack')}}
  Back {{/bs-button}}
</div>

</div>