<button id="btn-all" type="button" class="btn btn-outline-primary btn-sm" onclick="selectCheckboxes('all')">All</button>
<button id="btn-new" type="button" class="btn btn-outline-primary btn-sm" onclick="selectCheckboxes('new')">New</button>
<button id="btn-empty" type="button" class="btn btn-outline-primary btn-sm" onclick="selectCheckboxes('empty')">Empty</button>
<button id="btn-none" type="button" class="btn btn-outline-primary btn-sm"  onclick="selectCheckboxes('none')">None</button>

<table class="table">
  <thead>
    <tr>
      <th scope="col">Select</th>
      <th scope="col">Name</th>
      <th scope="col">GT</th>
      <th scope="col">Existing</th>
    </tr>
  </thead>
  <tbody>
    {% for p in pages|sort %}
    <tr>
      <td class="col-md-1"><input class="form-check-input" type="checkbox" value="{{ p[0] }}" data-lines="{{ p[1] }}"></input></th>
      <td>{{ p[0] }}</td>
      <td class="col-md-1">{% if p[1] < 0 %} – {% else %}{{ p[1] }}{% endif %}</td>
      <td class="col-md-1">{% if p[1] > -1 %}
        <span class="glyphicon glyphicon-flash" aria-hidden="true"></span>
        {% else %}
        <span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>
        {% endif %}
      </td>
    </tr>
    {% endfor %}
  </tbody>
</table>
