var/cache/dev/twig/bc/bc62e98bc1e48365b5be4032af48b588.php line 50
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig */
class __TwigTemplate_113ccfcbbf66fdc2ff715f54ec4acc46 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig"));
$this->parent = $this->loadTemplate("@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig", "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 3
echo "
";
// line 4
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
<style>
.pagination {
display: flex;
justify-content: center;
margin-top: 20px;
}
.pagination li {
margin: 0 5px;
list-style: none;
}
.pagination li a {
text-decoration: none;
padding: 8px 12px;
border: 1px solid #FFCB00; /* Ajout de la couleur principale */
border-radius: 5px;
color: #FFCB00; /* Texte en couleur principale */
font-weight: 600;
transition: background-color 0.3s, color 0.3s;
}
.pagination li a:hover {
background-color: #FFCB00; /* Couleur au survol */
color: white; /* Texte en blanc au survol */
}
.pagination li.active a {
background-color: #FFCB00; /* Couleur principale pour l'élément actif */
color: white; /* Texte en blanc */
border: none; /* Supprimer la bordure */
}
.pagination li.disabled {
display: none; /* Cacher les boutons désactivés */
}
.img-article {
width: 100%; /* La largeur de l'image s'ajuste à la colonne */
height: 260px; /* Hauteur fixe pour uniformiser toutes les images */
object-fit: cover; /* Coupe les parties excédentaires pour conserver le rapport d'aspect */
border-radius: 5px; /* Optionnel : coins arrondis */
}
#hideHeaderInPageHome{
display:none !important;
}
.title-article{
color: #292825;
font-size: 21px;
line-height: 35px;
font-weight: 800;
}
.lire-suite{
/*padding: 10px;*/
font-weight:600;
font-size:13px;
border-radius: 4px;
}
.img-article{
width:95%;
}
.shadow-custom:hover{
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}
.shadow-custom{
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}
.custom-hr {
width: 10%;
border: 3px solid #555;
margin: 4px;
}
.custom-hr-1{
width: 3%;
border: 3px solid #555;
margin: 4px;
}
.carousel-image {
width: 100%; /* Adapte la largeur à celle du conteneur */
height: 400px; /* Hauteur fixe pour un rendu uniforme */
object-fit: cover; /* Coupe et zoome l'image pour remplir le conteneur */
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 105
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 106
echo "
<!--Carousel-->
<div id=\"carouselExampleInterval\" class=\"carousel slide\" data-bs-ride=\"carousel\">
<div class=\"carousel-inner\">
<div id=\"carouselExampleInterval\" class=\"carousel slide\" data-bs-ride=\"carousel\">
<div class=\"carousel-inner\">
";
// line 115
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["newshome"]) || array_key_exists("newshome", $context) ? $context["newshome"] : (function () { throw new RuntimeError('Variable "newshome" does not exist.', 115, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
// line 116
echo " <div class=\"carousel-item ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 116)) {
echo "active";
}
echo "\" data-bs-interval=\"6000\">
<img src=\"/uploads/coworking/";
// line 117
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "image", [], "any", false, false, false, 117), "html", null, true);
echo "\" class=\"d-block w-100 carousel-image\" alt=\"...\">
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 120
echo " </div>
</div>
<button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"prev\">
<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
<span class=\"visually-hidden\">Previous</span>
</button>
<button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"next\">
<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
<span class=\"visually-hidden\">Next</span>
</button>
</div>
<div class=\"container\" style=\"max-width: 1230px;\">
<div class=\"row\">
<div class=\"col-lg-12\">
<h1 style=\"font-size: 34px; color: black;\" class=\"title-actualites mt-5 mb-2\">Actualités</h1>
<hr class=\"custom-hr-1\">
<div class=\"row\">
<!-- Articles -->
<div class=\"col-lg-9\">
<div id=\"result-container\">
";
// line 150
$this->loadTemplate("@Flexy/FrontBundle/Themes/CoWorking/templates/pages/_sorted_results.html.twig", "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig", 150)->display(twig_array_merge($context, ["news" => (isset($context["newshome"]) || array_key_exists("newshome", $context) ? $context["newshome"] : (function () { throw new RuntimeError('Variable "newshome" does not exist.', 150, $this->source); })())]));
// line 151
echo "</div>
";
// line 173
echo " </div>
<!-- Sidebar -->
<div class=\"col-lg-3\">
<select id=\"sortSelect\" class=\"form-select\" aria-label=\"Default select example\">
<option selected value=\"1\">Les plus récentes</option>
<option value=\"2\">Les plus anciens</option>
</select>
<br>
<!-- Remplacez 'ffff' par du contenu réel -->
<h5 class=\"\">Actualités récentes</h5>
<hr class=\"custom-hr\">
";
// line 187
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["newshome"]) || array_key_exists("newshome", $context) ? $context["newshome"] : (function () { throw new RuntimeError('Variable "newshome" does not exist.', 187, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["news"]) {
// line 188
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 188) <= 8)) {
// line 189
echo " <p class=\"mt-3\" style=\"font-size: 14px;\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["news"], "Title", [], "any", false, false, false, 189), "html", null, true);
echo "</p>
";
}
// line 191
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['news'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 192
echo " </div>
</div>
</div>
";
// line 195
if ( !(null === (isset($context["newshome"]) || array_key_exists("newshome", $context) ? $context["newshome"] : (function () { throw new RuntimeError('Variable "newshome" does not exist.', 195, $this->source); })()))) {
// line 196
echo " <div class=\"pagination\">
";
// line 197
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["newshome"]) || array_key_exists("newshome", $context) ? $context["newshome"] : (function () { throw new RuntimeError('Variable "newshome" does not exist.', 197, $this->source); })()));
echo "
</div>
";
}
// line 200
echo "
</div>
</div>
\t
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 211
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 212
echo "
";
// line 213
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe\" crossorigin=\"anonymous\"></script>
<script>
\$(document).ready(function () {
// Fonction pour charger les actualités triées
function loadSortedNews(sortOrder, page = 1) {
console.log(\"Tri sélectionné :\", sortOrder, \"Page :\", page);
\$.ajax({
url: '";
// line 227
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_sort_data");
echo "',
type: 'GET',
data: { sortOrder: sortOrder, page: page },
beforeSend: function () {
\$('#result-container').html('<div class=\"text-center\"><i class=\"fa fa-spinner fa-spin fa-3x\"></i> Chargement en cours ....</div>');
},
success: function (response) {
\$('#result-container').html(response);
// Gérer les liens de pagination après le tri
\$('#result-container').on('click', '.pagination a', function (e) {
e.preventDefault();
let pageUrl = \$(this).attr('href');
let pageNumber = pageUrl.split('page=')[1];
loadSortedNews(sortOrder, pageNumber);
});
},
error: function () {
alert('Une erreur est survenue lors du tri.');
}
});
}
// Événement de changement sur le select
\$('#sortSelect').on('change', function () {
let selectedValue = \$(this).val();
loadSortedNews(selectedValue);
});
// Capture les clics de pagination dès le chargement initial
\$('#result-container').on('click', '.pagination a', function (e) {
e.preventDefault();
let selectedValue = \$('#sortSelect').val();
let pageUrl = \$(this).attr('href');
let pageNumber = pageUrl.split('page=')[1];
loadSortedNews(selectedValue, pageNumber);
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 404 => 227, 387 => 213, 384 => 212, 374 => 211, 355 => 200, 349 => 197, 346 => 196, 344 => 195, 339 => 192, 325 => 191, 319 => 189, 316 => 188, 299 => 187, 283 => 173, 280 => 151, 278 => 150, 246 => 120, 229 => 117, 222 => 116, 205 => 115, 194 => 106, 184 => 105, 73 => 4, 70 => 3, 60 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<style>
.pagination {
display: flex;
justify-content: center;
margin-top: 20px;
}
.pagination li {
margin: 0 5px;
list-style: none;
}
.pagination li a {
text-decoration: none;
padding: 8px 12px;
border: 1px solid #FFCB00; /* Ajout de la couleur principale */
border-radius: 5px;
color: #FFCB00; /* Texte en couleur principale */
font-weight: 600;
transition: background-color 0.3s, color 0.3s;
}
.pagination li a:hover {
background-color: #FFCB00; /* Couleur au survol */
color: white; /* Texte en blanc au survol */
}
.pagination li.active a {
background-color: #FFCB00; /* Couleur principale pour l'élément actif */
color: white; /* Texte en blanc */
border: none; /* Supprimer la bordure */
}
.pagination li.disabled {
display: none; /* Cacher les boutons désactivés */
}
.img-article {
width: 100%; /* La largeur de l'image s'ajuste à la colonne */
height: 260px; /* Hauteur fixe pour uniformiser toutes les images */
object-fit: cover; /* Coupe les parties excédentaires pour conserver le rapport d'aspect */
border-radius: 5px; /* Optionnel : coins arrondis */
}
#hideHeaderInPageHome{
display:none !important;
}
.title-article{
color: #292825;
font-size: 21px;
line-height: 35px;
font-weight: 800;
}
.lire-suite{
/*padding: 10px;*/
font-weight:600;
font-size:13px;
border-radius: 4px;
}
.img-article{
width:95%;
}
.shadow-custom:hover{
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}
.shadow-custom{
box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}
.custom-hr {
width: 10%;
border: 3px solid #555;
margin: 4px;
}
.custom-hr-1{
width: 3%;
border: 3px solid #555;
margin: 4px;
}
.carousel-image {
width: 100%; /* Adapte la largeur à celle du conteneur */
height: 400px; /* Hauteur fixe pour un rendu uniforme */
object-fit: cover; /* Coupe et zoome l'image pour remplir le conteneur */
}
</style>
{% endblock %}
{% block body %}
<!--Carousel-->
<div id=\"carouselExampleInterval\" class=\"carousel slide\" data-bs-ride=\"carousel\">
<div class=\"carousel-inner\">
<div id=\"carouselExampleInterval\" class=\"carousel slide\" data-bs-ride=\"carousel\">
<div class=\"carousel-inner\">
{% for news in newshome %}
<div class=\"carousel-item {% if loop.first %}active{% endif %}\" data-bs-interval=\"6000\">
<img src=\"/uploads/coworking/{{ news.image }}\" class=\"d-block w-100 carousel-image\" alt=\"...\">
</div>
{% endfor %}
</div>
</div>
<button class=\"carousel-control-prev\" type=\"button\" data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"prev\">
<span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
<span class=\"visually-hidden\">Previous</span>
</button>
<button class=\"carousel-control-next\" type=\"button\" data-bs-target=\"#carouselExampleInterval\" data-bs-slide=\"next\">
<span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
<span class=\"visually-hidden\">Next</span>
</button>
</div>
<div class=\"container\" style=\"max-width: 1230px;\">
<div class=\"row\">
<div class=\"col-lg-12\">
<h1 style=\"font-size: 34px; color: black;\" class=\"title-actualites mt-5 mb-2\">Actualités</h1>
<hr class=\"custom-hr-1\">
<div class=\"row\">
<!-- Articles -->
<div class=\"col-lg-9\">
<div id=\"result-container\">
{% include '@Flexy/FrontBundle/Themes/CoWorking/templates/pages/_sorted_results.html.twig' with { 'news': newshome } %}
</div>
{# {% for news in newshome %}
<article class=\"card shadow-custom mt-4\">
<div class=\"row g-0\">
<div class=\"col-lg-5\">
<img class=\"img-article img-fluid\"
src=\"/uploads/coworking/{{ news.image }}\"
alt=\"image\">
</div>
<div class=\"col-lg-7 col-md-12 \" >
<p class=\"mt-2\" style=\"font-size:12px\">{{ news.dateDebut|date('d M Y')|default('Aucune date') }}</p>
<h3> {{ news.title }} </h3>
<h2 class=\"title-article\"> {{ news.underTitle }}</h2>
<p style=\"font-size: 15px;width:95%;\">{{ news.description|slice(0, 110) ~ '...' }}</p>
<a href=\"{{path('actualite',{id:news.id})}}\" class=\"lire-suite\">Lire Plus <i style=\"font-size:18px\" class=\"fa fa-play-circle\" aria-hidden=\"true\"></i></a>
</div>
</div>
</article>
{% endfor %}
#}
</div>
<!-- Sidebar -->
<div class=\"col-lg-3\">
<select id=\"sortSelect\" class=\"form-select\" aria-label=\"Default select example\">
<option selected value=\"1\">Les plus récentes</option>
<option value=\"2\">Les plus anciens</option>
</select>
<br>
<!-- Remplacez 'ffff' par du contenu réel -->
<h5 class=\"\">Actualités récentes</h5>
<hr class=\"custom-hr\">
{% for news in newshome %}
{% if loop.index <= 8 %}
<p class=\"mt-3\" style=\"font-size: 14px;\">{{ news.Title }}</p>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% if newshome is not null %}
<div class=\"pagination\">
{{ knp_pagination_render(newshome) }}
</div>
{% endif %}
</div>
</div>
\t
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe\" crossorigin=\"anonymous\"></script>
<script>
\$(document).ready(function () {
// Fonction pour charger les actualités triées
function loadSortedNews(sortOrder, page = 1) {
console.log(\"Tri sélectionné :\", sortOrder, \"Page :\", page);
\$.ajax({
url: '{{ path('app_sort_data') }}',
type: 'GET',
data: { sortOrder: sortOrder, page: page },
beforeSend: function () {
\$('#result-container').html('<div class=\"text-center\"><i class=\"fa fa-spinner fa-spin fa-3x\"></i> Chargement en cours ....</div>');
},
success: function (response) {
\$('#result-container').html(response);
// Gérer les liens de pagination après le tri
\$('#result-container').on('click', '.pagination a', function (e) {
e.preventDefault();
let pageUrl = \$(this).attr('href');
let pageNumber = pageUrl.split('page=')[1];
loadSortedNews(sortOrder, pageNumber);
});
},
error: function () {
alert('Une erreur est survenue lors du tri.');
}
});
}
// Événement de changement sur le select
\$('#sortSelect').on('change', function () {
let selectedValue = \$(this).val();
loadSortedNews(selectedValue);
});
// Capture les clics de pagination dès le chargement initial
\$('#result-container').on('click', '.pagination a', function (e) {
e.preventDefault();
let selectedValue = \$('#sortSelect').val();
let pageUrl = \$(this).attr('href');
let pageNumber = pageUrl.split('page=')[1];
loadSortedNews(selectedValue, pageNumber);
});
});
</script>
{% endblock %}
", "@Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig", "/home/gebcloud/public_html/cowork.gebanalysis.cloud/src/Flexy/FrontBundle/Themes/CoWorking/templates/pages/actualites.html.twig");
}
}