{% load i18n %}

<table style="width: 80%;">
<tr>
    <th>
		{% if is_reverse %}
		<a href="{% url reports-user-activity %}?sort={{ request.GET.sort|striptags }}&reverse=False">{% trans "#" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort={{ request.GET.sort|striptags }}&reverse=True">{% trans "#" %}</a>
		{% endif %}
	</th>
	<th>
		{% if is_ascending_username %}
		<a href="{% url reports-user-activity %}?sort=username" >{% trans "Username" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort=-username" >{% trans "Username" %}</a>
		{% endif %}
	</th>
	<th>
		{% if is_ascending_last_name %}
		<a href="{% url reports-user-activity %}?sort=last_name" >{% trans "Lastname" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort=-last_name" >{% trans "Lastname" %}</a>
		{% endif %}
	</th>
	<th>
		{% if is_ascending_first_name %}
		<a href="{% url reports-user-activity %}?sort=first_name" >{% trans "Firstname" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort=-first_name" >{% trans "Firstname" %}</a>
		{% endif %}
	</th>
	<th>
		{% if is_ascending_email %}
		<a href="{% url reports-user-activity %}?sort=email" >{% trans "Email" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort=-email" >{% trans "Email" %}</a>
		{% endif %}
	</th>
	<th>
		{% if is_ascending_events %}
		<a href="{% url reports-user-activity %}?sort=events" >{% trans "Events" %}</a>
		{% else %}
		<a href="{% url reports-user-activity %}?sort=-events" >{% trans "Events" %}</a>
		{% endif %}
	</th>
</tr>
{% for user in users %}
<tr class="{% cycle 'odd' '' %}">
	{% if is_reverse %}
	<td>{{ forloop.revcounter }}</td>
	{% else %}
	<td>{{ forloop.counter }}</td>
	{% endif %}
	<td><a href="{% url profile user.username %}">{{ user.username }}</a></td>
	<td>{{ user.last_name }}</td>
	<td>{{ user.first_name }}</td>
	<td>{{ user.email }}</td>
	<td>{{ user.event_count }}</td>
</tr>
{% endfor %}
</table>
