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

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

{% block content %}
<h4>
  <a class="icon-link {{'disabled' if response.date == datetime.date.today() else ''}}"
     href="../tag/{{tag_util.create_tag('day', response.date, -1)}}">
    <i class="bi bi-arrow-left-square"></i>
  </a>
  <a class="icon-link"
     href="../../..">
    <i class="bi bi-arrow-up-square"></i>
  </a>
  <span>{{response.channel.name}} | {{format_date(response.date, DATE_FORMAT, locale=request.state.language)}}</span>
  <a class="icon-link"
     href="../tag/{{tag_util.create_tag('day', response.date, 1)}}">
    <i class="bi bi-arrow-right-square"></i>
  </a>
</h4>
<table class="table">
  <thead>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </thead>
  <tbody>
    {% for value in response.values %}
    <tr class="{{'table-success' if value.live else ''}}">
      <td>
        <span>{{value.start.strftime('%H:%M')}}</span>
        <span class="small ms-1">({{(value.end - value.start) | timedelta_format}})</span>
      </td>
      <td>{{value.label}}</td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}