first commit
This commit is contained in:
66
app/templates/tasks/calendar.html
Normal file
66
app/templates/tasks/calendar.html
Normal file
@@ -0,0 +1,66 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "partials/macros.html" import status_badge %}
|
||||
{% block title %}Kalender · Putzliga{% endblock %}
|
||||
{% block page_title %}Kalender & Liste{% endblock %}
|
||||
{% block content %}
|
||||
<section class="panel panel--toolbar">
|
||||
<div>
|
||||
<p class="eyebrow">Monatsansicht</p>
|
||||
<h2>{{ current_label }}</h2>
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
<a class="button button--secondary" href="{{ url_for('tasks.calendar_view', year=current_year if current_month > 1 else current_year - 1, month=current_month - 1 if current_month > 1 else 12, view=view) }}">Zurück</a>
|
||||
<a class="button button--secondary" href="{{ url_for('tasks.calendar_view', year=current_year if current_month < 12 else current_year + 1, month=current_month + 1 if current_month < 12 else 1, view=view) }}">Weiter</a>
|
||||
<div class="segmented">
|
||||
<a href="{{ url_for('tasks.calendar_view', year=current_year, month=current_month, view='calendar') }}" class="{% if view == 'calendar' %}is-active{% endif %}">Kalender</a>
|
||||
<a href="{{ url_for('tasks.calendar_view', year=current_year, month=current_month, view='list') }}" class="{% if view == 'list' %}is-active{% endif %}">Liste</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% if view == 'calendar' %}
|
||||
<section class="calendar-grid">
|
||||
<div class="calendar-grid__weekdays">
|
||||
{% for label in ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] %}
|
||||
<span>{{ label }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% for week in month_calendar %}
|
||||
{% for day in week %}
|
||||
<article class="calendar-day {% if day == 0 %}calendar-day--empty{% endif %}">
|
||||
{% if day != 0 %}
|
||||
<strong>{{ day }}</strong>
|
||||
<div class="calendar-day__tasks">
|
||||
{% for task in tasks_by_day.get(day, []) %}
|
||||
<a href="{{ url_for('tasks.edit', task_id=task.id) }}" class="calendar-task calendar-task--{{ task.status }}">
|
||||
<span>{{ task.title }}</span>
|
||||
<small>{{ task.points_awarded }} P</small>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% else %}
|
||||
<section class="stack">
|
||||
{% for task in tasks %}
|
||||
<article class="panel list-row">
|
||||
<div>
|
||||
<strong>{{ task.title }}</strong>
|
||||
<p class="muted">{{ task.description or 'Ohne Zusatzbeschreibung' }}</p>
|
||||
</div>
|
||||
<div class="list-row__meta">
|
||||
{{ status_badge(task) }}
|
||||
<span>{{ task.due_date|date_de }}</span>
|
||||
<a href="{{ url_for('tasks.edit', task_id=task.id) }}" class="text-link">Bearbeiten</a>
|
||||
</div>
|
||||
</article>
|
||||
{% else %}
|
||||
<div class="empty-state">In diesem Monat sind noch keine Aufgaben hinterlegt.</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user