var/cache/dev/twig/ea/ea1f62a70f9351c882da6384ec3ab496.php line 46

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* shop/reviews/index.html.twig */
  16. class __TwigTemplate_b3685988d74272770f151e22763354d4 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'title' => [$this'block_title'],
  29.             'stylesheets' => [$this'block_stylesheets'],
  30.             'body' => [$this'block_body'],
  31.             'javascripts' => [$this'block_javascripts'],
  32.         ];
  33.     }
  34.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  35.     {
  36.         // line 1
  37.         return "base_home.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = []): iterable
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""shop/reviews/index.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""shop/reviews/index.html.twig"));
  46.         $this->parent $this->load("base_home.html.twig"1);
  47.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     /**
  55.      * @return iterable<null|scalar|\Stringable>
  56.      */
  57.     public function block_title(array $context, array $blocks = []): iterable
  58.     {
  59.         $macros $this->macros;
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  64.         yield "Avis - ";
  65.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "name", [], "any"falsefalsefalse3), "html"nulltrue);
  66.         yield " | MaketOu";
  67.         
  68.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  69.         
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  71.         yield from [];
  72.     }
  73.     // line 5
  74.     /**
  75.      * @return iterable<null|scalar|\Stringable>
  76.      */
  77.     public function block_stylesheets(array $context, array $blocks = []): iterable
  78.     {
  79.         $macros $this->macros;
  80.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  81.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  82.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  84.         // line 6
  85.         yield "    ";
  86.         yield from $this->yieldParentBlock("stylesheets"$context$blocks);
  87.         yield "
  88.     <style>
  89.         /* Styles spécifiques aux reviews - tous scoped pour éviter les conflits avec le template de base */
  90.         .shop-reviews-page .review-card {
  91.             border: 1px solid #e0e0e0;
  92.             border-radius: 10px;
  93.             padding: 20px;
  94.             margin-bottom: 20px;
  95.             background: white;
  96.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  97.         }
  98.         
  99.         .shop-reviews-page .review-header {
  100.             display: flex;
  101.             justify-content: space-between;
  102.             align-items: center;
  103.             margin-bottom: 15px;
  104.         }
  105.         
  106.         .shop-reviews-page .review-user {
  107.             display: flex;
  108.             align-items: center;
  109.         }
  110.         
  111.         .shop-reviews-page .review-user-avatar {
  112.             width: 40px;
  113.             height: 40px;
  114.             border-radius: 50%;
  115.             background: linear-gradient(45deg, #667eea, #764ba2);
  116.             display: flex;
  117.             align-items: center;
  118.             justify-content: center;
  119.             color: white;
  120.             font-weight: bold;
  121.             margin-right: 12px;
  122.         }
  123.         
  124.         .shop-reviews-page .review-user-info h6 {
  125.             margin: 0;
  126.             font-weight: 600;
  127.             color: #333;
  128.         }
  129.         
  130.         .shop-reviews-page .review-user-info small {
  131.             color: #666;
  132.         }
  133.         
  134.         .shop-reviews-page .review-rating {
  135.             display: flex;
  136.             align-items: center;
  137.             gap: 5px;
  138.         }
  139.         
  140.         .shop-reviews-page .stars {
  141.             color: #ffc107;
  142.             font-size: 18px;
  143.         }
  144.         
  145.         .shop-reviews-page .review-date {
  146.             color: #666;
  147.             font-size: 14px;
  148.         }
  149.         
  150.         .shop-reviews-page .review-content {
  151.             margin-bottom: 15px;
  152.             line-height: 1.6;
  153.             color: #333;
  154.         }
  155.         
  156.         .shop-reviews-page .review-type {
  157.             display: inline-block;
  158.             background: #f8f9fa;
  159.             color: #495057;
  160.             padding: 4px 8px;
  161.             border-radius: 4px;
  162.             font-size: 12px;
  163.             margin-bottom: 10px;
  164.         }
  165.         
  166.         .shop-reviews-page .review-actions {
  167.             display: flex;
  168.             gap: 10px;
  169.             align-items: center;
  170.         }
  171.         
  172.         .shop-reviews-page .helpful-btn {
  173.             background: none;
  174.             border: 1px solid #dee2e6;
  175.             padding: 5px 10px;
  176.             border-radius: 4px;
  177.             font-size: 12px;
  178.             color: #6c757d;
  179.             cursor: pointer;
  180.             transition: all 0.3s ease;
  181.         }
  182.         
  183.         .shop-reviews-page .helpful-btn:hover {
  184.             background: #f8f9fa;
  185.             border-color: #adb5bd;
  186.         }
  187.         
  188.         .shop-reviews-page .helpful-btn.active {
  189.             background: #28a745;
  190.             color: white;
  191.             border-color: #28a745;
  192.         }
  193.         
  194.         .shop-reviews-page .stats-card {
  195.             background: white;
  196.             border-radius: 10px;
  197.             padding: 20px;
  198.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  199.             margin-bottom: 20px;
  200.         }
  201.         
  202.         .shop-reviews-page .stats-header {
  203.             display: flex;
  204.             align-items: center;
  205.             margin-bottom: 20px;
  206.         }
  207.         
  208.         .shop-reviews-page .overall-rating {
  209.             font-size: 48px;
  210.             font-weight: bold;
  211.             color: #333;
  212.             margin-right: 20px;
  213.         }
  214.         
  215.         .shop-reviews-page .rating-breakdown {
  216.             flex: 1;
  217.         }
  218.         
  219.         .shop-reviews-page .rating-bar {
  220.             display: flex;
  221.             align-items: center;
  222.             margin-bottom: 8px;
  223.         }
  224.         
  225.         .shop-reviews-page .rating-label {
  226.             width: 60px;
  227.             font-size: 14px;
  228.             color: #666;
  229.         }
  230.         
  231.         .shop-reviews-page .rating-progress {
  232.             flex: 1;
  233.             height: 8px;
  234.             background: #e9ecef;
  235.             border-radius: 4px;
  236.             margin: 0 10px;
  237.             overflow: hidden;
  238.         }
  239.         
  240.         .shop-reviews-page .rating-fill {
  241.             height: 100%;
  242.             background: linear-gradient(45deg, #ffc107, #ff8c00);
  243.             transition: width 0.3s ease;
  244.         }
  245.         
  246.         .shop-reviews-page .rating-count {
  247.             width: 40px;
  248.             text-align: right;
  249.             font-size: 14px;
  250.             color: #666;
  251.         }
  252.         
  253.         .shop-reviews-page .filters-card {
  254.             background: white;
  255.             border-radius: 10px;
  256.             padding: 20px;
  257.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  258.             margin-bottom: 20px;
  259.         }
  260.         
  261.         .shop-reviews-page .filter-group {
  262.             margin-bottom: 15px;
  263.         }
  264.         
  265.         .shop-reviews-page .filter-group label {
  266.             font-weight: 600;
  267.             margin-bottom: 5px;
  268.             display: block;
  269.         }
  270.         
  271.         .shop-reviews-page .rating-filter {
  272.             display: flex;
  273.             gap: 10px;
  274.             flex-wrap: wrap;
  275.         }
  276.         
  277.         .shop-reviews-page .rating-btn {
  278.             padding: 8px 12px;
  279.             border: 1px solid #dee2e6;
  280.             background: white;
  281.             border-radius: 4px;
  282.             cursor: pointer;
  283.             transition: all 0.3s ease;
  284.             font-size: 14px;
  285.         }
  286.         
  287.         .shop-reviews-page .rating-btn:hover {
  288.             background: #f8f9fa;
  289.         }
  290.         
  291.         .shop-reviews-page .rating-btn.active {
  292.             background: #007bff;
  293.             color: white;
  294.             border-color: #007bff;
  295.         }
  296.         
  297.         .shop-reviews-page .verified-badge {
  298.             background: #28a745;
  299.             color: white;
  300.             padding: 2px 6px;
  301.             border-radius: 3px;
  302.             font-size: 10px;
  303.             font-weight: bold;
  304.             margin-left: 5px;
  305.         }
  306.         
  307.         .shop-reviews-page .pagination-wrapper {
  308.             display: flex;
  309.             justify-content: center;
  310.             margin-top: 30px;
  311.         }
  312.         
  313.         .shop-reviews-page .btn-review {
  314.             background: linear-gradient(45deg, #667eea, #764ba2);
  315.             border: none;
  316.             color: white;
  317.             padding: 12px 24px;
  318.             border-radius: 6px;
  319.             font-weight: 600;
  320.             text-decoration: none;
  321.             display: inline-block;
  322.             transition: all 0.3s ease;
  323.         }
  324.         
  325.         .shop-reviews-page .btn-review:hover {
  326.             transform: translateY(-2px);
  327.             box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  328.             color: white;
  329.         }
  330.         
  331.         .shop-reviews-page .empty-reviews {
  332.             text-align: center;
  333.             padding: 60px 20px;
  334.             color: #666;
  335.         }
  336.         
  337.         .shop-reviews-page .empty-reviews i {
  338.             font-size: 64px;
  339.             color: #ddd;
  340.             margin-bottom: 20px;
  341.         }
  342.         
  343.         @media (max-width: 768px) {
  344.             .shop-reviews-page .review-header {
  345.                 flex-direction: column;
  346.                 align-items: flex-start;
  347.             }
  348.             
  349.             .shop-reviews-page .stats-header {
  350.                 flex-direction: column;
  351.                 text-align: center;
  352.             }
  353.             
  354.             .shop-reviews-page .overall-rating {
  355.                 margin-right: 0;
  356.                 margin-bottom: 15px;
  357.             }
  358.             
  359.             .shop-reviews-page .rating-filter {
  360.                 justify-content: center;
  361.             }
  362.         }
  363.     </style>
  364. ";
  365.         
  366.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  367.         
  368.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  369.         yield from [];
  370.     }
  371.     // line 285
  372.     /**
  373.      * @return iterable<null|scalar|\Stringable>
  374.      */
  375.     public function block_body(array $context, array $blocks = []): iterable
  376.     {
  377.         $macros $this->macros;
  378.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  379.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  380.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  381.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  382.         // line 286
  383.         yield "    <div class=\"shop-reviews-page\">
  384.     <!-- Breadcrumb -->
  385.     <section class=\"banner-area organic-breadcrumb\">
  386.         <div class=\"container\">
  387.             <div class=\"breadcrumb-banner d-flex flex-wrap align-items-center justify-content-end\">
  388.                 <div class=\"col-first\">
  389.                     <h1>Avis - ";
  390.         // line 292
  391.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "name", [], "any"falsefalsefalse292), "html"nulltrue);
  392.         yield "</h1>
  393.                     <nav class=\"d-flex align-items-center\">
  394.                         <a href=\"";
  395.         // line 294
  396.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_home");
  397.         yield "\">Accueil<span class=\"lnr lnr-arrow-right\"></span></a>
  398.                         <a href=\"";
  399.         // line 295
  400.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ui_shop_show", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse295)]), "html"nulltrue);
  401.         yield "\">";
  402.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "name", [], "any"falsefalsefalse295), "html"nulltrue);
  403.         yield "<span class=\"lnr lnr-arrow-right\"></span></a>
  404.                         <a href=\"javascript:void(0)\">Avis</a>
  405.                     </nav>
  406.                 </div>
  407.             </div>
  408.         </div>
  409.     </section>
  410.     <section class=\"blog_area\">
  411.         <div class=\"container my-5\">
  412.             <div class=\"row\">
  413.                 <!-- Statistiques des avis -->
  414.                 <div class=\"col-12\">
  415.                     <div class=\"stats-card\">
  416.                         <div class=\"stats-header\">
  417.                             <div class=\"overall-rating\">
  418.                                 ";
  419.         // line 311
  420.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "averageRating", [], "any"falsefalsefalse311), 1), "html"nulltrue);
  421.         yield "
  422.                                 <div class=\"stars\">";
  423.         // line 312
  424.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\RatingExtension']->formatRatingStars(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "averageRating", [], "any"falsefalsefalse312)), "html"nulltrue);
  425.         yield "</div>
  426.                             </div>
  427.                             <div class=\"rating-breakdown\">
  428.                                 ";
  429.         // line 315
  430.         $context["ratingMap"] = [=> "fiveStars"=> "fourStars"=> "threeStars"=> "twoStars"=> "oneStar"];
  431.         // line 322
  432.         yield "                                ";
  433.         $context['_parent'] = $context;
  434.         $context['_seq'] = CoreExtension::ensureTraversable(range(51));
  435.         foreach ($context['_seq'] as $context["_key"] => $context["rating"]) {
  436.             // line 323
  437.             yield "                                    ";
  438.             $context["ratingKey"] = (($_v0 = ($context["ratingMap"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0[$context["rating"]] ?? null) : null);
  439.             // line 324
  440.             yield "                                    ";
  441.             $context["ratingCount"] = ((CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), ($context["ratingKey"] ?? null), [], "any"truetruefalse324)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), ($context["ratingKey"] ?? null), [], "any"falsefalsefalse324), 0)) : (0));
  442.             // line 325
  443.             yield "                                    ";
  444.             $context["percentage"] = (((CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "totalReviews", [], "any"falsefalsefalse325) > 0)) ? (((($context["ratingCount"] ?? null) / CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "totalReviews", [], "any"falsefalsefalse325)) * 100)) : (0));
  445.             // line 326
  446.             yield "                                    <div class=\"rating-bar\">
  447.                                         <span class=\"rating-label\">";
  448.             // line 327
  449.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["rating"], "html"nulltrue);
  450.             yield " étoiles</span>
  451.                                         <div class=\"rating-progress\">
  452.                                             <div class=\"rating-fill\" style=\"width: ";
  453.             // line 329
  454.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["percentage"] ?? null), "html"nulltrue);
  455.             yield "%\"></div>
  456.                                         </div>
  457.                                         <span class=\"rating-count\">";
  458.             // line 331
  459.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["ratingCount"] ?? null), "html"nulltrue);
  460.             yield "</span>
  461.                                     </div>
  462.                                 ";
  463.         }
  464.         $_parent $context['_parent'];
  465.         unset($context['_seq'], $context['_key'], $context['rating'], $context['_parent']);
  466.         $context array_intersect_key($context$_parent) + $_parent;
  467.         // line 334
  468.         yield "                            </div>
  469.                         </div>
  470.                         <div class=\"row text-center\">
  471.                             <div class=\"col-md-3\">
  472.                                 <h4>";
  473.         // line 338
  474.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "totalReviews", [], "any"falsefalsefalse338), "html"nulltrue);
  475.         yield "</h4>
  476.                                 <p class=\"text-muted mb-0\">Avis total</p>
  477.                             </div>
  478.                             <div class=\"col-md-3\">
  479.                                 <h4>";
  480.         // line 342
  481.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "positivePercentage", [], "any"falsefalsefalse342), "html"nulltrue);
  482.         yield "%</h4>
  483.                                 <p class=\"text-muted mb-0\">Positifs</p>
  484.                             </div>
  485.                             <div class=\"col-md-3\">
  486.                                 <h4>";
  487.         // line 346
  488.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["stats"] ?? null), "verifiedReviews", [], "any"falsefalsefalse346), "html"nulltrue);
  489.         yield "</h4>
  490.                                 <p class=\"text-muted mb-0\">Vérifiés</p>
  491.                             </div>
  492.                             <div class=\"col-md-3\">
  493.                                 <h4>";
  494.         // line 350
  495.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "followersCount", [], "any"truetruefalse350)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "followersCount", [], "any"falsefalsefalse350), 0)) : (0)), "html"nulltrue);
  496.         yield "</h4>
  497.                                 <p class=\"text-muted mb-0\">Followers</p>
  498.                             </div>
  499.                         </div>
  500.                     </div>
  501.                 </div>
  502.                 <!-- Filtres -->
  503.                 <div class=\"col-md-3\">
  504.                     <div class=\"filters-card\">
  505.                         <h5 class=\"mb-3\">Filtrer les avis</h5>
  506.                         
  507.                         <div class=\"filter-group\">
  508.                             <label>Note</label>
  509.                             <div class=\"rating-filter\">
  510.                                 <button class=\"rating-btn ";
  511.         // line 365
  512.         yield (((CoreExtension::getAttribute($this->env$this->source, ($context["filters"] ?? null), "rating", [], "any"falsefalsefalse365) == "")) ? ("active") : (""));
  513.         yield "\" data-rating=\"\">
  514.                                     Toutes
  515.                                 </button>
  516.                                 ";
  517.         // line 368
  518.         $context['_parent'] = $context;
  519.         $context['_seq'] = CoreExtension::ensureTraversable(range(51));
  520.         foreach ($context['_seq'] as $context["_key"] => $context["rating"]) {
  521.             // line 369
  522.             yield "                                    <button class=\"rating-btn ";
  523.             yield (((CoreExtension::getAttribute($this->env$this->source, ($context["filters"] ?? null), "rating", [], "any"falsefalsefalse369) == $context["rating"])) ? ("active") : (""));
  524.             yield "\" data-rating=\"";
  525.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["rating"], "html"nulltrue);
  526.             yield "\">
  527.                                         ";
  528.             // line 370
  529.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["rating"], "html"nulltrue);
  530.             yield "★
  531.                                     </button>
  532.                                 ";
  533.         }
  534.         $_parent $context['_parent'];
  535.         unset($context['_seq'], $context['_key'], $context['rating'], $context['_parent']);
  536.         $context array_intersect_key($context$_parent) + $_parent;
  537.         // line 373
  538.         yield "                            </div>
  539.                         </div>
  540.                         <div class=\"filter-group\">
  541.                             <label>
  542.                                 <input type=\"checkbox\" ";
  543.         // line 378
  544.         yield (((($tmp CoreExtension::getAttribute($this->env$this->source, ($context["filters"] ?? null), "verified", [], "any"falsefalsefalse378)) && $tmp instanceof Markup ? (string) $tmp $tmp)) ? ("checked") : (""));
  545.         yield " id=\"verified-filter\">
  546.                                 Avis vérifiés uniquement
  547.                             </label>
  548.                         </div>
  549.                         <div class=\"filter-group\">
  550.                             <label>Rechercher</label>
  551.                             <input type=\"text\" class=\"form-control\" id=\"search-filter\" placeholder=\"Rechercher dans les avis...\" value=\"";
  552.         // line 385
  553.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, ($context["filters"] ?? null), "search", [], "any"falsefalsefalse385), "html"nulltrue);
  554.         yield "\">
  555.                         </div>
  556.                         <button class=\"btn btn-primary w-100\" onclick=\"applyFilters()\">
  557.                             Appliquer les filtres
  558.                         </button>
  559.                     </div>
  560.                     ";
  561.         // line 393
  562.         if ((($tmp = ($context["canReview"] ?? null)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  563.             // line 394
  564.             yield "                        <div class=\"text-center mt-3\">
  565.                             <a href=\"";
  566.             // line 395
  567.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_new", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse395)]), "html"nulltrue);
  568.             yield "\" class=\"btn-review\">
  569.                                 <i class=\"lnr lnr-star\"></i> Laisser un avis
  570.                             </a>
  571.                         </div>
  572.                     ";
  573.         }
  574.         // line 400
  575.         yield "                </div>
  576.                 <!-- Liste des avis -->
  577.                 <div class=\"col-md-9\">
  578.                     ";
  579.         // line 404
  580.         if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["reviews"] ?? null)) > 0)) {
  581.             // line 405
  582.             yield "                        <div id=\"reviews-container\">
  583.                             ";
  584.             // line 406
  585.             $context['_parent'] = $context;
  586.             $context['_seq'] = CoreExtension::ensureTraversable(($context["reviews"] ?? null));
  587.             foreach ($context['_seq'] as $context["_key"] => $context["review"]) {
  588.                 // line 407
  589.                 yield "                                <div class=\"review-card\">
  590.                                     <div class=\"review-header\">
  591.                                         <div class=\"review-user\">
  592.                                             <div class=\"review-user-avatar\">
  593.                                                 ";
  594.                 // line 411
  595.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::default(Twig\Extension\CoreExtension::upper($this->env->getCharset(), Twig\Extension\CoreExtension::first($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["review"], "user", [], "any"falsefalsefalse411), "firstName", [], "any"falsefalsefalse411))), Twig\Extension\CoreExtension::upper($this->env->getCharset(), Twig\Extension\CoreExtension::first($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["review"], "user", [], "any"falsefalsefalse411), "email", [], "any"falsefalsefalse411)))), "html"nulltrue);
  596.                 yield "
  597.                                             </div>
  598.                                             <div class=\"review-user-info\">
  599.                                                 <h6>";
  600.                 // line 414
  601.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["review"], "user", [], "any"falsetruefalse414), "firstName", [], "any"truetruefalse414)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["review"], "user", [], "any"falsefalsefalse414), "firstName", [], "any"falsefalsefalse414), "Utilisateur")) : ("Utilisateur")), "html"nulltrue);
  602.                 yield "</h6>
  603.                                                 <small>";
  604.                 // line 415
  605.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "getTimeAgo", [], "method"falsefalsefalse415), "html"nulltrue);
  606.                 yield "</small>
  607.                                             </div>
  608.                                         </div>
  609.                                         <div class=\"review-rating\">
  610.                                             <div class=\"stars\">";
  611.                 // line 419
  612.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "getRatingStars", [], "method"falsefalsefalse419), "html"nulltrue);
  613.                 yield "</div>
  614.                                             ";
  615.                 // line 420
  616.                 if ((($tmp CoreExtension::getAttribute($this->env$this->source$context["review"], "isVerified", [], "any"falsefalsefalse420)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  617.                     // line 421
  618.                     yield "                                                <span class=\"verified-badge\">✓ Vérifié</span>
  619.                                             ";
  620.                 }
  621.                 // line 423
  622.                 yield "                                        </div>
  623.                                     </div>
  624.                                     ";
  625.                 // line 426
  626.                 if ((($tmp CoreExtension::getAttribute($this->env$this->source$context["review"], "reviewType", [], "any"falsefalsefalse426)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  627.                     // line 427
  628.                     yield "                                        <div class=\"review-type\">";
  629.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "getReviewTypeLabel", [], "method"falsefalsefalse427), "html"nulltrue);
  630.                     yield "</div>
  631.                                     ";
  632.                 }
  633.                 // line 429
  634.                 yield "
  635.                                     <div class=\"review-content\">
  636.                                         ";
  637.                 // line 431
  638.                 yield Twig\Extension\CoreExtension::nl2br($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "comment", [], "any"falsefalsefalse431), "html"nulltrue));
  639.                 yield "
  640.                                     </div>
  641.                                     <div class=\"review-actions\">
  642.                                         <button class=\"helpful-btn\" onclick=\"markAsHelpful(";
  643.                 // line 435
  644.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "id", [], "any"falsefalsefalse435), "html"nulltrue);
  645.                 yield ")\">
  646.                                             <i class=\"lnr lnr-thumbs-up\"></i> Utile (";
  647.                 // line 436
  648.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "helpfulCount", [], "any"falsefalsefalse436), "html"nulltrue);
  649.                 yield ")
  650.                                         </button>
  651.                                         <button class=\"helpful-btn\" onclick=\"markAsNotHelpful(";
  652.                 // line 438
  653.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "id", [], "any"falsefalsefalse438), "html"nulltrue);
  654.                 yield ")\">
  655.                                             <i class=\"lnr lnr-thumbs-down\"></i> Pas utile (";
  656.                 // line 439
  657.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["review"], "notHelpfulCount", [], "any"falsefalsefalse439), "html"nulltrue);
  658.                 yield ")
  659.                                         </button>
  660.                                         
  661.                                         ";
  662.                 // line 442
  663.                 if ((CoreExtension::getAttribute($this->env$this->source$context["review"], "user", [], "any"falsefalsefalse442) == CoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsefalsefalse442))) {
  664.                     // line 443
  665.                     yield "                                            <div class=\"ms-auto\">
  666.                                                 <a href=\"";
  667.                     // line 444
  668.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_edit", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse444), "id" => CoreExtension::getAttribute($this->env$this->source$context["review"], "id", [], "any"falsefalsefalse444)]), "html"nulltrue);
  669.                     yield "\" class=\"btn btn-sm btn-outline-primary\">
  670.                                                     <i class=\"lnr lnr-pencil\"></i> Modifier
  671.                                                 </a>
  672.                                                 <form method=\"post\" action=\"";
  673.                     // line 447
  674.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_delete", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse447), "id" => CoreExtension::getAttribute($this->env$this->source$context["review"], "id", [], "any"falsefalsefalse447)]), "html"nulltrue);
  675.                     yield "\" class=\"d-inline\" onsubmit=\"return confirm('Supprimer cet avis ?')\">
  676.                                                     <input type=\"hidden\" name=\"_token\" value=\"";
  677.                     // line 448
  678.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken(("delete" CoreExtension::getAttribute($this->env$this->source$context["review"], "id", [], "any"falsefalsefalse448))), "html"nulltrue);
  679.                     yield "\">
  680.                                                     <button type=\"submit\" class=\"btn btn-sm btn-outline-danger\">
  681.                                                         <i class=\"lnr lnr-trash\"></i> Supprimer
  682.                                                     </button>
  683.                                                 </form>
  684.                                             </div>
  685.                                         ";
  686.                 }
  687.                 // line 455
  688.                 yield "                                    </div>
  689.                                 </div>
  690.                             ";
  691.             }
  692.             $_parent $context['_parent'];
  693.             unset($context['_seq'], $context['_key'], $context['review'], $context['_parent']);
  694.             $context array_intersect_key($context$_parent) + $_parent;
  695.             // line 458
  696.             yield "                        </div>
  697.                         <!-- Pagination -->
  698.                         ";
  699.             // line 461
  700.             if ((CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "pages", [], "any"falsefalsefalse461) > 1)) {
  701.                 // line 462
  702.                 yield "                            <div class=\"pagination-wrapper\">
  703.                                 <nav>
  704.                                     <ul class=\"pagination\">
  705.                                         ";
  706.                 // line 465
  707.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "page", [], "any"falsefalsefalse465) > 1)) {
  708.                     // line 466
  709.                     yield "                                            <li class=\"page-item\">
  710.                                                 <a class=\"page-link\" href=\"";
  711.                     // line 467
  712.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_index", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse467), "page" => (CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "page", [], "any"falsefalsefalse467) - 1)]), "html"nulltrue);
  713.                     yield "\">Précédent</a>
  714.                                             </li>
  715.                                         ";
  716.                 }
  717.                 // line 470
  718.                 yield "                                        
  719.                                         ";
  720.                 // line 471
  721.                 $context['_parent'] = $context;
  722.                 $context['_seq'] = CoreExtension::ensureTraversable(range(1CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "pages", [], "any"falsefalsefalse471)));
  723.                 foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
  724.                     // line 472
  725.                     yield "                                            ";
  726.                     if (($context["page"] == CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "page", [], "any"falsefalsefalse472))) {
  727.                         // line 473
  728.                         yield "                                                <li class=\"page-item active\">
  729.                                                     <span class=\"page-link\">";
  730.                         // line 474
  731.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["page"], "html"nulltrue);
  732.                         yield "</span>
  733.                                                 </li>
  734.                                             ";
  735.                     } else {
  736.                         // line 477
  737.                         yield "                                                <li class=\"page-item\">
  738.                                                     <a class=\"page-link\" href=\"";
  739.                         // line 478
  740.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_index", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse478), "page" => $context["page"]]), "html"nulltrue);
  741.                         yield "\">";
  742.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["page"], "html"nulltrue);
  743.                         yield "</a>
  744.                                                 </li>
  745.                                             ";
  746.                     }
  747.                     // line 481
  748.                     yield "                                        ";
  749.                 }
  750.                 $_parent $context['_parent'];
  751.                 unset($context['_seq'], $context['_key'], $context['page'], $context['_parent']);
  752.                 $context array_intersect_key($context$_parent) + $_parent;
  753.                 // line 482
  754.                 yield "                                        
  755.                                         ";
  756.                 // line 483
  757.                 if ((CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "page", [], "any"falsefalsefalse483) < CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "pages", [], "any"falsefalsefalse483))) {
  758.                     // line 484
  759.                     yield "                                            <li class=\"page-item\">
  760.                                                 <a class=\"page-link\" href=\"";
  761.                     // line 485
  762.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_index", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse485), "page" => (CoreExtension::getAttribute($this->env$this->source, ($context["pagination"] ?? null), "page", [], "any"falsefalsefalse485) + 1)]), "html"nulltrue);
  763.                     yield "\">Suivant</a>
  764.                                             </li>
  765.                                         ";
  766.                 }
  767.                 // line 488
  768.                 yield "                                    </ul>
  769.                                 </nav>
  770.                             </div>
  771.                         ";
  772.             }
  773.             // line 492
  774.             yield "                    ";
  775.         } else {
  776.             // line 493
  777.             yield "                        <div class=\"empty-reviews\">
  778.                             <i class=\"lnr lnr-star\"></i>
  779.                             <h3>Aucun avis pour le moment</h3>
  780.                             <p>Soyez le premier à laisser un avis sur cette boutique !</p>
  781.                             ";
  782.             // line 497
  783.             if ((($tmp = ($context["canReview"] ?? null)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  784.                 // line 498
  785.                 yield "                                <a href=\"";
  786.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_new", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse498)]), "html"nulltrue);
  787.                 yield "\" class=\"btn-review\">
  788.                                     <i class=\"lnr lnr-star\"></i> Laisser un avis
  789.                                 </a>
  790.                             ";
  791.             }
  792.             // line 502
  793.             yield "                        </div>
  794.                     ";
  795.         }
  796.         // line 504
  797.         yield "                </div>
  798.             </div>
  799.         </div>
  800.     </section>
  801.     </div>
  802. ";
  803.         
  804.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  805.         
  806.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  807.         yield from [];
  808.     }
  809.     // line 511
  810.     /**
  811.      * @return iterable<null|scalar|\Stringable>
  812.      */
  813.     public function block_javascripts(array $context, array $blocks = []): iterable
  814.     {
  815.         $macros $this->macros;
  816.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  817.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  818.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  819.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  820.         // line 512
  821.         yield "    ";
  822.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  823.         yield "
  824.     <script>
  825.         // Scoper toutes les fonctions dans le contexte de la page reviews pour éviter les conflits
  826.         (function() {
  827.             'use strict';
  828.             
  829.             function applyFilters() {
  830.                 const ratingBtn = document.querySelector('.shop-reviews-page .rating-btn.active');
  831.                 if (!ratingBtn) return;
  832.                 
  833.                 const rating = ratingBtn.dataset.rating;
  834.                 const verified = document.getElementById('verified-filter')?.checked || false;
  835.                 const search = document.getElementById('search-filter')?.value || '';
  836.                 
  837.                 const params = new URLSearchParams();
  838.                 if (rating) params.append('rating', rating);
  839.                 if (verified) params.append('verified', '1');
  840.                 if (search) params.append('search', search);
  841.                 
  842.                 window.location.href = '";
  843.         // line 531
  844.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_index", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse531)]), "html"nulltrue);
  845.         yield "?' + params.toString();
  846.             }
  847.             function markAsHelpful(reviewId) {
  848.                 fetch('";
  849.         // line 535
  850.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_helpful", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse535), "id" => "REVIEW_ID"]), "html"nulltrue);
  851.         yield "'.replace('REVIEW_ID', reviewId), {
  852.                     method: 'POST',
  853.                     headers: {
  854.                         'X-Requested-With': 'XMLHttpRequest'
  855.                     }
  856.                 })
  857.                 .then(response => response.json())
  858.                 .then(data => {
  859.                     if (data.success) {
  860.                         location.reload();
  861.                     } else {
  862.                         alert(data.message || 'Une erreur est survenue');
  863.                     }
  864.                 })
  865.                 .catch(error => {
  866.                     console.error('Erreur:', error);
  867.                     alert('Une erreur est survenue lors du vote');
  868.                 });
  869.             }
  870.             function markAsNotHelpful(reviewId) {
  871.                 fetch('";
  872.         // line 556
  873.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shop_reviews_not_helpful", ["slug" => CoreExtension::getAttribute($this->env$this->source, ($context["shop"] ?? null), "slug", [], "any"falsefalsefalse556), "id" => "REVIEW_ID"]), "html"nulltrue);
  874.         yield "'.replace('REVIEW_ID', reviewId), {
  875.                     method: 'POST',
  876.                     headers: {
  877.                         'X-Requested-With': 'XMLHttpRequest'
  878.                     }
  879.                 })
  880.                 .then(response => response.json())
  881.                 .then(data => {
  882.                     if (data.success) {
  883.                         location.reload();
  884.                     } else {
  885.                         alert(data.message || 'Une erreur est survenue');
  886.                     }
  887.                 })
  888.                 .catch(error => {
  889.                     console.error('Erreur:', error);
  890.                     alert('Une erreur est survenue lors du vote');
  891.                 });
  892.             }
  893.             // Exposer les fonctions globalement pour les boutons onclick
  894.             window.applyFilters = applyFilters;
  895.             window.markAsHelpful = markAsHelpful;
  896.             window.markAsNotHelpful = markAsNotHelpful;
  897.             // Gestion des boutons de filtre par note - scoped à la page reviews
  898.             document.addEventListener('DOMContentLoaded', function() {
  899.                 const reviewPage = document.querySelector('.shop-reviews-page');
  900.                 if (!reviewPage) return;
  901.                 
  902.                 reviewPage.querySelectorAll('.rating-btn').forEach(btn => {
  903.                     btn.addEventListener('click', function() {
  904.                         reviewPage.querySelectorAll('.rating-btn').forEach(b => b.classList.remove('active'));
  905.                         this.classList.add('active');
  906.                     });
  907.                 });
  908.             });
  909.         })();
  910.     </script>
  911. ";
  912.         
  913.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  914.         
  915.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  916.         yield from [];
  917.     }
  918.     /**
  919.      * @codeCoverageIgnore
  920.      */
  921.     public function getTemplateName(): string
  922.     {
  923.         return "shop/reviews/index.html.twig";
  924.     }
  925.     /**
  926.      * @codeCoverageIgnore
  927.      */
  928.     public function isTraitable(): bool
  929.     {
  930.         return false;
  931.     }
  932.     /**
  933.      * @codeCoverageIgnore
  934.      */
  935.     public function getDebugInfo(): array
  936.     {
  937.         return array (  914 => 556,  890 => 535,  883 => 531,  860 => 512,  847 => 511,  831 => 504,  827 => 502,  819 => 498,  817 => 497,  811 => 493,  808 => 492,  802 => 488,  796 => 485,  793 => 484,  791 => 483,  788 => 482,  782 => 481,  774 => 478,  771 => 477,  765 => 474,  762 => 473,  759 => 472,  755 => 471,  752 => 470,  746 => 467,  743 => 466,  741 => 465,  736 => 462,  734 => 461,  729 => 458,  721 => 455,  711 => 448,  707 => 447,  701 => 444,  698 => 443,  696 => 442,  690 => 439,  686 => 438,  681 => 436,  677 => 435,  670 => 431,  666 => 429,  660 => 427,  658 => 426,  653 => 423,  649 => 421,  647 => 420,  643 => 419,  636 => 415,  632 => 414,  626 => 411,  620 => 407,  616 => 406,  613 => 405,  611 => 404,  605 => 400,  597 => 395,  594 => 394,  592 => 393,  581 => 385,  571 => 378,  564 => 373,  555 => 370,  548 => 369,  544 => 368,  538 => 365,  520 => 350,  513 => 346,  506 => 342,  499 => 338,  493 => 334,  484 => 331,  479 => 329,  474 => 327,  471 => 326,  468 => 325,  465 => 324,  462 => 323,  457 => 322,  455 => 315,  449 => 312,  445 => 311,  424 => 295,  420 => 294,  415 => 292,  407 => 286,  394 => 285,  104 => 6,  91 => 5,  66 => 3,  43 => 1,);
  938.     }
  939.     public function getSourceContext(): Source
  940.     {
  941.         return new Source("{% extends 'base_home.html.twig' %}
  942. {% block title %}Avis - {{ shop.name }} | MaketOu{% endblock %}
  943. {% block stylesheets %}
  944.     {{ parent() }}
  945.     <style>
  946.         /* Styles spécifiques aux reviews - tous scoped pour éviter les conflits avec le template de base */
  947.         .shop-reviews-page .review-card {
  948.             border: 1px solid #e0e0e0;
  949.             border-radius: 10px;
  950.             padding: 20px;
  951.             margin-bottom: 20px;
  952.             background: white;
  953.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  954.         }
  955.         
  956.         .shop-reviews-page .review-header {
  957.             display: flex;
  958.             justify-content: space-between;
  959.             align-items: center;
  960.             margin-bottom: 15px;
  961.         }
  962.         
  963.         .shop-reviews-page .review-user {
  964.             display: flex;
  965.             align-items: center;
  966.         }
  967.         
  968.         .shop-reviews-page .review-user-avatar {
  969.             width: 40px;
  970.             height: 40px;
  971.             border-radius: 50%;
  972.             background: linear-gradient(45deg, #667eea, #764ba2);
  973.             display: flex;
  974.             align-items: center;
  975.             justify-content: center;
  976.             color: white;
  977.             font-weight: bold;
  978.             margin-right: 12px;
  979.         }
  980.         
  981.         .shop-reviews-page .review-user-info h6 {
  982.             margin: 0;
  983.             font-weight: 600;
  984.             color: #333;
  985.         }
  986.         
  987.         .shop-reviews-page .review-user-info small {
  988.             color: #666;
  989.         }
  990.         
  991.         .shop-reviews-page .review-rating {
  992.             display: flex;
  993.             align-items: center;
  994.             gap: 5px;
  995.         }
  996.         
  997.         .shop-reviews-page .stars {
  998.             color: #ffc107;
  999.             font-size: 18px;
  1000.         }
  1001.         
  1002.         .shop-reviews-page .review-date {
  1003.             color: #666;
  1004.             font-size: 14px;
  1005.         }
  1006.         
  1007.         .shop-reviews-page .review-content {
  1008.             margin-bottom: 15px;
  1009.             line-height: 1.6;
  1010.             color: #333;
  1011.         }
  1012.         
  1013.         .shop-reviews-page .review-type {
  1014.             display: inline-block;
  1015.             background: #f8f9fa;
  1016.             color: #495057;
  1017.             padding: 4px 8px;
  1018.             border-radius: 4px;
  1019.             font-size: 12px;
  1020.             margin-bottom: 10px;
  1021.         }
  1022.         
  1023.         .shop-reviews-page .review-actions {
  1024.             display: flex;
  1025.             gap: 10px;
  1026.             align-items: center;
  1027.         }
  1028.         
  1029.         .shop-reviews-page .helpful-btn {
  1030.             background: none;
  1031.             border: 1px solid #dee2e6;
  1032.             padding: 5px 10px;
  1033.             border-radius: 4px;
  1034.             font-size: 12px;
  1035.             color: #6c757d;
  1036.             cursor: pointer;
  1037.             transition: all 0.3s ease;
  1038.         }
  1039.         
  1040.         .shop-reviews-page .helpful-btn:hover {
  1041.             background: #f8f9fa;
  1042.             border-color: #adb5bd;
  1043.         }
  1044.         
  1045.         .shop-reviews-page .helpful-btn.active {
  1046.             background: #28a745;
  1047.             color: white;
  1048.             border-color: #28a745;
  1049.         }
  1050.         
  1051.         .shop-reviews-page .stats-card {
  1052.             background: white;
  1053.             border-radius: 10px;
  1054.             padding: 20px;
  1055.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  1056.             margin-bottom: 20px;
  1057.         }
  1058.         
  1059.         .shop-reviews-page .stats-header {
  1060.             display: flex;
  1061.             align-items: center;
  1062.             margin-bottom: 20px;
  1063.         }
  1064.         
  1065.         .shop-reviews-page .overall-rating {
  1066.             font-size: 48px;
  1067.             font-weight: bold;
  1068.             color: #333;
  1069.             margin-right: 20px;
  1070.         }
  1071.         
  1072.         .shop-reviews-page .rating-breakdown {
  1073.             flex: 1;
  1074.         }
  1075.         
  1076.         .shop-reviews-page .rating-bar {
  1077.             display: flex;
  1078.             align-items: center;
  1079.             margin-bottom: 8px;
  1080.         }
  1081.         
  1082.         .shop-reviews-page .rating-label {
  1083.             width: 60px;
  1084.             font-size: 14px;
  1085.             color: #666;
  1086.         }
  1087.         
  1088.         .shop-reviews-page .rating-progress {
  1089.             flex: 1;
  1090.             height: 8px;
  1091.             background: #e9ecef;
  1092.             border-radius: 4px;
  1093.             margin: 0 10px;
  1094.             overflow: hidden;
  1095.         }
  1096.         
  1097.         .shop-reviews-page .rating-fill {
  1098.             height: 100%;
  1099.             background: linear-gradient(45deg, #ffc107, #ff8c00);
  1100.             transition: width 0.3s ease;
  1101.         }
  1102.         
  1103.         .shop-reviews-page .rating-count {
  1104.             width: 40px;
  1105.             text-align: right;
  1106.             font-size: 14px;
  1107.             color: #666;
  1108.         }
  1109.         
  1110.         .shop-reviews-page .filters-card {
  1111.             background: white;
  1112.             border-radius: 10px;
  1113.             padding: 20px;
  1114.             box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  1115.             margin-bottom: 20px;
  1116.         }
  1117.         
  1118.         .shop-reviews-page .filter-group {
  1119.             margin-bottom: 15px;
  1120.         }
  1121.         
  1122.         .shop-reviews-page .filter-group label {
  1123.             font-weight: 600;
  1124.             margin-bottom: 5px;
  1125.             display: block;
  1126.         }
  1127.         
  1128.         .shop-reviews-page .rating-filter {
  1129.             display: flex;
  1130.             gap: 10px;
  1131.             flex-wrap: wrap;
  1132.         }
  1133.         
  1134.         .shop-reviews-page .rating-btn {
  1135.             padding: 8px 12px;
  1136.             border: 1px solid #dee2e6;
  1137.             background: white;
  1138.             border-radius: 4px;
  1139.             cursor: pointer;
  1140.             transition: all 0.3s ease;
  1141.             font-size: 14px;
  1142.         }
  1143.         
  1144.         .shop-reviews-page .rating-btn:hover {
  1145.             background: #f8f9fa;
  1146.         }
  1147.         
  1148.         .shop-reviews-page .rating-btn.active {
  1149.             background: #007bff;
  1150.             color: white;
  1151.             border-color: #007bff;
  1152.         }
  1153.         
  1154.         .shop-reviews-page .verified-badge {
  1155.             background: #28a745;
  1156.             color: white;
  1157.             padding: 2px 6px;
  1158.             border-radius: 3px;
  1159.             font-size: 10px;
  1160.             font-weight: bold;
  1161.             margin-left: 5px;
  1162.         }
  1163.         
  1164.         .shop-reviews-page .pagination-wrapper {
  1165.             display: flex;
  1166.             justify-content: center;
  1167.             margin-top: 30px;
  1168.         }
  1169.         
  1170.         .shop-reviews-page .btn-review {
  1171.             background: linear-gradient(45deg, #667eea, #764ba2);
  1172.             border: none;
  1173.             color: white;
  1174.             padding: 12px 24px;
  1175.             border-radius: 6px;
  1176.             font-weight: 600;
  1177.             text-decoration: none;
  1178.             display: inline-block;
  1179.             transition: all 0.3s ease;
  1180.         }
  1181.         
  1182.         .shop-reviews-page .btn-review:hover {
  1183.             transform: translateY(-2px);
  1184.             box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  1185.             color: white;
  1186.         }
  1187.         
  1188.         .shop-reviews-page .empty-reviews {
  1189.             text-align: center;
  1190.             padding: 60px 20px;
  1191.             color: #666;
  1192.         }
  1193.         
  1194.         .shop-reviews-page .empty-reviews i {
  1195.             font-size: 64px;
  1196.             color: #ddd;
  1197.             margin-bottom: 20px;
  1198.         }
  1199.         
  1200.         @media (max-width: 768px) {
  1201.             .shop-reviews-page .review-header {
  1202.                 flex-direction: column;
  1203.                 align-items: flex-start;
  1204.             }
  1205.             
  1206.             .shop-reviews-page .stats-header {
  1207.                 flex-direction: column;
  1208.                 text-align: center;
  1209.             }
  1210.             
  1211.             .shop-reviews-page .overall-rating {
  1212.                 margin-right: 0;
  1213.                 margin-bottom: 15px;
  1214.             }
  1215.             
  1216.             .shop-reviews-page .rating-filter {
  1217.                 justify-content: center;
  1218.             }
  1219.         }
  1220.     </style>
  1221. {% endblock %}
  1222. {% block body %}
  1223.     <div class=\"shop-reviews-page\">
  1224.     <!-- Breadcrumb -->
  1225.     <section class=\"banner-area organic-breadcrumb\">
  1226.         <div class=\"container\">
  1227.             <div class=\"breadcrumb-banner d-flex flex-wrap align-items-center justify-content-end\">
  1228.                 <div class=\"col-first\">
  1229.                     <h1>Avis - {{ shop.name }}</h1>
  1230.                     <nav class=\"d-flex align-items-center\">
  1231.                         <a href=\"{{ path('ui_home') }}\">Accueil<span class=\"lnr lnr-arrow-right\"></span></a>
  1232.                         <a href=\"{{ path('ui_shop_show', {'slug': shop.slug}) }}\">{{ shop.name }}<span class=\"lnr lnr-arrow-right\"></span></a>
  1233.                         <a href=\"javascript:void(0)\">Avis</a>
  1234.                     </nav>
  1235.                 </div>
  1236.             </div>
  1237.         </div>
  1238.     </section>
  1239.     <section class=\"blog_area\">
  1240.         <div class=\"container my-5\">
  1241.             <div class=\"row\">
  1242.                 <!-- Statistiques des avis -->
  1243.                 <div class=\"col-12\">
  1244.                     <div class=\"stats-card\">
  1245.                         <div class=\"stats-header\">
  1246.                             <div class=\"overall-rating\">
  1247.                                 {{ stats.averageRating|number_format(1) }}
  1248.                                 <div class=\"stars\">{{ stats.averageRating|rating_stars }}</div>
  1249.                             </div>
  1250.                             <div class=\"rating-breakdown\">
  1251.                                 {% set ratingMap = {
  1252.                                     5: 'fiveStars',
  1253.                                     4: 'fourStars',
  1254.                                     3: 'threeStars',
  1255.                                     2: 'twoStars',
  1256.                                     1: 'oneStar'
  1257.                                 } %}
  1258.                                 {% for rating in 5..1 %}
  1259.                                     {% set ratingKey = ratingMap[rating] %}
  1260.                                     {% set ratingCount = attribute(stats, ratingKey)|default(0) %}
  1261.                                     {% set percentage = stats.totalReviews > 0 ? (ratingCount / stats.totalReviews * 100) : 0 %}
  1262.                                     <div class=\"rating-bar\">
  1263.                                         <span class=\"rating-label\">{{ rating }} étoiles</span>
  1264.                                         <div class=\"rating-progress\">
  1265.                                             <div class=\"rating-fill\" style=\"width: {{ percentage }}%\"></div>
  1266.                                         </div>
  1267.                                         <span class=\"rating-count\">{{ ratingCount }}</span>
  1268.                                     </div>
  1269.                                 {% endfor %}
  1270.                             </div>
  1271.                         </div>
  1272.                         <div class=\"row text-center\">
  1273.                             <div class=\"col-md-3\">
  1274.                                 <h4>{{ stats.totalReviews }}</h4>
  1275.                                 <p class=\"text-muted mb-0\">Avis total</p>
  1276.                             </div>
  1277.                             <div class=\"col-md-3\">
  1278.                                 <h4>{{ stats.positivePercentage }}%</h4>
  1279.                                 <p class=\"text-muted mb-0\">Positifs</p>
  1280.                             </div>
  1281.                             <div class=\"col-md-3\">
  1282.                                 <h4>{{ stats.verifiedReviews }}</h4>
  1283.                                 <p class=\"text-muted mb-0\">Vérifiés</p>
  1284.                             </div>
  1285.                             <div class=\"col-md-3\">
  1286.                                 <h4>{{ shop.followersCount|default(0) }}</h4>
  1287.                                 <p class=\"text-muted mb-0\">Followers</p>
  1288.                             </div>
  1289.                         </div>
  1290.                     </div>
  1291.                 </div>
  1292.                 <!-- Filtres -->
  1293.                 <div class=\"col-md-3\">
  1294.                     <div class=\"filters-card\">
  1295.                         <h5 class=\"mb-3\">Filtrer les avis</h5>
  1296.                         
  1297.                         <div class=\"filter-group\">
  1298.                             <label>Note</label>
  1299.                             <div class=\"rating-filter\">
  1300.                                 <button class=\"rating-btn {{ filters.rating == '' ? 'active' : '' }}\" data-rating=\"\">
  1301.                                     Toutes
  1302.                                 </button>
  1303.                                 {% for rating in 5..1 %}
  1304.                                     <button class=\"rating-btn {{ filters.rating == rating ? 'active' : '' }}\" data-rating=\"{{ rating }}\">
  1305.                                         {{ rating }}★
  1306.                                     </button>
  1307.                                 {% endfor %}
  1308.                             </div>
  1309.                         </div>
  1310.                         <div class=\"filter-group\">
  1311.                             <label>
  1312.                                 <input type=\"checkbox\" {{ filters.verified ? 'checked' : '' }} id=\"verified-filter\">
  1313.                                 Avis vérifiés uniquement
  1314.                             </label>
  1315.                         </div>
  1316.                         <div class=\"filter-group\">
  1317.                             <label>Rechercher</label>
  1318.                             <input type=\"text\" class=\"form-control\" id=\"search-filter\" placeholder=\"Rechercher dans les avis...\" value=\"{{ filters.search }}\">
  1319.                         </div>
  1320.                         <button class=\"btn btn-primary w-100\" onclick=\"applyFilters()\">
  1321.                             Appliquer les filtres
  1322.                         </button>
  1323.                     </div>
  1324.                     {% if canReview %}
  1325.                         <div class=\"text-center mt-3\">
  1326.                             <a href=\"{{ path('shop_reviews_new', {'slug': shop.slug}) }}\" class=\"btn-review\">
  1327.                                 <i class=\"lnr lnr-star\"></i> Laisser un avis
  1328.                             </a>
  1329.                         </div>
  1330.                     {% endif %}
  1331.                 </div>
  1332.                 <!-- Liste des avis -->
  1333.                 <div class=\"col-md-9\">
  1334.                     {% if reviews|length > 0 %}
  1335.                         <div id=\"reviews-container\">
  1336.                             {% for review in reviews %}
  1337.                                 <div class=\"review-card\">
  1338.                                     <div class=\"review-header\">
  1339.                                         <div class=\"review-user\">
  1340.                                             <div class=\"review-user-avatar\">
  1341.                                                 {{ review.user.firstName|first|upper|default(review.user.email|first|upper) }}
  1342.                                             </div>
  1343.                                             <div class=\"review-user-info\">
  1344.                                                 <h6>{{ review.user.firstName|default('Utilisateur') }}</h6>
  1345.                                                 <small>{{ review.getTimeAgo() }}</small>
  1346.                                             </div>
  1347.                                         </div>
  1348.                                         <div class=\"review-rating\">
  1349.                                             <div class=\"stars\">{{ review.getRatingStars() }}</div>
  1350.                                             {% if review.isVerified %}
  1351.                                                 <span class=\"verified-badge\">✓ Vérifié</span>
  1352.                                             {% endif %}
  1353.                                         </div>
  1354.                                     </div>
  1355.                                     {% if review.reviewType %}
  1356.                                         <div class=\"review-type\">{{ review.getReviewTypeLabel() }}</div>
  1357.                                     {% endif %}
  1358.                                     <div class=\"review-content\">
  1359.                                         {{ review.comment|nl2br }}
  1360.                                     </div>
  1361.                                     <div class=\"review-actions\">
  1362.                                         <button class=\"helpful-btn\" onclick=\"markAsHelpful({{ review.id }})\">
  1363.                                             <i class=\"lnr lnr-thumbs-up\"></i> Utile ({{ review.helpfulCount }})
  1364.                                         </button>
  1365.                                         <button class=\"helpful-btn\" onclick=\"markAsNotHelpful({{ review.id }})\">
  1366.                                             <i class=\"lnr lnr-thumbs-down\"></i> Pas utile ({{ review.notHelpfulCount }})
  1367.                                         </button>
  1368.                                         
  1369.                                         {% if review.user == app.user %}
  1370.                                             <div class=\"ms-auto\">
  1371.                                                 <a href=\"{{ path('shop_reviews_edit', {'slug': shop.slug, 'id': review.id}) }}\" class=\"btn btn-sm btn-outline-primary\">
  1372.                                                     <i class=\"lnr lnr-pencil\"></i> Modifier
  1373.                                                 </a>
  1374.                                                 <form method=\"post\" action=\"{{ path('shop_reviews_delete', {'slug': shop.slug, 'id': review.id}) }}\" class=\"d-inline\" onsubmit=\"return confirm('Supprimer cet avis ?')\">
  1375.                                                     <input type=\"hidden\" name=\"_token\" value=\"{{ csrf_token('delete' ~ review.id) }}\">
  1376.                                                     <button type=\"submit\" class=\"btn btn-sm btn-outline-danger\">
  1377.                                                         <i class=\"lnr lnr-trash\"></i> Supprimer
  1378.                                                     </button>
  1379.                                                 </form>
  1380.                                             </div>
  1381.                                         {% endif %}
  1382.                                     </div>
  1383.                                 </div>
  1384.                             {% endfor %}
  1385.                         </div>
  1386.                         <!-- Pagination -->
  1387.                         {% if pagination.pages > 1 %}
  1388.                             <div class=\"pagination-wrapper\">
  1389.                                 <nav>
  1390.                                     <ul class=\"pagination\">
  1391.                                         {% if pagination.page > 1 %}
  1392.                                             <li class=\"page-item\">
  1393.                                                 <a class=\"page-link\" href=\"{{ path('shop_reviews_index', {'slug': shop.slug, 'page': pagination.page - 1}) }}\">Précédent</a>
  1394.                                             </li>
  1395.                                         {% endif %}
  1396.                                         
  1397.                                         {% for page in 1..pagination.pages %}
  1398.                                             {% if page == pagination.page %}
  1399.                                                 <li class=\"page-item active\">
  1400.                                                     <span class=\"page-link\">{{ page }}</span>
  1401.                                                 </li>
  1402.                                             {% else %}
  1403.                                                 <li class=\"page-item\">
  1404.                                                     <a class=\"page-link\" href=\"{{ path('shop_reviews_index', {'slug': shop.slug, 'page': page}) }}\">{{ page }}</a>
  1405.                                                 </li>
  1406.                                             {% endif %}
  1407.                                         {% endfor %}
  1408.                                         
  1409.                                         {% if pagination.page < pagination.pages %}
  1410.                                             <li class=\"page-item\">
  1411.                                                 <a class=\"page-link\" href=\"{{ path('shop_reviews_index', {'slug': shop.slug, 'page': pagination.page + 1}) }}\">Suivant</a>
  1412.                                             </li>
  1413.                                         {% endif %}
  1414.                                     </ul>
  1415.                                 </nav>
  1416.                             </div>
  1417.                         {% endif %}
  1418.                     {% else %}
  1419.                         <div class=\"empty-reviews\">
  1420.                             <i class=\"lnr lnr-star\"></i>
  1421.                             <h3>Aucun avis pour le moment</h3>
  1422.                             <p>Soyez le premier à laisser un avis sur cette boutique !</p>
  1423.                             {% if canReview %}
  1424.                                 <a href=\"{{ path('shop_reviews_new', {'slug': shop.slug}) }}\" class=\"btn-review\">
  1425.                                     <i class=\"lnr lnr-star\"></i> Laisser un avis
  1426.                                 </a>
  1427.                             {% endif %}
  1428.                         </div>
  1429.                     {% endif %}
  1430.                 </div>
  1431.             </div>
  1432.         </div>
  1433.     </section>
  1434.     </div>
  1435. {% endblock %}
  1436. {% block javascripts %}
  1437.     {{ parent() }}
  1438.     <script>
  1439.         // Scoper toutes les fonctions dans le contexte de la page reviews pour éviter les conflits
  1440.         (function() {
  1441.             'use strict';
  1442.             
  1443.             function applyFilters() {
  1444.                 const ratingBtn = document.querySelector('.shop-reviews-page .rating-btn.active');
  1445.                 if (!ratingBtn) return;
  1446.                 
  1447.                 const rating = ratingBtn.dataset.rating;
  1448.                 const verified = document.getElementById('verified-filter')?.checked || false;
  1449.                 const search = document.getElementById('search-filter')?.value || '';
  1450.                 
  1451.                 const params = new URLSearchParams();
  1452.                 if (rating) params.append('rating', rating);
  1453.                 if (verified) params.append('verified', '1');
  1454.                 if (search) params.append('search', search);
  1455.                 
  1456.                 window.location.href = '{{ path(\"shop_reviews_index\", {\"slug\": shop.slug}) }}?' + params.toString();
  1457.             }
  1458.             function markAsHelpful(reviewId) {
  1459.                 fetch('{{ path(\"shop_reviews_helpful\", {\"slug\": shop.slug, \"id\": \"REVIEW_ID\"}) }}'.replace('REVIEW_ID', reviewId), {
  1460.                     method: 'POST',
  1461.                     headers: {
  1462.                         'X-Requested-With': 'XMLHttpRequest'
  1463.                     }
  1464.                 })
  1465.                 .then(response => response.json())
  1466.                 .then(data => {
  1467.                     if (data.success) {
  1468.                         location.reload();
  1469.                     } else {
  1470.                         alert(data.message || 'Une erreur est survenue');
  1471.                     }
  1472.                 })
  1473.                 .catch(error => {
  1474.                     console.error('Erreur:', error);
  1475.                     alert('Une erreur est survenue lors du vote');
  1476.                 });
  1477.             }
  1478.             function markAsNotHelpful(reviewId) {
  1479.                 fetch('{{ path(\"shop_reviews_not_helpful\", {\"slug\": shop.slug, \"id\": \"REVIEW_ID\"}) }}'.replace('REVIEW_ID', reviewId), {
  1480.                     method: 'POST',
  1481.                     headers: {
  1482.                         'X-Requested-With': 'XMLHttpRequest'
  1483.                     }
  1484.                 })
  1485.                 .then(response => response.json())
  1486.                 .then(data => {
  1487.                     if (data.success) {
  1488.                         location.reload();
  1489.                     } else {
  1490.                         alert(data.message || 'Une erreur est survenue');
  1491.                     }
  1492.                 })
  1493.                 .catch(error => {
  1494.                     console.error('Erreur:', error);
  1495.                     alert('Une erreur est survenue lors du vote');
  1496.                 });
  1497.             }
  1498.             // Exposer les fonctions globalement pour les boutons onclick
  1499.             window.applyFilters = applyFilters;
  1500.             window.markAsHelpful = markAsHelpful;
  1501.             window.markAsNotHelpful = markAsNotHelpful;
  1502.             // Gestion des boutons de filtre par note - scoped à la page reviews
  1503.             document.addEventListener('DOMContentLoaded', function() {
  1504.                 const reviewPage = document.querySelector('.shop-reviews-page');
  1505.                 if (!reviewPage) return;
  1506.                 
  1507.                 reviewPage.querySelectorAll('.rating-btn').forEach(btn => {
  1508.                     btn.addEventListener('click', function() {
  1509.                         reviewPage.querySelectorAll('.rating-btn').forEach(b => b.classList.remove('active'));
  1510.                         this.classList.add('active');
  1511.                     });
  1512.                 });
  1513.             });
  1514.         })();
  1515.     </script>
  1516. {% endblock %}
  1517. ""shop/reviews/index.html.twig""/home/u540977899/domains/maketou-ht.com/public_html/templates/shop/reviews/index.html.twig");
  1518.     }
  1519. }