<?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;
/* SaloonPreview/page.html.twig */
class __TwigTemplate_3bbb1cef8a52b53c15d78a368d33692e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'navbar' => [$this, 'block_navbar'],
'mainContainer' => [$this, 'block_mainContainer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "SaloonPreview/grid.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "SaloonPreview/page.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "SaloonPreview/page.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "SaloonPreview/page.html.twig"));
$this->parent = $this->loadTemplate("SaloonPreview/grid.html.twig", "SaloonPreview/page.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_navbar($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "navbar"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "navbar"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "navbar"));
// line 4
echo " ";
$this->displayParentBlock("navbar", $context, $blocks);
echo "
";
// line 5
$context["excludeRecommendationProfileIds"] = [];
// line 6
echo " ";
$this->loadTemplate("Recommendations/_profile_recommendations.html.twig", "SaloonPreview/page.html.twig", 6)->display($context);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
// line 9
public function block_mainContainer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 10
echo " <h5 alt=\"";
((twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 10, $this->source); })()), "seo", [], "any", false, false, false, 10)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 10, $this->source); })()), "seo", [], "any", false, false, false, 10), "phone", [], "any", false, false, false, 10), "html", null, true))) : (print ("")));
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 10, $this->source); })()), "name", [], "any", false, false, false, 10)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["rating"]) || array_key_exists("rating", $context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.', 10, $this->source); })()), "html", null, true);
echo "★
";
// line 11
if (twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 11, $this->source); })()), "active", [], "any", false, false, false, 11)) {
// line 12
echo " <small><a href=\"tel:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 12, $this->source); })()), "phoneNumber", [], "any", false, false, false, 12), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 12, $this->source); })()), "phoneNumber", [], "any", false, false, false, 12), "html", null, true);
echo "</a></small>
";
}
// line 14
echo " </h5>
<p>";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 16, $this->source); })()), "address", [], "any", false, false, false, 16)), "html", null, true);
echo "</p>
<dl>
<dt>";
// line 18
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Город", [], "messages");
echo "</dt>
<dd>";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 19, $this->source); })()), "city", [], "any", false, false, false, 19), "name", [], "any", false, false, false, 19)), "html", null, true);
echo "</dd>
<dt>";
// line 20
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Метро", [], "messages");
echo "</dt>
<dd>
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 23, $this->source); })()), "stationsSortedByPrimary", [], "any", false, false, false, 23));
$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["station"]) {
// line 24
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 24)) {
echo "<strong>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["station"], "name", [], "any", false, false, false, 24)), "html", null, true);
echo " *</strong>
";
} else {
// line 25
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["station"], "name", [], "any", false, false, false, 25)), "html", null, true);
}
echo "<br/>
";
++$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['station'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 27
echo " </dd>
<dt>";
// line 28
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Район", [], "messages");
echo "</dt>
<dd>
";
// line 30
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 30, $this->source); })()), "stationsSortedByPrimary", [], "any", false, false, false, 30));
foreach ($context['_seq'] as $context["_key"] => $context["station"]) {
// line 31
echo " ";
$context["stationDistrict"] = twig_get_attribute($this->env, $this->source, $context["station"], "district", [], "any", false, false, false, 31);
// line 32
echo " ";
if ((isset($context["stationDistrict"]) || array_key_exists("stationDistrict", $context) ? $context["stationDistrict"] : (function () { throw new RuntimeError('Variable "stationDistrict" does not exist.', 32, $this->source); })())) {
// line 33
echo " ";
$context["districtCounty"] = twig_get_attribute($this->env, $this->source, (isset($context["stationDistrict"]) || array_key_exists("stationDistrict", $context) ? $context["stationDistrict"] : (function () { throw new RuntimeError('Variable "stationDistrict" does not exist.', 33, $this->source); })()), "county", [], "any", false, false, false, 33);
// line 34
echo " ";
if ((isset($context["districtCounty"]) || array_key_exists("districtCounty", $context) ? $context["districtCounty"] : (function () { throw new RuntimeError('Variable "districtCounty" does not exist.', 34, $this->source); })())) {
// line 35
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["districtCounty"]) || array_key_exists("districtCounty", $context) ? $context["districtCounty"] : (function () { throw new RuntimeError('Variable "districtCounty" does not exist.', 35, $this->source); })()), "name", [], "any", false, false, false, 35)), "html", null, true);
echo "
";
}
// line 37
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["stationDistrict"]) || array_key_exists("stationDistrict", $context) ? $context["stationDistrict"] : (function () { throw new RuntimeError('Variable "stationDistrict" does not exist.', 37, $this->source); })()), "name", [], "any", false, false, false, 37)), "html", null, true);
echo "<br/>
";
}
// line 39
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['station'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
echo " </dd>
";
// line 41
if (((((twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 41, $this->source); })()), "active", [], "any", false, false, false, 41) && $this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extended_profile_form")) && twig_get_attribute($this->env, $this->source, // line 43
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 43, $this->source); })()), "messengers", [], "any", false, false, false, 43)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 44
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 44, $this->source); })()), "messengers", [], "any", false, false, false, 44), "hasTelegram", [], "any", false, false, false, 44)) && !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 45
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 45, $this->source); })()), "messengers", [], "any", false, false, false, 45), "telegramUsername", [], "any", false, false, false, 45)))) {
// line 46
echo " <dt><strong>";
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Телеграм", [], "messages");
echo "</strong></dt>
<dd><a href=\"https://t.me/";
// line 47
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 47, $this->source); })()), "messengers", [], "any", false, false, false, 47), "telegramUsername", [], "any", false, false, false, 47), "html", null, true);
echo "\"
target=\"_blank\" rel=\"nofollow noopener\">
@";
// line 49
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 49, $this->source); })()), "messengers", [], "any", false, false, false, 49), "telegramUsername", [], "any", false, false, false, 49), "html", null, true);
echo "
</a></dd>
";
}
// line 52
echo " ";
if (((((twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 52, $this->source); })()), "active", [], "any", false, false, false, 52) && $this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extra_category_with_max")) && twig_get_attribute($this->env, $this->source, // line 54
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 54, $this->source); })()), "messengers", [], "any", false, false, false, 54)) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 55
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 55, $this->source); })()), "messengers", [], "any", false, false, false, 55), "hasMax", [], "any", false, false, false, 55)) && !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 56
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 56, $this->source); })()), "messengers", [], "any", false, false, false, 56), "maxUrl", [], "any", false, false, false, 56)))) {
// line 57
echo " <dt><strong>MAX</strong></dt>
<dd><a href=\"";
// line 58
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 58, $this->source); })()), "messengers", [], "any", false, false, false, 58), "maxUrl", [], "any", false, false, false, 58), "html", null, true);
echo "\"
target=\"_blank\" rel=\"nofollow noopener\">MAX</a></dd>
";
}
// line 61
echo " </dl>
<p>";
// line 62
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 62, $this->source); })()), "description", [], "any", false, false, false, 62)), "html", null, true);
echo "</p>
";
// line 64
if ($this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extended_profile_form")) {
// line 65
echo " <h6>";
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Предпочтения", [], "messages");
echo "</h6>
";
// line 66
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["services"]) || array_key_exists("services", $context) ? $context["services"] : (function () { throw new RuntimeError('Variable "services" does not exist.', 66, $this->source); })()));
foreach ($context['_seq'] as $context["group"] => $context["servicesGroup"]) {
// line 67
echo " <p><strong>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['App\Twig\ServicesExtension']->serviceGroupLabel($context["group"]), [], "service_groups"), "html", null, true);
echo "</strong></p>
<ul>
";
// line 69
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["servicesGroup"]);
foreach ($context['_seq'] as $context["_key"] => $context["service"]) {
// line 70
echo " ";
$context["providedService"] = twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 70, $this->source); })()), "providedService", [$context["service"]], "method", false, false, false, 70);
// line 71
echo " <li class=\"";
if ((isset($context["providedService"]) || array_key_exists("providedService", $context) ? $context["providedService"] : (function () { throw new RuntimeError('Variable "providedService" does not exist.', 71, $this->source); })())) {
echo "text-success";
} else {
echo "text-danger";
}
echo "\">
<a href=\"";
// line 72
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_provided_service", ["city" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 72, $this->source); })()), "city", [], "any", false, false, false, 72), "uriIdentity", [], "any", false, false, false, 72), "service" => twig_get_attribute($this->env, $this->source, $context["service"], "uriIdentity", [], "any", false, false, false, 72)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["service"], "name", [], "any", false, false, false, 72)), "html", null, true);
echo "</a>
</li>
";
// line 74
if ((isset($context["providedService"]) || array_key_exists("providedService", $context) ? $context["providedService"] : (function () { throw new RuntimeError('Variable "providedService" does not exist.', 74, $this->source); })())) {
// line 75
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['App\Twig\ServicesExtension']->providedServiceCondition(twig_get_attribute($this->env, $this->source, (isset($context["providedService"]) || array_key_exists("providedService", $context) ? $context["providedService"] : (function () { throw new RuntimeError('Variable "providedService" does not exist.', 75, $this->source); })()), "condition", [], "any", false, false, false, 75)), [], "service_conditions"), "html", null, true);
if ((twig_get_attribute($this->env, $this->source, (isset($context["providedService"]) || array_key_exists("providedService", $context) ? $context["providedService"] : (function () { throw new RuntimeError('Variable "providedService" does not exist.', 75, $this->source); })()), "condition", [], "any", false, false, false, 75) == 3)) {
echo ", цена:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["providedService"]) || array_key_exists("providedService", $context) ? $context["providedService"] : (function () { throw new RuntimeError('Variable "providedService" does not exist.', 75, $this->source); })()), "extraCharge", [], "any", false, false, false, 75), "html", null, true);
}
// line 76
echo " ";
}
// line 77
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['service'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 78
echo " </ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['group'], $context['servicesGroup'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 80
echo " ";
}
// line 81
echo "
";
// line 82
if ($this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extended_profile_form")) {
// line 83
echo " <div>
";
// line 84
if (twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 84, $this->source); })()), "expressPricing", [], "any", false, false, false, 84)) {
// line 85
echo " <b>Экспресс:</b>
";
// line 86
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 86, $this->source); })()), "expressPricing", [], "any", false, false, false, 86), "provided", [], "any", false, false, false, 86)) {
// line 87
echo " Да, стоимость";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 87, $this->source); })()), "expressPricing", [], "any", false, false, false, 87), "price", [], "any", false, false, false, 87), "html", null, true);
echo "
";
} else {
// line 89
echo " Нет
";
}
// line 91
echo " ";
}
// line 92
echo " </div>
<div>
";
// line 95
if (twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 95, $this->source); })()), "clientTypes", [], "any", false, false, false, 95)) {
// line 96
echo " <b>Услуги для:</b>
";
// line 97
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 97, $this->source); })()), "clientTypes", [], "any", false, false, false, 97));
foreach ($context['_seq'] as $context["_key"] => $context["clientType"]) {
// line 98
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['App\Twig\ClientTypeExtension']->clientType($context["clientType"]), [], "client_types"), "html", null, true);
echo "<br>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['clientType'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 100
echo " ";
}
// line 101
echo " </div>
<div>
";
// line 104
if (twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 104, $this->source); })()), "messengers", [], "any", false, false, false, 104)) {
// line 105
echo " <b>Мессенджеры</b><br>
<b>Telegram</b> ";
// line 106
echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 106, $this->source); })()), "messengers", [], "any", false, false, false, 106), "telegram", [], "any", false, false, false, 106)) ? ("Да") : ("Нет"));
echo "
<b>WhatsApp</b> ";
// line 107
echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 107, $this->source); })()), "messengers", [], "any", false, false, false, 107), "whatsApp", [], "any", false, false, false, 107)) ? ("Да") : ("Нет"));
echo "
";
// line 108
if ($this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extra_category_with_max")) {
// line 109
echo " <b>MAX</b> ";
echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 109, $this->source); })()), "messengers", [], "any", false, false, false, 109), "max", [], "any", false, false, false, 109)) ? ("Да") : ("Нет"));
echo "
";
}
// line 111
echo " ";
}
// line 112
echo " </div>
";
}
// line 114
echo "
<div>
<b>Отвечаю на:</b>
";
// line 117
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 117, $this->source); })()), "phoneCallRestrictions", [], "any", false, false, false, 117), "answeringTo", [], "any", false, false, false, 117));
foreach ($context['_seq'] as $context["_key"] => $context["answeringTo"]) {
// line 118
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['App\Twig\PhoneCallExtension']->answeringTo($context["answeringTo"]), [], "phone_call_restrictions"), "html", null, true);
echo "<br>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['answeringTo'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 120
echo " </div>
";
// line 122
if ( !twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 122, $this->source); })()), "deleted", [], "any", false, false, false, 122)) {
// line 123
echo " <img src=\"";
((twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 123, $this->source); })()), "thumbnail", [], "any", false, false, false, 123)) ? (print (twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 123, $this->source); })()), "thumbnail", [], "any", false, false, false, 123), "path", [], "any", false, false, false, 123), "saloon_media_thumb"), "html", null, true))) : (print ("")));
echo "\" width=\"100\"
alt=\"";
// line 124
((twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 124, $this->source); })()), "seo", [], "any", false, false, false, 124)) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 124, $this->source); })()), "seo", [], "any", false, false, false, 124), "phone", [], "any", false, false, false, 124), "html", null, true))) : (print ("")));
echo "\"/>
";
// line 125
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 125, $this->source); })()), "photos", [], "any", false, false, false, 125));
foreach ($context['_seq'] as $context["_key"] => $context["photo"]) {
// line 126
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, $context["photo"], "path", [], "any", false, false, false, 126), "saloon_media"), "html", null, true);
echo "\"/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['photo'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 128
echo "
";
// line 129
if ($this->extensions['Flagception\Bundle\FlagceptionBundle\Twig\ToggleExtension']->isActive("extended_profile_form")) {
// line 130
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 130, $this->source); })()), "videos", [], "any", false, false, false, 130));
foreach ($context['_seq'] as $context["_key"] => $context["video"]) {
// line 131
echo " <video width=\"320\" height=\"240\" controls
poster=\"";
// line 132
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ResponsiveAssetExtension']->getResponsiveImageUrl(twig_get_attribute($this->env, $this->source, $context["video"], "previewPath", [], "any", false, false, false, 132), "saloon_media_video", "fullsize", "jpg"), "html", null, true);
echo "\">
<source src=\"";
// line 133
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, $context["video"], "path", [], "any", false, false, false, 133), "saloon_media_video"), "html", null, true);
echo "\">
</video>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['video'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 136
echo " ";
}
// line 137
echo " ";
} else {
// line 138
echo " Фото-заглушка
";
}
// line 140
echo "
";
// line 141
$this->loadTemplate("SaloonPreview/_profiles.html.twig", "SaloonPreview/page.html.twig", 141)->display(twig_array_merge($context, ["saloon" => // line 142
(isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 142, $this->source); })()), "profiles" => // line 143
(isset($context["saloon_profiles"]) || array_key_exists("saloon_profiles", $context) ? $context["saloon_profiles"] : (function () { throw new RuntimeError('Variable "saloon_profiles" does not exist.', 143, $this->source); })()), "total_count" => // line 144
(isset($context["saloon_profiles_total_count"]) || array_key_exists("saloon_profiles_total_count", $context) ? $context["saloon_profiles_total_count"] : (function () { throw new RuntimeError('Variable "saloon_profiles_total_count" does not exist.', 144, $this->source); })()), "per_page" => // line 145
(isset($context["saloon_profiles_per_page"]) || array_key_exists("saloon_profiles_per_page", $context) ? $context["saloon_profiles_per_page"] : (function () { throw new RuntimeError('Variable "saloon_profiles_per_page" does not exist.', 145, $this->source); })()), "rotation_offset" => // line 146
(isset($context["saloon_profiles_rotation_offset"]) || array_key_exists("saloon_profiles_rotation_offset", $context) ? $context["saloon_profiles_rotation_offset"] : (function () { throw new RuntimeError('Variable "saloon_profiles_rotation_offset" does not exist.', 146, $this->source); })())]));
// line 148
echo "
<h6>";
// line 149
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Отзывы", [], "messages");
echo "</h6>
<div id=\"comments\">
";
// line 151
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 151, $this->source); })()), "comments", [], "any", false, false, false, 151));
$context['_iterated'] = false;
$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["comment"]) {
// line 152
echo " ";
$this->loadTemplate("SaloonPreview/comment.html.twig", "SaloonPreview/page.html.twig", 152)->display($context);
// line 153
echo " ";
$context['_iterated'] = true;
++$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'];
}
}
if (!$context['_iterated']) {
// line 154
echo " <p>";
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Отзывов нет", [], "messages");
echo "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 156
echo " </div>
<div id=\"commentFormContainer\">
</div>
<div id=\"recaptcha-container\"></div>
<script type=\"text/javascript\">
var onloadCallback = function () {
grecaptcha.render('recaptcha-container', {
'sitekey': '";
// line 166
echo twig_escape_filter($this->env, (isset($context["ewz_recaptcha_site_key"]) || array_key_exists("ewz_recaptcha_site_key", $context) ? $context["ewz_recaptcha_site_key"] : (function () { throw new RuntimeError('Variable "ewz_recaptcha_site_key" does not exist.', 166, $this->source); })()), "html", null, true);
echo "'
});
};
</script>
<script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
<script src=\"";
// line 171
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("ajax.js", "js_script"), "html", null, true);
echo "\"></script>
<script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function () {
ajax({
url: '";
// line 175
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("saloon.comment.comment_form", ["saloon" => twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 175, $this->source); })()), "id", [], "any", false, false, false, 175)]), "html", null, true);
echo "',
callback: function (response) {
// console.log(response);
if ('' !== response) {
document.querySelector('#commentFormContainer').innerHTML = response;
setCommentFormListeners();
}
},
dataType: 'json',
responseType: 'text/html',
});
function setCommentFormListeners() {
const formName = 'comment_form';
";
// line 190
echo " document.querySelector('#send_comment').addEventListener('click', function () {
ajax({
url: '";
// line 192
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("saloon.comment.create", ["saloon" => twig_get_attribute($this->env, $this->source, (isset($context["saloon"]) || array_key_exists("saloon", $context) ? $context["saloon"] : (function () { throw new RuntimeError('Variable "saloon" does not exist.', 192, $this->source); })()), "id", [], "any", false, false, false, 192)]), "html", null, true);
echo "',
method: '',
data: {
'g-recaptcha-response': grecaptcha.getResponse(),
'entity_id': document.querySelector(`#\${formName}_entity_id`).value,
'mark': document.querySelector(`input[name=\"\${formName}[mark]\"]:checked`).value,
'text': document.querySelector(`#\${formName}_text`).value,
},
callback: function (response) {
if (response) {
if (response.success) {
//document.querySelector(`#{formName}`).style.display = 'none';
//document.querySelector('#send_comment').style.display = 'none';
document.querySelector(`form[name=\"\${formName}\"]`).reset();
grecaptcha.reset();
let template =
'<div>' +
(response.comment.nickname ?
'<span class=\"author\">' +
'<img src=\"#avatar\" alt=\"shift\" width=\"25\">' +
'<span class=\"name\">#nickname</span>' +
'</span>' : '') +
'<span class=\"date\">#createdAt</span>' +
'<span>#text</span>' +
'</div>'
;
response.comment.createdAt = new Date(response.comment.createdAt * 1000);
for (let k in response.comment) {
template = template.replace('#' + k, response.comment[k]);
}
document.querySelector('#comments').innerHTML += template;
// console.log(template);
// document.querySelector('#comments').innerHTML += response.html;
} else {
alert(response.error);
}
}
},
dataType: 'json',
responseType: 'json',
});
});
}
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "SaloonPreview/page.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 631 => 192, 627 => 190, 610 => 175, 603 => 171, 595 => 166, 583 => 156, 574 => 154, 561 => 153, 558 => 152, 540 => 151, 535 => 149, 532 => 148, 530 => 146, 529 => 145, 528 => 144, 527 => 143, 526 => 142, 525 => 141, 522 => 140, 518 => 138, 515 => 137, 512 => 136, 503 => 133, 499 => 132, 496 => 131, 491 => 130, 489 => 129, 486 => 128, 477 => 126, 473 => 125, 469 => 124, 464 => 123, 462 => 122, 458 => 120, 449 => 118, 445 => 117, 440 => 114, 436 => 112, 433 => 111, 427 => 109, 425 => 108, 421 => 107, 417 => 106, 414 => 105, 412 => 104, 407 => 101, 404 => 100, 395 => 98, 391 => 97, 388 => 96, 386 => 95, 381 => 92, 378 => 91, 374 => 89, 368 => 87, 366 => 86, 363 => 85, 361 => 84, 358 => 83, 356 => 82, 353 => 81, 350 => 80, 343 => 78, 337 => 77, 334 => 76, 327 => 75, 325 => 74, 318 => 72, 309 => 71, 306 => 70, 302 => 69, 296 => 67, 292 => 66, 287 => 65, 285 => 64, 280 => 62, 277 => 61, 271 => 58, 268 => 57, 266 => 56, 265 => 55, 264 => 54, 262 => 52, 256 => 49, 251 => 47, 246 => 46, 244 => 45, 243 => 44, 242 => 43, 241 => 41, 238 => 40, 232 => 39, 226 => 37, 220 => 35, 217 => 34, 214 => 33, 211 => 32, 208 => 31, 204 => 30, 199 => 28, 196 => 27, 179 => 25, 171 => 24, 154 => 23, 148 => 20, 144 => 19, 140 => 18, 135 => 16, 131 => 14, 123 => 12, 121 => 11, 112 => 10, 99 => 9, 85 => 6, 83 => 5, 78 => 4, 65 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'SaloonPreview/grid.html.twig' %}
{% block navbar %}
{{ parent() }}
{% set excludeRecommendationProfileIds = [] %}
{% include 'Recommendations/_profile_recommendations.html.twig' %}
{% endblock %}
{% block mainContainer %}
<h5 alt=\"{{ saloon.seo ? saloon.seo.phone : '' }}\">{{ saloon.name|trans }} {{ rating }}★
{% if saloon.active %}
<small><a href=\"tel:{{ saloon.phoneNumber }}\">{{ saloon.phoneNumber }}</a></small>
{% endif %}
</h5>
<p>{{ saloon.address|trans }}</p>
<dl>
<dt>{% trans %}Город{% endtrans %}</dt>
<dd>{{ saloon.city.name|trans }}</dd>
<dt>{% trans %}Метро{% endtrans %}</dt>
<dd>
{% for station in saloon.stationsSortedByPrimary %}
{% if loop.first %}<strong>{{ station.name|trans }} *</strong>
{% else %}{{ station.name|trans }}{% endif %}<br/>
{% endfor %}
</dd>
<dt>{% trans %}Район{% endtrans %}</dt>
<dd>
{% for station in saloon.stationsSortedByPrimary %}
{% set stationDistrict = station.district %}
{% if stationDistrict %}
{% set districtCounty = stationDistrict.county %}
{% if districtCounty %}
{{ districtCounty.name|trans }}
{% endif %}
{{ stationDistrict.name|trans }}<br/>
{% endif %}
{% endfor %}
</dd>
{% if saloon.active
and feature('extended_profile_form')
and saloon.messengers
and saloon.messengers.hasTelegram
and saloon.messengers.telegramUsername is not empty %}
<dt><strong>{% trans %}Телеграм{% endtrans %}</strong></dt>
<dd><a href=\"https://t.me/{{ saloon.messengers.telegramUsername }}\"
target=\"_blank\" rel=\"nofollow noopener\">
@{{ saloon.messengers.telegramUsername }}
</a></dd>
{% endif %}
{% if saloon.active
and feature('extra_category_with_max')
and saloon.messengers
and saloon.messengers.hasMax
and saloon.messengers.maxUrl is not empty %}
<dt><strong>MAX</strong></dt>
<dd><a href=\"{{ saloon.messengers.maxUrl }}\"
target=\"_blank\" rel=\"nofollow noopener\">MAX</a></dd>
{% endif %}
</dl>
<p>{{ saloon.description|trans }}</p>
{% if feature('extended_profile_form') %}
<h6>{% trans %}Предпочтения{% endtrans %}</h6>
{% for group, servicesGroup in services %}
<p><strong>{{ group|service_group|trans({}, 'service_groups') }}</strong></p>
<ul>
{% for service in servicesGroup %}
{% set providedService = saloon.providedService(service) %}
<li class=\"{% if providedService %}text-success{% else %}text-danger{% endif %}\">
<a href=\"{{ path('profile_list.list_by_provided_service', {'city': saloon.city.uriIdentity, 'service': service.uriIdentity}) }}\">{{ service.name|trans }}</a>
</li>
{% if providedService %}
{{ providedService.condition|provided_service_condition|trans({},'service_conditions') }}{% if providedService.condition == 3 %}, цена:{{ providedService.extraCharge }}{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endfor %}
{% endif %}
{% if feature('extended_profile_form') %}
<div>
{% if saloon.expressPricing %}
<b>Экспресс:</b>
{% if saloon.expressPricing.provided %}
Да, стоимость{{ saloon.expressPricing.price }}
{% else %}
Нет
{% endif %}
{% endif %}
</div>
<div>
{% if saloon.clientTypes %}
<b>Услуги для:</b>
{% for clientType in saloon.clientTypes %}
{{ clientType|client_type|trans({}, 'client_types') }}<br>
{% endfor %}
{% endif %}
</div>
<div>
{% if saloon.messengers %}
<b>Мессенджеры</b><br>
<b>Telegram</b> {{ saloon.messengers.telegram ? 'Да' : 'Нет' }}
<b>WhatsApp</b> {{ saloon.messengers.whatsApp ? 'Да' : 'Нет' }}
{% if feature('extra_category_with_max') %}
<b>MAX</b> {{ saloon.messengers.max ? 'Да' : 'Нет' }}
{% endif %}
{% endif %}
</div>
{% endif %}
<div>
<b>Отвечаю на:</b>
{% for answeringTo in saloon.phoneCallRestrictions.answeringTo %}
{{ answeringTo|answering_to|trans({}, 'phone_call_restrictions') }}<br>
{% endfor %}
</div>
{% if not saloon.deleted %}
<img src=\"{{ saloon.thumbnail ? asset(saloon.thumbnail.path, 'saloon_media_thumb') : '' }}\" width=\"100\"
alt=\"{{ saloon.seo ? saloon.seo.phone : '' }}\"/>
{% for photo in saloon.photos %}
<img src=\"{{ asset(photo.path, 'saloon_media') }}\"/>
{% endfor %}
{% if feature('extended_profile_form') %}
{% for video in saloon.videos %}
<video width=\"320\" height=\"240\" controls
poster=\"{{ responsive_asset(video.previewPath, 'saloon_media_video', \"fullsize\", \"jpg\") }}\">
<source src=\"{{ asset(video.path, 'saloon_media_video') }}\">
</video>
{% endfor %}
{% endif %}
{% else %}
Фото-заглушка
{% endif %}
{% include 'SaloonPreview/_profiles.html.twig' with {
saloon: saloon,
profiles: saloon_profiles,
total_count: saloon_profiles_total_count,
per_page: saloon_profiles_per_page,
rotation_offset: saloon_profiles_rotation_offset,
} %}
<h6>{% trans %}Отзывы{% endtrans %}</h6>
<div id=\"comments\">
{% for comment in saloon.comments %}
{% include 'SaloonPreview/comment.html.twig' %}
{% else %}
<p>{% trans %}Отзывов нет{% endtrans %}</p>
{% endfor %}
</div>
<div id=\"commentFormContainer\">
</div>
<div id=\"recaptcha-container\"></div>
<script type=\"text/javascript\">
var onloadCallback = function () {
grecaptcha.render('recaptcha-container', {
'sitekey': '{{ ewz_recaptcha_site_key }}'
});
};
</script>
<script src=\"https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit\" async defer></script>
<script src=\"{{ asset('ajax.js', 'js_script') }}\"></script>
<script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function () {
ajax({
url: '{{ path('saloon.comment.comment_form', {saloon: saloon.id}) }}',
callback: function (response) {
// console.log(response);
if ('' !== response) {
document.querySelector('#commentFormContainer').innerHTML = response;
setCommentFormListeners();
}
},
dataType: 'json',
responseType: 'text/html',
});
function setCommentFormListeners() {
const formName = 'comment_form';
{# console.log(document.querySelector('input[name=\"{{ comment_form.mark.vars.full_name }}\"]:checked').value); #}
document.querySelector('#send_comment').addEventListener('click', function () {
ajax({
url: '{{ path('saloon.comment.create', {saloon: saloon.id}) }}',
method: '',
data: {
'g-recaptcha-response': grecaptcha.getResponse(),
'entity_id': document.querySelector(`#\${formName}_entity_id`).value,
'mark': document.querySelector(`input[name=\"\${formName}[mark]\"]:checked`).value,
'text': document.querySelector(`#\${formName}_text`).value,
},
callback: function (response) {
if (response) {
if (response.success) {
//document.querySelector(`#{formName}`).style.display = 'none';
//document.querySelector('#send_comment').style.display = 'none';
document.querySelector(`form[name=\"\${formName}\"]`).reset();
grecaptcha.reset();
let template =
'<div>' +
(response.comment.nickname ?
'<span class=\"author\">' +
'<img src=\"#avatar\" alt=\"shift\" width=\"25\">' +
'<span class=\"name\">#nickname</span>' +
'</span>' : '') +
'<span class=\"date\">#createdAt</span>' +
'<span>#text</span>' +
'</div>'
;
response.comment.createdAt = new Date(response.comment.createdAt * 1000);
for (let k in response.comment) {
template = template.replace('#' + k, response.comment[k]);
}
document.querySelector('#comments').innerHTML += template;
// console.log(template);
// document.querySelector('#comments').innerHTML += response.html;
} else {
alert(response.error);
}
}
},
dataType: 'json',
responseType: 'json',
});
});
}
});
</script>
{% endblock %}
", "SaloonPreview/page.html.twig", "/app/templates/SaloonPreview/page.html.twig");
}
}