{% extends 'themesWebsite/blog_cvs/base.html.twig' %}
{% block title %}{{ page.shortTitle }}{% endblock title %}
{% block description %}{{ page.shortDescription }}{% endblock description %}
{% block robots %}{{ page.robots }}{% 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="page-title primary-bg-dark" style="background:url(assets/img/bg2.png) no-repeat; margin-top:80px;">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<h2 class="ipt-title">Trouvez le candidat parfait selon vos critères</h2>
<div class="breadcrumbs light">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ path('homepage') }}">Accueil</a></li>
<li class="breadcrumb-item active">Moteur de recherche</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
</div>
<section>
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="side-widget-blocks">
<div class="sidebar_header d-flex align-items-center justify-content-between px-4 py-3 br-bottom">
<h4 class="fs-bold fs-5 mb-0">Filtre de recherche</h4>
<div class="ssh-header">
<a href="javascript:void(0);" class="clear_all ft-medium text-muted">Remise à zéro</a>
</div>
</div>
<div class="sidebar-widgets collapse miz_show" id="search_open" data-bs-parent="#search_open">
<div class="search-inner">
<div class="side-widget-inner">
{{ form_start(form) }}
<div class="form-group">
<label>Autour de (100km)</label>
<div class="form-group-inner">
{{ form_widget(form.localisation,{'value':queryLocalisation,'attr':{'data-init-text':queryLocalisation}}) }}
</div>
</div>
<div class="form-group">
<label>Mots clef</label>
<div class="form-group-inner">
{{ form_widget(form.title,{'value':queryTitle}) }}
</div>
</div>
<div class="form-group">
<label>Catégories</label>
<div class="form-group-inner">
<div class="inner_widget_link">
<ul class="no-ul-list filter-list">
{% for cat in categories %}
<li>
<input type="checkbox" lass="form-check-input" name="categories[]" {% for qc in queryCategories %}{% if qc == cat.id %}checked{% endif %}{% endfor %} value="{{ cat.id }}">
<label for="e2" class="form-check-label">{{ cat.title }}</label>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{#
<div class="form-group">
<label>Type de contrat</label>
<div class="form-group-inner">
<div class="inner_widget_link">
<ul class="no-ul-list filter-list">
<li>
<input id="e2" class="form-check-input" name="jtype" type="radio">
<label for="e2" class="form-check-label">Temps pleins</label>
</li>
<li>
<input id="e3" class="form-check-input" name="jtype" type="radio">
<label for="e3" class="form-check-label">Temps partiel</label>
</li>
<li>
<input id="e5" class="form-check-input" name="jtype" type="radio">
<label for="e5" class="form-check-label">Stage</label>
</li>
<li>
<input id="e6" class="form-check-input" name="jtype" type="radio">
<label for="e6" class="form-check-label">Alternance</label>
</li>
</ul>
</div>
</div>
</div>
#}
<div class="form-group mb-1">
<button type="submit" class="btn btn-lg btn-primary fs-6 fw-medium full-width">Appliquer</button>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-md-12 col-sm-12">
{% if candidates is not empty %}
<div class="row justify-content-center mb-4">
<div class="col-lg-12 col-md-12">
<div class="item-shorting-box">
<div class="item-shorting clearfix">
<div class="left-column"><h4 class="m-sm-0 mb-2">{{ candidates|length }} résultat{% if candidates|length > 1 %}s{% endif %}</h4></div>
</div>
{#
<div class="item-shorting-box-right">
<div class="shorting-by me-2 small">
<select>
<option value="0">Short by (Default)</option>
<option value="1">Short by (Featured)</option>
<option value="2">Short by (Urgent)</option>
<option value="3">Short by (Post Date)</option>
</select>
</div>
<div class="shorting-by small">
<select>
<option value="0">10 Per Page</option>
<option value="1">20 Per Page</option>
<option value="2">50 Per Page</option>
<option value="3">10 Per Page</option>
</select>
</div>
</div>
#}
</div>
</div>
</div>
<div class="row justify-content-start gx-3 gy-4">
{% 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') }}
{#
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="JavaScript:Void(0);" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
</li>
<li class="page-item"><a class="page-link" href="JavaScript:Void(0);">1</a></li>
<li class="page-item"><a class="page-link" href="JavaScript:Void(0);">2</a></li>
<li class="page-item active"><a class="page-link" href="JavaScript:Void(0);">3</a></li>
<li class="page-item"><a class="page-link" href="JavaScript:Void(0);">4</a></li>
<li class="page-item"><a class="page-link" href="JavaScript:Void(0);">5</a></li>
<li class="page-item"><a class="page-link" href="JavaScript:Void(0);">6</a></li>
<li class="page-item">
<a class="page-link" href="JavaScript:Void(0);" aria-label="Next">
<span aria-hidden="true">»</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
#}
{% else %}
<div class="primary-bg-dark">
<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 nouvelle recherche 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">Invitez un utilisateur</a>
</div>
</div>
</div>
{% endif %}
</div>
<!-- Job List Wrap End-->
</div>
</div>
</section>
<!-- ============================ All List Wrap ================================== -->
<!-- ============================ Call To Action ================================== -->
<section class="bg-cover primary-bg-dark" style="background:url(assets/img/footer-bg-dark.png)no-repeat;">
<div class="container">
<div class="row justify-content-center">
<div class="col-xl-7 col-lg-10 col-md-12 col-sm-12">
<div class="call-action-wrap">
<div class="sec-heading center">
<h2 class="lh-base mb-3 text-light">Un projet à mettre en ligne ?</h2>
<p class="fs-6 text-light">At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias</p>
</div>
<div class="call-action-buttons mt-3">
<a href="JavaScript:Void(0);" class="btn btn-lg btn-dark fw-medium px-xl-5 px-lg-4 me-2">Upload resume</a>
<a href="JavaScript:Void(0);" class="btn btn-lg btn-whites fw-medium px-xl-5 px-lg-4 text-primary">Join Our Team</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ============================ Call To Action End ================================== -->
{% endblock body %}
{% block footerjs %}
<script>
$('#search_candidates_form_localisation').select2({
theme: 'bootstrap-5',
minimumInputLength: 2,
placeholder: 'Paris',
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_candidates_form_localisation').data('init-text');
if (initText) {
var option = new Option(initText, initText, true, true);
$('#search_candidates_form_localisation').append(option).trigger('change');
}
// Gestionnaire d'événement pour mettre à jour data-init-text
$('#search_candidates_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 %}