templates/themesWebsite/cvs/website/candidates/list.html.twig line 1

Open in your IDE?
  1. {% extends 'themesWebsite/blog_cvs/base.html.twig' %}
  2. {% block title %}{{ page.shortTitle }}{% endblock title %}
  3. {% block description %}{{ page.shortDescription }}{% endblock description %}
  4. {% block robots %}{{ page.robots }}{% endblock robots %}
  5. {% block meta_social %}{{ parent() }}{% include "/themesWebsite/blog_cpn/components/socialmedia.html.twig" with { 'page':page,'social_type':'website' } %}{% endblock meta_social %}
  6. {% block meta %}{{ parent() }}{% include "/themesWebsite/blog_cpn/components/author.html.twig" with {'page':page } %}{% endblock meta %}
  7. {% block body %}
  8.     <div class="page-title primary-bg-dark" style="background:url(assets/img/bg2.png) no-repeat; margin-top:80px;">
  9.         <div class="container">
  10.             <div class="row">
  11.                 <div class="col-lg-12 col-md-12">
  12.                     <h2 class="ipt-title">Trouvez le candidat parfait selon vos critères</h2>
  13.                     <div class="breadcrumbs light">
  14.                         <nav aria-label="breadcrumb">
  15.                             <ol class="breadcrumb">
  16.                                 <li class="breadcrumb-item"><a href="{{ path('homepage') }}">Accueil</a></li>
  17.                                 <li class="breadcrumb-item active">Moteur de recherche</li>
  18.                             </ol>
  19.                         </nav>
  20.                     </div>
  21.                 </div>
  22.             </div>
  23.         </div>
  24.     </div>
  25.     <section>
  26.         <div class="container">
  27.             <div class="row">
  28.                 <div class="col-lg-4 col-md-12 col-sm-12">
  29.                     <div class="side-widget-blocks">
  30.                         <div class="sidebar_header d-flex align-items-center justify-content-between px-4 py-3 br-bottom">
  31.                             <h4 class="fs-bold fs-5 mb-0">Filtre de recherche</h4>
  32.                             <div class="ssh-header">
  33.                                 <a href="javascript:void(0);" class="clear_all ft-medium text-muted">Remise à zéro</a>
  34.                             </div>
  35.                         </div>
  36.                         <div class="sidebar-widgets collapse miz_show" id="search_open" data-bs-parent="#search_open">
  37.                             <div class="search-inner">
  38.                                 <div class="side-widget-inner">
  39.                                     {{ form_start(form) }}
  40.                                     <div class="form-group">
  41.                                         <label>Autour de (100km)</label>
  42.                                         <div class="form-group-inner">
  43.                                             {{ form_widget(form.localisation,{'value':queryLocalisation,'attr':{'data-init-text':queryLocalisation}}) }}
  44.                                         </div>
  45.                                     </div>
  46.                                     <div class="form-group">
  47.                                         <label>Mots clef</label>
  48.                                         <div class="form-group-inner">
  49.                                             {{ form_widget(form.title,{'value':queryTitle}) }}
  50.                                         </div>
  51.                                     </div>
  52.                                     <div class="form-group">
  53.                                         <label>Catégories</label>
  54.                                         <div class="form-group-inner">
  55.                                             <div class="inner_widget_link">
  56.                                                 <ul class="no-ul-list filter-list">
  57.                                                     {% for cat in categories %}
  58.                                                     <li>
  59.                                                         <input type="checkbox" lass="form-check-input" name="categories[]" {% for qc in queryCategories %}{% if qc == cat.id %}checked{% endif %}{% endfor %} value="{{ cat.id }}">
  60.                                                         <label for="e2" class="form-check-label">{{ cat.title }}</label>
  61.                                                     </li>
  62.                                                     {% endfor %}
  63.                                                 </ul>
  64.                                             </div>
  65.                                         </div>
  66.                                     </div>
  67.                                     {#
  68.                                     <div class="form-group">
  69.                                         <label>Type de contrat</label>
  70.                                         <div class="form-group-inner">
  71.                                             <div class="inner_widget_link">
  72.                                                 <ul class="no-ul-list filter-list">
  73.                                                     <li>
  74.                                                         <input id="e2" class="form-check-input" name="jtype" type="radio">
  75.                                                         <label for="e2" class="form-check-label">Temps pleins</label>
  76.                                                     </li>
  77.                                                     <li>
  78.                                                         <input id="e3" class="form-check-input" name="jtype" type="radio">
  79.                                                         <label for="e3" class="form-check-label">Temps partiel</label>
  80.                                                     </li>
  81.                                                     <li>
  82.                                                         <input id="e5" class="form-check-input" name="jtype" type="radio">
  83.                                                         <label for="e5" class="form-check-label">Stage</label>
  84.                                                     </li>
  85.                                                     <li>
  86.                                                         <input id="e6" class="form-check-input" name="jtype" type="radio">
  87.                                                         <label for="e6" class="form-check-label">Alternance</label>
  88.                                                     </li>
  89.                                                 </ul>
  90.                                             </div>
  91.                                         </div>
  92.                                     </div>
  93.                                     #}
  94.                                     <div class="form-group mb-1">
  95.                                         <button type="submit" class="btn btn-lg btn-primary fs-6 fw-medium full-width">Appliquer</button>
  96.                                     </div>
  97.                                     {{ form_rest(form) }}
  98.                                     {{ form_end(form) }}
  99.                                 </div>
  100.                             </div>
  101.                         </div>
  102.                     </div>
  103.                 </div>
  104.                 <div class="col-lg-8 col-md-12 col-sm-12">
  105.                     {% if candidates is not empty %}
  106.                         <div class="row justify-content-center mb-4">
  107.                             <div class="col-lg-12 col-md-12">
  108.                                 <div class="item-shorting-box">
  109.                                     <div class="item-shorting clearfix">
  110.                                         <div class="left-column"><h4 class="m-sm-0 mb-2">{{ candidates|length }} résultat{% if candidates|length > 1 %}s{% endif %}</h4></div>
  111.                                     </div>
  112.                                     {#
  113.                                     <div class="item-shorting-box-right">
  114.                                         <div class="shorting-by me-2 small">
  115.                                             <select>
  116.                                                 <option value="0">Short by (Default)</option>
  117.                                                 <option value="1">Short by (Featured)</option>
  118.                                                 <option value="2">Short by (Urgent)</option>
  119.                                                 <option value="3">Short by (Post Date)</option>
  120.                                             </select>
  121.                                         </div>
  122.                                         <div class="shorting-by small">
  123.                                             <select>
  124.                                                 <option value="0">10 Per Page</option>
  125.                                                 <option value="1">20 Per Page</option>
  126.                                                 <option value="2">50 Per Page</option>
  127.                                                 <option value="3">10 Per Page</option>
  128.                                             </select>
  129.                                         </div>
  130.                                     </div>
  131.                                     #}
  132.                                 </div>
  133.                             </div>
  134.                         </div>
  135.                         <div class="row justify-content-start gx-3 gy-4">
  136.                         {% for candidate in candidates %}
  137.                             {% set distance = candidate['distance'] %}
  138.                             {% set candidate = candidate[0] %}
  139.                             <div class="col-xl-12 col-lg-12 col-md-12 col-12">
  140.                                 <div class="jbs-list-box border">
  141.                                     <div class="jbs-list-head m-0">
  142.                                         <div class="jbs-list-head-thunner">
  143.                                             <div class="jbs-list-job-caption">
  144.                                                 <div class="jbs-job-title-wrap"><h4><a href="#" class="jbs-job-title">{{ candidate.slugAnonyme }}</a></h4></div>
  145.                                                 <div class="jbs-job-mrch-lists">
  146.                                                     <div class="single-mrch-lists">
  147.                                                         <span>{{ candidate.titleJob }}</span> &nbsp; &nbsp; <span><i class="fa-solid fa-location-dot me-1"></i> {{ candidate.city }} &nbsp; &nbsp; ~ {{ distance|round(2) }}m</span>
  148.                                                     </div>
  149.                                                 </div>
  150.                                                 {% set skills = getCvsCandidateSkills(candidate.id,4) %}
  151.                                                 {% if skills is not null %}
  152.                                                 <div class="jbs-grid-job-edrs-group mt-1">
  153.                                                     {% for sk in skills %}
  154.                                                     <span>{{ sk.title|lower|capitalize }}</span>
  155.                                                     {% endfor %}
  156.                                                 </div>
  157.                                                 {% endif %}
  158.                                             </div>
  159.                                         </div>
  160.                                         {% if candidate.expYears is not empty %}
  161.                                         <div class="jbs-list-head-middle">
  162.                                             <div class="elsocrio-jbs sm">
  163.                                                 <div class="ilop-tr"><i class="fa-solid fa-coins"></i></div>
  164.                                                 <h5 class="jbs-list-pack">{{ candidate.expYears }} Année{% if candidate.expYears > 1 %}s{% endif %} Exp.</h5>
  165.                                             </div>
  166.                                         </div>
  167.                                         {% endif %}
  168.                                         <div class="jbs-list-head-last">
  169.                                             <a href="{{ path('cvs_application_cv_discussion_anonyme',{'slug':candidate.slugAnonyme}) }}" target="_blank" class="btn btn-md px-3 m-2">
  170.                                                 Engager la discussion
  171.                                             </a>
  172.                                             <a href="{{ path('cvs_application_cv_anonyme',{'slug':candidate.slugAnonyme}) }}" target="_blank" class="btn btn-md btn-primary px-3">
  173.                                                 Voir le CV
  174.                                             </a>
  175.                                         </div>
  176.                                     </div>
  177.                                 </div>
  178.                             </div>
  179.                         {% endfor %}
  180.                         </div>
  181.                         {{ knp_pagination_render(candidates,'components/pagination/pagination.html.twig') }}
  182.                         {#
  183.                         <div class="row">
  184.                             <div class="col-lg-12 col-md-12 col-sm-12">
  185.                                 <nav aria-label="Page navigation example">
  186.                                     <ul class="pagination">
  187.                                         <li class="page-item">
  188.                                             <a class="page-link" href="JavaScript:Void(0);" aria-label="Previous">
  189.                                                 <span aria-hidden="true">&laquo;</span>
  190.                                             </a>
  191.                                         </li>
  192.                                         <li class="page-item"><a class="page-link" href="JavaScript:Void(0);">1</a></li>
  193.                                         <li class="page-item"><a class="page-link" href="JavaScript:Void(0);">2</a></li>
  194.                                         <li class="page-item active"><a class="page-link" href="JavaScript:Void(0);">3</a></li>
  195.                                         <li class="page-item"><a class="page-link" href="JavaScript:Void(0);">4</a></li>
  196.                                         <li class="page-item"><a class="page-link" href="JavaScript:Void(0);">5</a></li>
  197.                                         <li class="page-item"><a class="page-link" href="JavaScript:Void(0);">6</a></li>
  198.                                         <li class="page-item">
  199.                                             <a class="page-link" href="JavaScript:Void(0);" aria-label="Next">
  200.                                                 <span aria-hidden="true">&raquo;</span>
  201.                                             </a>
  202.                                         </li>
  203.                                     </ul>
  204.                                 </nav>
  205.                             </div>
  206.                         </div>
  207.                         #}
  208.                     {% else %}
  209.                         <div class="primary-bg-dark">
  210.                             <div class="hired-box-slack">
  211.                                 <div class="hired-box-caption">
  212.                                     <h2 class="text-light">Aucun candidat trouvé autour de vous</h2>
  213.                                     <p class="text-light fw-light fs-5 opacity-75">
  214.                                         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.
  215.                                     </p>
  216.                                 </div>
  217.                                 <div class="hired-box-btns">
  218.                                     <a href="#" class="btn btn-lg btn-whites font--bold px-5 text-primary">Invitez un utilisateur</a>
  219.                                 </div>
  220.                             </div>
  221.                         </div>
  222.                     {% endif  %}
  223.                 </div>
  224.                 <!-- Job List Wrap End-->
  225.             </div>
  226.         </div>
  227.     </section>
  228.     <!-- ============================ All List Wrap ================================== -->
  229.     <!-- ============================ Call To Action ================================== -->
  230.     <section class="bg-cover primary-bg-dark" style="background:url(assets/img/footer-bg-dark.png)no-repeat;">
  231.         <div class="container">
  232.             <div class="row justify-content-center">
  233.                 <div class="col-xl-7 col-lg-10 col-md-12 col-sm-12">
  234.                     <div class="call-action-wrap">
  235.                         <div class="sec-heading center">
  236.                             <h2 class="lh-base mb-3 text-light">Un projet à mettre en ligne ?</h2>
  237.                             <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>
  238.                         </div>
  239.                         <div class="call-action-buttons mt-3">
  240.                             <a href="JavaScript:Void(0);" class="btn btn-lg btn-dark fw-medium px-xl-5 px-lg-4 me-2">Upload resume</a>
  241.                             <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>
  242.                         </div>
  243.                     </div>
  244.                 </div>
  245.             </div>
  246.         </div>
  247.     </section>
  248.     <!-- ============================ Call To Action End ================================== -->
  249. {% endblock body %}
  250. {% block footerjs %}
  251.     <script>
  252.     $('#search_candidates_form_localisation').select2({
  253.         theme: 'bootstrap-5',
  254.         minimumInputLength: 2,
  255.         placeholder: 'Paris',
  256.         ajax: {
  257.             url: Routing.generate('cvs_website_localisation'),
  258.             dataType: 'json',
  259.             delay: 500,
  260.             data: function(params) {
  261.                 return {
  262.                     term: params.term
  263.                 };
  264.             },
  265.             processResults: function(data) {
  266.                 return {
  267.                     results: data.map(function(item) {
  268.                         return {
  269.                             id: item.display_name,
  270.                             text: item.display_name
  271.                         };
  272.                     })
  273.                 };
  274.             }
  275.         },
  276.         templateResult: function(data) {
  277.             return $('<span>' + data.text + '</span>');
  278.         },
  279.         templateSelection: function(data) {
  280.             return $('<span>' + data.text + '</span>');
  281.         },
  282.         initSelection: function (element, callback) {
  283.             var initText = $(element).data('init-text');
  284.             if (initText) {
  285.                 callback({ id: initText, text: initText });
  286.             }
  287.         }
  288.     });
  289.     // Initialisation de la sélection au chargement
  290.     var initText = $('#search_candidates_form_localisation').data('init-text');
  291.     if (initText) {
  292.         var option = new Option(initText, initText, true, true);
  293.         $('#search_candidates_form_localisation').append(option).trigger('change');
  294.     }
  295.     // Gestionnaire d'événement pour mettre à jour data-init-text
  296.     $('#search_candidates_form_localisation').on('select2:select', function(e) {
  297.         var selectedText = e.params.data.text;
  298.         $(this).attr('data-init-text', selectedText);
  299.         var $select2Container = $(this).data('select2').$container.find('.select2-selection__rendered');
  300.         $select2Container.html('<span>' + selectedText + '</span>');
  301.     });
  302.     </script>
  303. {% endblock footerjs %}