{% extends 'center.html.twig' %}
{% block title %}
{{ 'title.cinema'|trans }} | {{ parent() }}
{% endblock %}
{% block page %}
<section class="overflow-hidden py-10 py-xl-10">
<div class="container">
<div class="row align-items-end mb-10 mt-5">
<div class="col-lg-4 col-md-12 pb-2">
<h1 class="py-0">{{ 'title.cinema'|trans }}</h1>
<a href="tel:{{ cinema.address.phone }}"><i class="bi bi-phone"></i> {{ cinema.address.phone }}</a>
</div>
<div class="col-lg-8 col-md-12">
<div class="btn-group">
{% set start = today|date('Y-m-d') %}
{% set eachday = '' %}
{% set lastInLoop = '' %}
{% for i in range(0,7) %}
{% set eachday = start|date_modify("+" ~ i ~ "day") %}
<a
class="btn btn-sm {% if eachday|date('Y-m-d') is same as selected|date('Y-m-d') %}btn-primary{% else %}btn-success{% endif %}"
href="{{ path('app_city_cinema_date', {'date':eachday|date('Y-m-d'), 'city':city }) }}">
{{ eachday|date('d.m.') }}<br>
{% set shortName = 'day.short.'~eachday|date('N') %}
<small>{{ shortName|trans }}</small>
</a>
{% endfor %}
</div>
</div>
</div>
<div class="row align-items-end mb-10 mt-5">
<div class="col-lg-12">
<table class="table table-responsive">
<tr>
<th>{{ 'title.movie_name'|trans }}</th>
<th></th>
<th></th>
<th>{{ 'title.movie_time'|trans }}</th>
</tr>
{% for movie in movies %}
<tr>
<td><a href="{{ cinema.cinemaFeed }}{{ movie.programId }}" class="link-primary"
title="{{ 'action.buy_ticket'|trans }}" target="_blank">{{ movie.name }}</a></td>
<td>{{ movie.room }}</td>
<td>{{ movie.type }}</td>
<td>{{ movie.previewDate|date('H:i') }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</section>
{% endblock %}