{%- if table %}
  <form>
    {%- if view.show_controls %}
      <div class="btn-group">
        <a class="btn dropdown-toggle" data-toggle="dropdown">
          Select
          <span class="caret"></span>
        </a>
        <ul class="dropdown-menu">
          <li><a href="">All</a></li>
          <li><a href="">All</a></li>
          <!-- dropdown menu links -->
        </ul>
      </div>
    {%- endif %}

    <table class="table table-striped table-bordered table-condensed"
        id="{{ view.name }}">
      <thead>
        <tr>
        {%- if view.show_controls %}
          <th style="width: 1%;"></th>
        {%- endif %}
        {%- for col in view.columns %}
          <th style="width: {{ col.width }}%;">{{ col.label }}</th>
        {%- endfor %}
        </tr>
      </thead>

      <tbody>
      {%- for line in table %}
          <tr>
          {%- if view.show_controls %}
            <td><input type="checkbox"></td>
          {%- endif %}
          {%- for cell in line %}
            <td>{{ cell }}</td>
          {%- endfor %}
          </tr>
      {%- endfor %}
      </tbody>

      <tfoot>
        <tr>
        {%- if view.show_controls %}
          <th></th>
        {%- endif %}
        {%- for col in view.columns %}
          <th>{{ col.label }}</th>
        {%- endfor %}
        </tr>
      </tfoot>
    </table>
  </form>

  {%- deferJS %}
  <script type="text/javascript">
    $(document).ready(function() {
      {{ js }}
    });
  </script>
  {%- enddeferJS %}

{%- else %}
  No data. {# <a href="new">{{ _("Create new") }}</a>. #}
{%- endif %}

<div style="clear: both;"></div>
