Files
symfony-k3s/templates/task/index.html.twig
T

42 lines
1.4 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% 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">‹</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">›</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>
{% if weather_forecast %}
{{ include('task/_weather_forecast.html.twig', {forecast: weather_forecast}) }}
{{ include('task/_task_composer.html.twig', {form: form}) }}
{% endif %}
{{ include('task/_task_recommendations.html.twig', {
tasks: tasks,
battery_level: battery_level,
battery_budget: battery_budget,
selected_date: selected_date
}) }}
</div>
{% endblock %}