sterntours/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig
Kevin Adametz 8b2ec705c9 06 Feb
2019-02-06 15:11:58 +01:00

53 lines
No EOL
2.4 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 %}
<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>
{% elseif dayState.day == 0 %}
&nbsp;
{% else %}
{% if dayState.isPastDate %}
<del style="color:#989898;">{{ dayState.day }}</del>
{% else %}
{{ dayState.day }}
{% endif %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</div>