<table class="table table-striped table-condensed">
  <thead>
    <tr>
      <th onClick="sortTbody(this, 'peers-tbody', sortStr)">address</th>
      <th onClick="sortTbody(this, 'peers-tbody', sortStr)">peerid</th>
      <th onClick="sortTbody(this, 'peers-tbody', sortByte)">downloaded</th>
      <th onClick="sortTbody(this, 'peers-tbody', sortByte)">uploaded</th>
      <th onClick="sortTbody(this, 'peers-tbody', sortByte)">left</th>
    </tr>
  </thead>

  <tbody id="peers-tbody">

    {{*peers}}
    <tr>
      <td>{{address}}</td>
      <td>{{peerid|u}}</td>
      <td>{{downloaded}}</td>
      <td>{{uploaded}}</td>
      <td>{{left}}</td>
    </tr>
    {{/peers}}

  </tbody>
</table>

<!-- sort torrents by uploaded -->
<script language="javascript">
  sortTbody2(document.getElementById('peers-tbody'), 3, sortStr)
</script>
