modified: Dockerfile

new file:   pdf_export.py
	modified:   requirements.txt
	modified:   routes/journal_routes.py
	modified:   static/css/style.css
	modified:   templates/base.html
	modified:   templates/day.html
	new file:   templates/edit_future.html
	new file:   templates/edit_note.html
	modified:   templates/future.html
	modified:   templates/monat.html
	new file:   templates/report.html
	modified:   templates/week.html
This commit is contained in:
SimolZimol
2026-08-02 21:28:30 +02:00
parent 428dccc5b0
commit f973e67311
13 changed files with 751 additions and 0 deletions

117
templates/report.html Normal file
View File

@@ -0,0 +1,117 @@
{% extends "base.html" %}
{% block title %}Report-Generator Bullet Journal{% endblock %}
{% block content %}
<div class="page-head">
<div>
<h1>Report-Generator</h1>
<p class="muted">Erstelle dynamische Wochen-/Monatsberichte und exportiere sie als CSV oder PDF.</p>
</div>
</div>
<section class="card">
<h2>Filter</h2>
<form method="get" action="{{ url_for('journal.report') }}" class="report-form">
<div class="report-block">
<span class="report-block-title">Zeitraum</span>
<label>
<input type="radio" name="range" value="week"
{{ 'checked' if f.range_type == 'week' or f.range_type == '' else '' }}> Woche
</label>
<label class="grow"><input type="week" name="week" value="{{ f.week_value or current_week }}"></label>
<label>
<input type="radio" name="range" value="month"
{{ 'checked' if f.range_type == 'month' else '' }}> Monat
</label>
<label class="grow"><input type="month" name="month" value="{{ current_month }}"></label>
<label>
<input type="radio" name="range" value="custom"
{{ 'checked' if f.range_type == 'custom' else '' }}> Zeitraum
</label>
<label>Von <input type="date" name="from" value="{{ f.from_value or '' }}"></label>
<label>Bis <input type="date" name="to" value="{{ f.to_value or '' }}"></label>
</div>
<div class="report-block">
<span class="report-block-title">Wochentage</span>
{% for i in range(7) %}
<label class="chk">
<input type="checkbox" name="wd" value="{{ i }}"
{{ 'checked' if i in f.weekdays else '' }}> {{ weekdays[i][:2] }}
</label>
{% endfor %}
</div>
<div class="report-block">
<span class="report-block-title">Bullet-Typen</span>
{% for b, label in bullet_labels.items() %}
<label class="chk">
<input type="checkbox" name="bullet" value="{{ b }}"
{{ 'checked' if b in f.bullets else '' }}> {{ b }} {{ label }}
</label>
{% endfor %}
</div>
<div class="report-block">
<span class="report-block-title">Status</span>
<label class="chk"><input type="checkbox" name="status" value="open"
{{ 'checked' if 'open' in f.statuses else '' }}> Offen</label>
<label class="chk"><input type="checkbox" name="status" value="done"
{{ 'checked' if 'done' in f.statuses else '' }}> Erledigt</label>
<label class="chk"><input type="checkbox" name="status" value="moved"
{{ 'checked' if 'moved' in f.statuses else '' }}> Verschoben</label>
</div>
<div class="report-block">
<span class="report-block-title">Priorität</span>
<label class="chk"><input type="checkbox" name="priority" value="0"
{{ 'checked' if 0 in f.priorities else '' }}> Niedrig</label>
<label class="chk"><input type="checkbox" name="priority" value="1"
{{ 'checked' if 1 in f.priorities else '' }}> Mittel</label>
<label class="chk"><input type="checkbox" name="priority" value="2"
{{ 'checked' if 2 in f.priorities else '' }}> Hoch</label>
</div>
<div class="report-actions">
<button type="submit" class="btn btn-primary">Vorschau anzeigen</button>
</div>
</form>
</section>
<section class="card">
<div class="day-head">
<h2>Vorschau: {{ f.label }}</h2>
<div class="report-exports">
<a class="btn btn-small" href="{{ export_csv_url }}">⬇ CSV exportieren</a>
<a class="btn btn-small" href="{{ export_pdf_url }}">⬇ PDF exportieren</a>
</div>
</div>
<div class="day-head-stats">
<span class="pill open">{{ summary.open }} offen</span>
<span class="pill done">{{ summary.done }} erledigt</span>
<span class="pill">{{ summary.total }} gesamt</span>
</div>
{% if rows %}
<table class="table">
<thead>
<tr><th>Datum</th><th>Wochentag</th><th>Bullet</th><th>Notiz</th><th>Priorität</th><th>Status</th><th>Verweise</th></tr>
</thead>
<tbody>
{% for r in rows %}
<tr>
<td>{{ r.date_str }}</td>
<td>{{ r.weekday }}</td>
<td>{{ r.bullet }} {{ r.bullet_label }}</td>
<td>{{ r.note_text|linkify }}</td>
<td>{{ r.priority }}</td>
<td>{{ r.status }}</td>
<td>{% if r.refs %}<span class="refs">{{ r.refs }}</span>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="muted">Keine Einträge für die gewählten Filter.</p>
{% endif %}
</section>
{% endblock %}