<?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;
/* front/accommodation/blocks/sidebar-1.html.twig */
class __TwigTemplate_81bdc97e144d8c04b889f8b30615134f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/accommodation/blocks/sidebar-1.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/accommodation/blocks/sidebar-1.html.twig"));
// line 2
$macros["macro"] = $this->macros["macro"] = $this->loadTemplate("front/_shared/macros.html.twig", "front/accommodation/blocks/sidebar-1.html.twig", 2)->unwrap();
// line 3
echo "
<div class=\"accommodation-sidebar rooms-mini\">
<h2>Toutes <span>les chambres</span></h2>
";
// line 8
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["accommodation"]) || array_key_exists("accommodation", $context) ? $context["accommodation"] : (function () { throw new RuntimeError('Variable "accommodation" does not exist.', 8, $this->source); })()), "activeRooms", [], "any", false, false, false, 8));
foreach ($context['_seq'] as $context["_key"] => $context["room"]) {
// line 9
echo " ";
$context["availabilityDate"] = twig_get_attribute($this->env, $this->source, $context["room"], "availablilityDate", [], "any", false, false, false, 9);
// line 10
echo " <div class=\"room row\">
<div class=\"col-12 col-lg-4 images\">
<div class=\"owl-carousel carousel-homes\" data-controller=\"carousel\" data-type=\"homes\">
";
// line 13
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["room"], "images", [], "any", false, false, false, 13));
foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
// line 14
echo " <div class=\"illu\">
<img src=\"";
// line 15
echo twig_escape_filter($this->env, $this->env->getRuntime('Liip\ImagineBundle\Templating\LazyFilterRuntime')->filter($context["image"], "room_slider"), "html", null, true);
echo "\" alt=\"\">
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
echo " </div>
";
// line 19
if (twig_get_attribute($this->env, $this->source, $context["room"], "available", [], "any", false, false, false, 19)) {
// line 20
echo " <div class=\"available\">
<div class=\"text-ctn\">";
// line 21
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.room_available", [], "front"), "html", null, true);
echo "</div>
<img src=\"";
// line 22
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/icons/triangle-darkgreen.png"), "html", null, true);
echo "\">
</div>
";
} else {
// line 25
echo " <div class=\"occupied\">
";
// line 26
if ( !(null === (isset($context["availabilityDate"]) || array_key_exists("availabilityDate", $context) ? $context["availabilityDate"] : (function () { throw new RuntimeError('Variable "availabilityDate" does not exist.', 26, $this->source); })()))) {
// line 27
echo " <div class=\"text-ctn\">";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.available_from", ["date" => $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, (isset($context["availabilityDate"]) || array_key_exists("availabilityDate", $context) ? $context["availabilityDate"] : (function () { throw new RuntimeError('Variable "availabilityDate" does not exist.', 27, $this->source); })()), "short", "none")], "front");
echo "</div>
";
} else {
// line 29
echo " <div class=\"text-ctn\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.room_not_available", [], "front"), "html", null, true);
echo "</div>
";
}
// line 31
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/icons/triangle-darkgreen.png"), "html", null, true);
echo "\">
</div>
";
}
// line 34
echo "
</div> <!-- images-->
<div class=\"col-12 col-lg-8 infos\">
<h3>";
// line 37
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["room"], "name", [], "any", false, false, false, 37), "html", null, true);
echo "</h3>
<p class=\"price\">";
// line 38
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\FrontRuntime')->currency($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(twig_get_attribute($this->env, $this->source, $context["room"], "rent", [], "any", false, false, false, 38), "EUR")), "html", null, true);
echo " <small>/ ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.month", [], "front"), "html", null, true);
echo "*</p>
<p class=\"notice\">";
// line 39
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.maxHousingAssistance", [], "front"), "html", null, true);
echo " <span>-";
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\FrontRuntime')->currency($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(twig_get_attribute($this->env, $this->source, $context["room"], "maxHousingAssistance", [], "any", false, false, false, 39), "EUR")), "html", null, true);
echo "</span></p>
<p class=\"notice\">";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.charges", [], "front"), "html", null, true);
echo " <span>+";
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\FrontRuntime')->currency($this->extensions['Twig\Extra\Intl\IntlExtension']->formatCurrency(twig_get_attribute($this->env, $this->source, $context["room"], "chargesFees", [], "any", false, false, false, 40), "EUR")), "html", null, true);
echo "</span></p>
<a href=\"#room-";
// line 41
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["room"], "id", [], "any", false, false, false, 41), "html", null, true);
echo "\" class=\"btn btn-primary btn-sm\">Voir la chambre</a>
</div> <!-- infos-->
</div> <!-- room -->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['room'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
echo "
<div class=\"btn-contact-room-container\">
<a href=\"";
// line 48
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_page_contact_room", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["accommodation"]) || array_key_exists("accommodation", $context) ? $context["accommodation"] : (function () { throw new RuntimeError('Variable "accommodation" does not exist.', 48, $this->source); })()), "id", [], "any", false, false, false, 48)]), "html", null, true);
echo "\" class=\"btn btn-outline-dark btn-contact-room\">SE METTRE SUR LISTE D'ATTENTE</a>
</div>
</div> <!-- rooms mini -->";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "front/accommodation/blocks/sidebar-1.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 164 => 48, 160 => 46, 149 => 41, 143 => 40, 137 => 39, 131 => 38, 127 => 37, 122 => 34, 115 => 31, 109 => 29, 103 => 27, 101 => 26, 98 => 25, 92 => 22, 88 => 21, 85 => 20, 83 => 19, 80 => 18, 71 => 15, 68 => 14, 64 => 13, 59 => 10, 56 => 9, 52 => 8, 45 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{% trans_default_domain 'front' %}
{% import \"front/_shared/macros.html.twig\" as macro %}
<div class=\"accommodation-sidebar rooms-mini\">
<h2>Toutes <span>les chambres</span></h2>
{% for room in accommodation.activeRooms %}
{% set availabilityDate = room.availablilityDate %}
<div class=\"room row\">
<div class=\"col-12 col-lg-4 images\">
<div class=\"owl-carousel carousel-homes\" data-controller=\"carousel\" data-type=\"homes\">
{% for image in room.images %}
<div class=\"illu\">
<img src=\"{{ image | imagine_filter('room_slider') }}\" alt=\"\">
</div>
{% endfor %}
</div>
{% if room.available %}
<div class=\"available\">
<div class=\"text-ctn\">{{ 'label.room_available'|trans }}</div>
<img src=\"{{ asset('build/images/icons/triangle-darkgreen.png') }}\">
</div>
{% else %}
<div class=\"occupied\">
{% if availabilityDate is not null %}
<div class=\"text-ctn\">{{ 'label.available_from'|trans({date: availabilityDate|format_datetime('short', 'none')})|raw }}</div>
{% else %}
<div class=\"text-ctn\">{{ 'label.room_not_available'|trans }}</div>
{% endif %}
<img src=\"{{ asset('build/images/icons/triangle-darkgreen.png') }}\">
</div>
{% endif %}
</div> <!-- images-->
<div class=\"col-12 col-lg-8 infos\">
<h3>{{ room.name }}</h3>
<p class=\"price\">{{ room.rent|format_currency('EUR')|currency }} <small>/ {{ 'label.month'|trans }}*</p>
<p class=\"notice\">{{ 'label.maxHousingAssistance'|trans }} <span>-{{ room.maxHousingAssistance|format_currency('EUR')|currency }}</span></p>
<p class=\"notice\">{{ 'label.charges'|trans }} <span>+{{ room.chargesFees|format_currency('EUR')|currency }}</span></p>
<a href=\"#room-{{ room.id }}\" class=\"btn btn-primary btn-sm\">Voir la chambre</a>
</div> <!-- infos-->
</div> <!-- room -->
{% endfor %}
<div class=\"btn-contact-room-container\">
<a href=\"{{ path('front_page_contact_room', {id: accommodation.id}) }}\" class=\"btn btn-outline-dark btn-contact-room\">SE METTRE SUR LISTE D'ATTENTE</a>
</div>
</div> <!-- rooms mini -->", "front/accommodation/blocks/sidebar-1.html.twig", "/var/www/vps.citizens.fr/templates/front/accommodation/blocks/sidebar-1.html.twig");
}
}