1. Kevin Veroneau
  2. django-petition

Source

django-petition / petition / templates / petition / signatures.html

{% extends "base.html" %}

{% block body %}
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://gamersagainstbigotry.org/wp-content/themes/thesis/custom/includes/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#signatures").tablesorter({sortList: [[0,0], [1,0]]});
    }
    );
</script>
<div id="signatures_container">
    <div class="hint">(hint: click the headers to sort the signatures by that column)</div>
    <table width="100%" border="0" cellpadding="10" id="signatures" class="tablesorter">
        <thead>
          <tr class="header">
            <th width="10%"><span class="style1">ID</span></th>
            <th width="30%"><span class="style1">First Name</span></th>
            <th width="40%"><span class="style1">Last Name</span></th>
            <th width="20%"><span class="style1">State</span></th>
            <th width="5%"><span class="style1">Country</span></th>
          </tr>
        </thead>
        <tbody>
          {% for signature in object_list %}
            <tr>
              <td>{{signature.pk}}</td>
              <td>{{signature.first_name}}</td>
              <td>{{signature.last_name}}</td>
              <td>{{signature.state}}</td>
              <td>{{signature.get_country_display}}</td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
</div>
{% endblock %}