<div>
  {% if tickets|length %}
  {{widget.fields['page_size'].display(page=page, count=count, limit=limit)}}
    <table>
      <thead>
        <tr>
          <th style="width:20px">
            <input type="checkbox" id="select_all">
          </th>
          <th data-sort="ticket_num_i">#</th>
          <th data-sort="snippet_s">Summary</th>
          <th data-sort="_milestone_s">Milestone</th>
          <th data-sort="status_s">Status</th>
          <th data-sort="assigned_to_s">Owner</th>
        </tr>
      </thead>
      <tbody class="ticket-list">
        {% for t in tickets %}
        <tr>
          <td><input type="checkbox" name="{{t._id}}" value=""/></td>
          <td><a href="{{t.url()}}">{{t.ticket_num}}</a></td>
          <td><a href="{{t.url()}}">{{t.summary}}</a></td>
          <td>{{t._milestone}}</td>
          <td class="{{t.status}}">{{t.status}}</td>
          <td>{% if t.assigned_to_id %}{{t.assigned_to.display_name}}{% endif %}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
    {{widget.fields['lightbox'].display()}}
    {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}}
    <script type="text/javascript">
      var q="{{query and h.urlquoteplus(query) or ''}}", count={{count}}, limit={{limit}}, page={{page}}, sort="{{sort}}";
    </script>
  {% else %}
    No tickets found.
  {% endif %}
</div>
