269 lines
17 KiB
PHP
269 lines
17 KiB
PHP
<?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;
|
|
|
|
/* default/pages/cms/calendarLodgingProgram.html.twig */
|
|
class __TwigTemplate_38775b5c8dc2cf519f0dcc737844d139156561cd62bae124a7004fa6c9443a3f extends \Twig\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_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
|
|
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/pages/cms/calendarLodgingProgram.html.twig"));
|
|
|
|
// line 1
|
|
echo "<div class=\"row\">
|
|
";
|
|
// line 2
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["calendar"]) || array_key_exists("calendar", $context) ? $context["calendar"] : (function () { throw new RuntimeError('Variable "calendar" does not exist.', 2, $this->source); })()));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["calendar_month"]) {
|
|
// line 3
|
|
echo "
|
|
<div class=\"col-xs-12 col-sm-6\">
|
|
<table class=\"table calendar-table\" id=\"jump-";
|
|
// line 5
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "monthNumber", [], "array", false, false, false, 5), "html", null, true);
|
|
echo "-";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "year", [], "array", false, false, false, 5), "html", null, true);
|
|
echo "\">
|
|
<thead>
|
|
<tr>
|
|
<th colspan=\"7\">
|
|
";
|
|
// line 9
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "monthNumber", [], "array", false, false, false, 9), "html", null, true);
|
|
echo " ";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "monthName", [], "array", false, false, false, 9), "html", null, true);
|
|
echo " ";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "year", [], "array", false, false, false, 9), "html", null, true);
|
|
echo "
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Mo</th>
|
|
<th>Di</th>
|
|
<th>Mi</th>
|
|
<th>Do</th>
|
|
<th>Fr</th>
|
|
<th>Sa</th>
|
|
<th>So</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
";
|
|
// line 23
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = twig_ensure_traversable(range(0, 5));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["weekIndex"]) {
|
|
// line 24
|
|
echo " <tr>
|
|
";
|
|
// line 25
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = twig_ensure_traversable(range(0, 6));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["dayIndex"]) {
|
|
// line 26
|
|
echo " ";
|
|
// line 27
|
|
echo " ";
|
|
$context["dayState"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "data", [], "array", false, false, false, 27), (($context["weekIndex"] * 7) + $context["dayIndex"]), [], "array", false, false, false, 27);
|
|
// line 28
|
|
echo "
|
|
<td class=\"";
|
|
// line 29
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 29, $this->source); })()), "getCssClass", [], "any", false, false, false, 29), "html", null, true);
|
|
echo " ";
|
|
if (twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 29, $this->source); })()), "isBookable", [], "any", false, false, false, 29)) {
|
|
echo "active";
|
|
}
|
|
echo "\">
|
|
";
|
|
// line 30
|
|
if (twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 30, $this->source); })()), "isBookable", [], "any", false, false, false, 30)) {
|
|
// line 31
|
|
echo " ";
|
|
if (twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 31, $this->source); })()), "isPastDate", [], "any", false, false, false, 31)) {
|
|
// line 32
|
|
echo " <div><del style=\"color:#989898;\">";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 32, $this->source); })()), "day", [], "any", false, false, false, 32), "html", null, true);
|
|
echo "</del></div>
|
|
";
|
|
} else {
|
|
// line 34
|
|
echo " <a href=\"";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 34, $this->source); })()), "urlPath", [], "any", false, false, false, 34), "html", null, true);
|
|
echo "/buchen?pnr=";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 34, $this->source); })()), "price", [], "any", false, false, false, 34), "id", [], "any", false, false, false, 34), "html", null, true);
|
|
echo "&fd=";
|
|
echo (((twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 34, $this->source); })()), "day", [], "any", false, false, false, 34) < 10)) ? ("0") : (""));
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 34, $this->source); })()), "day", [], "any", false, false, false, 34), "html", null, true);
|
|
echo (((twig_get_attribute($this->env, $this->source, $context["calendar_month"], "monthNumber", [], "array", false, false, false, 34) < 10)) ? ("0") : (""));
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "monthNumber", [], "array", false, false, false, 34), "html", null, true);
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["calendar_month"], "year", [], "array", false, false, false, 34), "html", null, true);
|
|
echo "\"
|
|
rel=\"nofollow\" class=\"table-link\"
|
|
>
|
|
";
|
|
// line 37
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 37, $this->source); })()), "day", [], "any", false, false, false, 37), "html", null, true);
|
|
echo "
|
|
</a>
|
|
";
|
|
}
|
|
// line 40
|
|
echo " ";
|
|
} elseif ((twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 40, $this->source); })()), "day", [], "any", false, false, false, 40) == 0)) {
|
|
// line 41
|
|
echo "
|
|
";
|
|
} else {
|
|
// line 43
|
|
echo " ";
|
|
if (twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 43, $this->source); })()), "isPastDate", [], "any", false, false, false, 43)) {
|
|
// line 44
|
|
echo " <div><del style=\"color:#989898;\">";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 44, $this->source); })()), "day", [], "any", false, false, false, 44), "html", null, true);
|
|
echo "</del></div>
|
|
";
|
|
} else {
|
|
// line 46
|
|
echo " <div>";
|
|
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["dayState"]) || array_key_exists("dayState", $context) ? $context["dayState"] : (function () { throw new RuntimeError('Variable "dayState" does not exist.', 46, $this->source); })()), "day", [], "any", false, false, false, 46), "html", null, true);
|
|
echo "</div>
|
|
";
|
|
}
|
|
// line 48
|
|
echo " ";
|
|
}
|
|
// line 49
|
|
echo " </td>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['dayIndex'], $context['_parent'], $context['loop']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 51
|
|
echo " </tr>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['weekIndex'], $context['_parent'], $context['loop']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 53
|
|
echo " </tbody>
|
|
</table>
|
|
</div>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['calendar_month'], $context['_parent'], $context['loop']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 57
|
|
echo "</div>";
|
|
|
|
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
|
|
|
|
}
|
|
|
|
public function getTemplateName()
|
|
{
|
|
return "default/pages/cms/calendarLodgingProgram.html.twig";
|
|
}
|
|
|
|
public function isTraitable()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public function getDebugInfo()
|
|
{
|
|
return array ( 188 => 57, 179 => 53, 172 => 51, 165 => 49, 162 => 48, 156 => 46, 150 => 44, 147 => 43, 143 => 41, 140 => 40, 134 => 37, 119 => 34, 113 => 32, 110 => 31, 108 => 30, 100 => 29, 97 => 28, 94 => 27, 92 => 26, 88 => 25, 85 => 24, 81 => 23, 60 => 9, 51 => 5, 47 => 3, 43 => 2, 40 => 1,);
|
|
}
|
|
|
|
public function getSourceContext()
|
|
{
|
|
return new Source("<div class=\"row\">
|
|
{% for calendar_month in calendar %}
|
|
|
|
<div class=\"col-xs-12 col-sm-6\">
|
|
<table class=\"table calendar-table\" id=\"jump-{{ calendar_month['monthNumber'] }}-{{ calendar_month['year'] }}\">
|
|
<thead>
|
|
<tr>
|
|
<th colspan=\"7\">
|
|
{{ calendar_month['monthNumber'] }} {{ calendar_month['monthName'] }} {{ calendar_month['year'] }}
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Mo</th>
|
|
<th>Di</th>
|
|
<th>Mi</th>
|
|
<th>Do</th>
|
|
<th>Fr</th>
|
|
<th>Sa</th>
|
|
<th>So</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for weekIndex in 0..5 %}
|
|
<tr>
|
|
{% for dayIndex in 0..6 %}
|
|
{# @var dayState \\AppBundle\\Util\\CalendarDayState #}
|
|
{% set dayState = calendar_month['data'][(weekIndex * 7) + dayIndex] %}
|
|
|
|
<td class=\"{{ dayState.getCssClass }} {% if dayState.isBookable %}active{% endif %}\">
|
|
{% if dayState.isBookable %}
|
|
{% if dayState.isPastDate %}
|
|
<div><del style=\"color:#989898;\">{{ dayState.day }}</del></div>
|
|
{% else %}
|
|
<a href=\"{{ page.urlPath }}/buchen?pnr={{ dayState.price.id }}&fd={{ dayState.day < 10 ? '0':'' }}{{dayState.day}}{{ calendar_month['monthNumber'] < 10 ? '0':'' }}{{calendar_month['monthNumber']}}{{calendar_month['year']}}\"
|
|
rel=\"nofollow\" class=\"table-link\"
|
|
>
|
|
{{ dayState.day }}
|
|
</a>
|
|
{% endif %}
|
|
{% elseif dayState.day == 0 %}
|
|
|
|
{% else %}
|
|
{% if dayState.isPastDate %}
|
|
<div><del style=\"color:#989898;\">{{ dayState.day }}</del></div>
|
|
{% else %}
|
|
<div>{{ dayState.day }}</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endfor %}
|
|
</div>", "default/pages/cms/calendarLodgingProgram.html.twig", "/Users/kadmin/Websites/sterntours-3/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig");
|
|
}
|
|
}
|