Repository URL to install this package:
|
Version:
5.14.0 ▾
|
{% extends 'backoffice/base.html' %}
{% load url from future %}
{% load i18n staticfiles tables %}
{% block extr_js %}
{% endblock %}
{% block extra_head %}
<style>
#user-list {
margin-top: 20px;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-5">
<form method="GET" action=".">
<div class="input-group">
<span class="input-group-addon" id="sizing-addon1">{% trans "Search" %}</span>
<input type="text" class="form-control" placeholder="{% trans 'by username, name or email' %}" aria-describedby="sizing-addon1" value="{{ request.GET.search|default:'' }}" name="search">
</div>
</form>
</div>
<div class="col-md-offset-4 col-md-3">
{{ total_count }} {% trans "users" %}
<br>
{% if request.GET.search %}
{{ search_results_count }} {% trans "results" %}
{% endif %}
</div>
</div>
{% if search_results_count > 0 %}
<div class="row">
<table class="table table-condensed" id="user-list">
<thead>
<tr>
<th>{% order_col "name" "Full name" "Full name" %}</th>
<th>{% order_col "user__username" "Username" "Username" %}</th>
<th>{% order_col "user__email" "Email" "Email" %}</th>
<th>{% order_col "user__date_joined" "Account creation date" "Account creation date" %}</th>
</tr>
</thead>
{% for user_profile in user_profiles.object_list %}
<tr>
<td><a href="{% url 'backoffice:user-detail' user_profile.user.username %}">{{ user_profile.name|default:"Pas de profil utilisateur" }}</a></td>
<td>{{ user_profile.user.username }}</td>
<td>{{ user_profile.user.email }}</td>
<td>{{ user_profile.user.date_joined }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="row">
<div id="pagination">
{{ user_profiles.render }}
</div>
</div>
{% else %}
<div class="row">
{% trans "No result" %}
</div>
{% endif %}
{% endblock %}