{% extends 'themesWebsite/blog_cvs/base.html.twig' %}
{% block title %}{{ category.shortTitle }}{% endblock title %}
{% block description %}{{ category.shortDescription }}{% endblock description %}
{% block robots %}index,follow{% endblock robots %}
{#% block meta_social %}{{ parent() }}{% include "/themesWebsite/blog_cpn/components/socialmedia.html.twig" with { 'page':page,'social_type':'website' } %}{% endblock meta_social %}
{% block meta %}{{ parent() }}{% include "/themesWebsite/blog_cpn/components/author.html.twig" with {'page':page } %}{% endblock meta %#}
{% block body %}
<div class="image-cover hero-header">
<div class="container">
<div class="row justify-content-between align-items-center">
<div class="col-xl-7 col-lg-7 col-md-12 col-sm-12 pe-xl-5 pe-lg-4">
<h6 class="text-primary bg-light-primary py-2 px-3 rounded-5 fw-medium d-inline-flex align-items-center mb-3">
<span class="bg-primary w-5 h-05 me-2"></span>
La sélection de nos candidats
</h6>
<h1 class="mb-4">{{ category.title }}</h1>
<p class="fs-5">{{ category.description }}</p>
<div class="position-relative mt-4">
<div class="bg-dot light w-100 h-2 position-relative">
<span class="escolls square--30 circle d-inline-flex align-items-center justify-content-center bg-white fw-medium text-primary position-absolute start-50 top-5">
OU
</span>
</div>
</div>
<div class="upload-box">
<div class="filedrop_box">
<header>
<h4>Lancez la création de votre CV anonyme</h4>
</header>
<p>Créez gratuitement votre CV anonyme et entamez la discussion avec les recruteurs et entreprises.</p>
<a href="{{ path('cvs_website_customer_deposer_un_cv') }}" class="btn btn-md btn-primary fw-medium rounded-1">Commencer</a>
</div>
</div>
</div>
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12">
<div class="exluo-bg bg-cover p-xl-5 p-3 rounded-5 position-relative mt-lg-0 mt-4" style="background:url(assets/img/form-bg-2.png)no-repeat;">
<div class="hero-search-wrap shadow">
<div class="hero-search">
<div>Pour les recruteurs</div>
<h1>Rechercher un CV</h1>
<p>Trouvez le candidat idéal parmi notre vaste sélection de profils.</p>
</div>
<div class="hero-search-content verticle-space">
{{ form_start(form) }}
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
<div class="form-group">
{{ form_widget(form.title,{'attr':{'placeholder':'Mot clef','class':'form-control border'},'value':queryKeyword}) }}
</div>
</div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
{% if errorLocalisation == 1 %}
<span style="color:red;">Merci de saisir une adresse postale</span>
{% endif %}
<div class="form-group">
{{ form_widget(form.localisation,{'attr':{'placeholder':'Localisation','class':'form-control border','data-init-text':queryLocalisation},'value':queryLocalisation}) }}
</div>
</div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
<button type="submit" class="btn btn-primary full-width"><i class="fa fa-search"></i> Lancer la recherche</button>
</div>
</div>
<div style="text-align:center; padding-top:15px;">
<a href="{{ path('cvs_website_candidates') }}">Explorer toutes les catégories</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
</div>
<div class="position-absolute start-0 top-0"><div class="square--50 bg-white shadow circle text-info fs-4 animate-bounce"><i class="fa-brands fa-algolia"></i></div></div>
<div class="position-absolute start-0 bottom-0 pb-4 ps-4"><div class="square--50 shadow circle bg-white text-danger fs-4 animate-leftright"><i class="fa-solid fa-fire"></i></div></div>
<div class="position-absolute end-0 top-0 pt-5 pe-4"><div class="square--50 shadow circle bg-white text-warning fs-4 animate-leftright"><i class="fa-solid fa-business-time"></i></div></div>
<div class="position-absolute end-0 bottom-0"><div class="square--50 shadow circle bg-white text-primary fs-4 animate-bounce"><i class="fa-solid fa-layer-group"></i></div></div>
</div>
</div>
</div>
{% if candidates is not empty %}
<div class="row" style="margin-top:100px;">
{% for candidate in candidates %}
{% set distance = candidate['distance'] %}
{% set candidate = candidate[0] %}
<div class="col-xl-12 col-lg-12 col-md-12 col-12">
<div class="jbs-list-box border">
<div class="jbs-list-head m-0">
<div class="jbs-list-head-thunner">
<div class="jbs-list-job-caption">
<div class="jbs-job-title-wrap"><h4><a href="#" class="jbs-job-title">{{ candidate.slugAnonyme }}</a></h4></div>
<div class="jbs-job-mrch-lists">
<div class="single-mrch-lists">
<span>{{ candidate.titleJob }}</span> <span><i class="fa-solid fa-location-dot me-1"></i> {{ candidate.city }} ~ {{ distance|round(2) }}m</span>
</div>
</div>
{% set skills = getCvsCandidateSkills(candidate.id,4) %}
{% if skills is not null %}
<div class="jbs-grid-job-edrs-group mt-1">
{% for sk in skills %}
<span>{{ sk.title|lower|capitalize }}</span>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% if candidate.expYears is not empty %}
<div class="jbs-list-head-middle">
<div class="elsocrio-jbs sm">
<div class="ilop-tr"><i class="fa-solid fa-coins"></i></div>
<h5 class="jbs-list-pack">{{ candidate.expYears }} Année{% if candidate.expYears > 1 %}s{% endif %} Exp.</h5>
</div>
</div>
{% endif %}
<div class="jbs-list-head-last">
<a href="{{ path('cvs_application_cv_discussion_anonyme',{'slug':candidate.slugAnonyme}) }}" target="_blank" class="btn btn-md px-3 m-2">
Engager la discussion
</a>
<a href="{{ path('cvs_application_cv_anonyme',{'slug':candidate.slugAnonyme}) }}" target="_blank" class="btn btn-md btn-primary px-3">
Voir le CV
</a>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{{ knp_pagination_render(candidates,'components/pagination/pagination.html.twig') }}
{% else %}
<div class="primary-bg-dark" style="margin-top:100px;">
<div class="hired-box-slack">
<div class="hired-box-caption">
<h2 class="text-light">Aucun candidat trouvé autour de vous</h2>
<p class="text-light fw-light fs-5 opacity-75">
Effectuez une recherche avancée (ou explorez une autre catégorie), ou bien invitez des utilisateurs à créer leur CV afin de pouvoir les contacter par la suite. C'est entièrement gratuit pour les candidats.
</p>
</div>
{#<div class="hired-box-btns">
<a href="#" class="btn btn-lg btn-whites font--bold px-5 text-primary m-2">Recherche avancée</a>
<a href="#" class="btn btn-lg btn-whites font--bold px-5 text-primary">Invitez un utilisateur</a>
</div>#}
</div>
</div>
{% endif %}
</div>
</div>
{% endblock body %}
{% block footerjs %}
<script>
$('#search_category_form_localisation').select2({
theme: 'bootstrap-5',
minimumInputLength: 2,
placeholder: 'Adresse postale',
ajax: {
url: Routing.generate('cvs_website_localisation'),
dataType: 'json',
delay: 500,
data: function(params) {
return {
term: params.term
};
},
processResults: function(data) {
return {
results: data.map(function(item) {
return {
id: item.display_name,
text: item.display_name
};
})
};
}
},
templateResult: function(data) {
return $('<span>' + data.text + '</span>');
},
templateSelection: function(data) {
return $('<span>' + data.text + '</span>');
},
initSelection: function (element, callback) {
var initText = $(element).data('init-text');
if (initText) {
callback({ id: initText, text: initText });
}
}
});
// Initialisation de la sélection au chargement
var initText = $('#search_category_form_localisation').data('init-text');
if (initText) {
var option = new Option(initText, initText, true, true);
$('#search_category_form_localisation').append(option).trigger('change');
}
// Gestionnaire d'événement pour mettre à jour data-init-text
$('#search_category_form_localisation').on('select2:select', function(e) {
var selectedText = e.params.data.text;
$(this).attr('data-init-text', selectedText);
var $select2Container = $(this).data('select2').$container.find('.select2-selection__rendered');
$select2Container.html('<span>' + selectedText + '</span>');
});
</script>
{% endblock footerjs %}