{% extends "base.html" %}
{% block title %}
{{_("TV program")}} | {{response.channel.name}} | {{format_date(response.date, 'E, d MMMM Y', locale=request.state.language)}}
{% endblock %}

{% block header %}
<app-link href="/schedule"
          icon="tv">{{_("TV program")}}</app-link>
{% endblock %}

{% block content %}
<h4>
  <a class="button {{'disabled' if response.date == datetime.date.today() else ''}}"
     href="../tag/{{tag_util.create_tag('day', response.date, -1)}}">⬅️</a>
  <a class="button"
     href="../..">⬆️</a>
  <span>{{response.channel.name}} | {{format_date(response.date, 'E, d MMMM Y', locale=request.state.language)}}</span>
  <a class="button"
     href="../tag/{{tag_util.create_tag('day', response.date, 1)}}">➡️</a>
</h4>
<table class="table">
  <thead>
    <tr>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </thead>
  <tbody>
    {% for value in response.values %}
    <tr class="{{'table-success' if value.live else ''}}">
      <td>{{value.start.strftime('%H:%M')}}</td>
      <td>{{(value.end - value.start) | timedelta_format}}</td>
      <td>{{value.label}}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}