{% extends 'base.html.twig' %}

{% block title %}{% trans %}title_users_list{% endtrans %}{% endblock %}

{% block body %}
<div class="row">
  <div class="col-5">{{form(searchForm)}}</div>
  <div class="col">
    {% if admin %}
      <a href="{{ path('admin_user_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_admin_users{% endtrans %}</a>
    {% else %}
      <a href="{{ path('admin_user_list_admin') }}" class="btn btn-info my-1">{% trans %}button_go_to_admin_users{% endtrans %}</a>
    {% endif %}

    {% if desactivated %}
      <a href="{{ path('admin_user_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_desactivated_users{% endtrans %}</a>
    {% else %}
      <a href="{{ path('admin_user_list_desactivated') }}" class="btn btn-info my-1">{% trans %}button_go_to_desactivated_users{% endtrans %}</a>
    {% endif %}
  </div>
</div>
<div class="row">
  <div class="col-12">
    {% include '_cells/adminUserTable.html.twig' with {'users': pagination} %}
  </div>
</div>
<div class="row">{{ knp_pagination_render(pagination) }}</div>
{% endblock %}
