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

36 lines
1.7 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Settings{% endblock %}
{% block body %}
<main class="container container-flex--narrow">
<p><a href="{{ path('app_task_index') }}">← Back to tasks</a></p>
<section class="settings-page" aria-labelledby="settings-title">
<h1 id="settings-title">Settings</h1>
<section class="settings-page__section" aria-labelledby="sick-day-title">
<h2 id="sick-day-title">Sick Day Mode</h2>
<p>Non-essential tasks are deferred until recovery. Tasks marked “Required on sick days” remain available.</p>
{{ form_start(form) }}
{{ form_row(form.sickModeEnabled) }}
{{ form_row(form.sickUntil) }}
<button class="btn btn-primary" type="submit">Save settings</button>
{{ form_end(form) }}
{% if settings.isSickOn(today) %}
<p class="settings-page__status">Sick Day Mode is active{% if settings.sickUntil %} through {{ settings.sickUntil|date('j F') }}{% endif %}.</p>
{% elseif settings.sickModeEnabled and settings.sickUntil %}
<p class="settings-page__status">The saved recovery date has passed, so Sick Day Mode is no longer affecting tasks.</p>
{% endif %}
</section>
<section class="settings-page__section" aria-labelledby="weather-settings-title">
<h2 id="weather-settings-title">Weather location</h2>
<p>{{ settings.hasLocation ? 'Your saved location is used for weather-aware task suggestions.' : 'Set your weather location from the Tasks page.' }}</p>
</section>
</section>
</main>
{% endblock %}