47 lines
1.6 KiB
Twig
47 lines
1.6 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Tasks{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="container">
|
|
<div class="task-list-header">
|
|
<h1>Tasks</h1>
|
|
|
|
<nav class="day-picker" aria-label="Choose task day">
|
|
<a href="{{ path('app_task_index', {date: selected_date|date_modify('-1 day')|date('Y-m-d')}) }}" aria-label="Previous day"><span class="material-symbols-outlined">
|
|
chevron_backward
|
|
</span></a>
|
|
<div>
|
|
<strong>{{ selected_date|date('l, j F') }}</strong>
|
|
{% if selected_date|date('Y-m-d') != 'now'|date('Y-m-d') %}
|
|
<a href="{{ path('app_task_index') }}">Today</a>
|
|
{% endif %}
|
|
</div>
|
|
<a href="{{ path('app_task_index', {date: selected_date|date_modify('+1 day')|date('Y-m-d')}) }}" aria-label="Next day"><span class="material-symbols-outlined">
|
|
chevron_forward
|
|
</span></a>
|
|
</nav>
|
|
</div>
|
|
|
|
|
|
<button class="weather-location" type="button" data-weather-location data-location-url="{{ path('app_task_location') }}" data-location-token="{{ csrf_token('weather_location') }}">
|
|
<span class="material-symbols-outlined" aria-hidden="true">my_location</span>
|
|
{{ has_saved_location ? 'Update weather location' : 'Use my location for weather' }}
|
|
</button>
|
|
|
|
<p class="weather-location__status" data-weather-location-status aria-live="polite"></p>
|
|
{% if weather_forecast %}
|
|
{{ include('task/_weather_forecast.html.twig', {forecast: weather_forecast}) }}
|
|
{% endif %}
|
|
{{ include('task/_task_composer.html.twig', {form: form}) }}
|
|
|
|
{{ include('task/_task_recommendations.html.twig', {
|
|
tasks: tasks,
|
|
battery_level: battery_level,
|
|
battery_budget: battery_budget,
|
|
selected_date: selected_date
|
|
}) }}
|
|
|
|
</div>
|
|
{% endblock %}
|