{% extends "Frontend/base-recrutement.html.twig" %}
{% block body %}
<div id="cadre">
<div class="row justify-content-end">
<div class="col-4">
{% if app.user %}
<a href="{% if app.user.candidatures is defined %}{{ path('frontend_candidat_externe_view') }}{% else %} {{ path('frontend_candidat_interne_view') }}{% endif %}" class="btn btn-warning">
<i class="fa fa-chevron-left"></i>
Retour
</a>
<a href="{% if app.user.candidatures is defined %}{{ path('frontend_candidat_externe_logout') }}{%else%}{{ path('frontend_candidat_interne_logout') }}{%endif%}" class="btn btn-primary">
<i class="fa fa-sign-out-alt"></i>
Deconnexion
</a>
{% else %}
<a href="{{ path('frontend_candidat') }}" class="btn btn-warning">
<i class="fa fa-home"></i>
Accueil
</a>
{% endif %}
</div>
</div>
<div class="row view">
<div class="col">
<legend>Poste(s) disponible(s) actuellement</legend>
<ul class="nav nav-tabs" role="tablist">
{% for catTypePop in catsTypePop %}
{% set cat = attribute(catTypePop, 'cat') %}
<li class="nav-item">
<button id="cat-tab-{{cat.id}}" class="nav-link {% if loop.first %}active{% endif %}" aria-expanded="{% if loop.first %}true{% else %}false{% endif %}" aria-controls="cat-{{cat.id}}" data-bs-toggle="tab" data-bs-target="#cat-{{cat.id}}" role="tab">{{cat.name}}</button>
</li>
{% endfor %}
</ul>
<div class="tab-content">
{% for catTypePop in catsTypePop %}
{% set cat = attribute(catTypePop, 'cat') %}
{% set types = attribute(catTypePop, 'types') %}
{% set catPostes = attribute(postesByCategory, cat.id) %}
<div id="cat-{{cat.id}}" class="tab-pane fade {% if loop.first %}show active{% endif %}" role="tabpanel" aria-labelledby="cat-tab-{{ cat.id }}">
<ul class="nav nav-tabs" role="tablist">
{% for type in types %}
{% set postes = attribute(catPostes, type.id) %}
<li class="nav-item">
<button id="typepop-tab{{ type.id }}" class="nav-link {% if loop.first %}active{% endif %}" aria-expanded="{% if loop.first %}true{% else %}false{% endif %}" data-bs-toggle="tab" data-bs-target="#typepop-{{type.id}}" >{{type.name}}</button>
</li>
{% endfor %}
</ul>
<div class="tab-content">
{% for type in types %}
{% set postes = attribute(catPostes, type.id) %}
<div id="typepop-{{type.id}}" class="tab-pane fade {% if loop.first %}show active{% endif %}" role="tabpanel" aria-labelledby="typepop-tab{{ type.id }}">
{% include 'Frontend/Candidat/liste-postes.html.twig' %}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block contact %}
<p><a target="_blank" href="mailto:{{ mail_rh_recrutement }}">Contacter les ressources humaines</a></p>
{% endblock %}