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

{% block title %}{% trans %}title_directory_list{% endtrans %}{% endblock %}
{% block subtitle %}{% trans %}title_directory_list{% endtrans %}{% if app.user.hasPermission('directory_create')  %} <a href="{{ path('directory_create') }}"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_create{% endtrans %}</span></a>{% endif %}{% endblock %}

{% block body %}
<div class="row">
    <div class="col-12 col-md-5">
      {{form(searchForm)}}
    </div>    
    <div class="col">
      {% if wanted %}
        <a href="{{ path('directory_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_wanted_directories{% endtrans %}</a>
      {% else %}
        <a href="{{ path('directory_list_wanted') }}" class="btn btn-info my-1">{% trans %}button_go_to_wanted_directories{% endtrans %}</a>
      {% endif %}

      {% if dead %}
        <a href="{{ path('directory_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_dead_directories{% endtrans %}</a>
      {% else %}
        <a href="{{ path('directory_list_dead') }}" class="btn btn-info my-1">{% trans %}button_go_to_dead_directories{% endtrans %}</a>
      {% endif %}
    </div>
  </div>
  <div class="row">
    <div class="col-lg-8">
      {% include '_cells/directoryTable.html.twig' with {'directories': pagination} %}
    </div>
  </div>
  <div class="row">
    {{ knp_pagination_render(pagination) }}
  </div>
{% endblock %}
