sterntours/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig
Kevin Adametz 54fc46ace4 Optimierung Darstellungen, kleine Bugs,
SS-Sudan twig im Content
2019-07-09 14:29:58 +02:00

57 lines
No EOL
2.7 KiB
Twig

<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 %}
&nbsp;
{% 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>