Source

django-impersonate / impersonate / templates / impersonate / search_users.html

{% load url from future %}
<html>
<head>
<title>Django Impersonate - Search Users</title>
</head>
<body>
<h1>Search Users {% if query %}- Page {{ page_number }}{% endif %}</h1>

<form action="{% url 'impersonate-search' %}" method="GET">
Enter Search Query:<br />
<input type="text" name="q" value="{% if query %}{{ query }}{% endif %}"><br />
{{redirect_field}}
<input type="submit" value="Search"><br />
</form>
{% if query and page.object_list %}
  <ul>
    {% for user in page.object_list %}
      <li><a href="{% url 'impersonate-start' user.id %}{{redirect}}">{{ user.username }}</a> - Impersonate</li>
    {% endfor %}
  </ul>
{% endif %}

{% if query and page.has_previous %}
<a href="?page={{ page.previous_page_number }}&q={{ query|urlencode }}">Previous Page</a> &nbsp; 
{% endif %}

{% if query and page.has_next %}
<a href="?page={{ page.next_page_number }}&q={{ query|urlencode }}">Next Page</a> &nbsp; 
{% endif %}

</body>
</html>