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:
@@ -15,6 +15,7 @@
|
||||
<a href="{{ url_for('journal.index') }}">Dashboard</a>
|
||||
<a href="{{ url_for('journal.week') }}">Wochenübersicht</a>
|
||||
<a href="{{ url_for('journal.month') }}">Monatsübersicht</a>
|
||||
<a href="{{ url_for('journal.report') }}">Report</a>
|
||||
<a href="{{ url_for('journal.future') }}">Future Log</a>
|
||||
<a href="{{ url_for('journal.day', date_str=today_str) }}" class="nav-today">Heute</a>
|
||||
{% if session.get('is_admin') %}
|
||||
|
||||
@@ -106,6 +106,11 @@
|
||||
<button type="submit" class="btn btn-small btn-future" name="target" value="future">→ Future Log</button>
|
||||
</form>
|
||||
</span>
|
||||
<a href="{{ url_for('journal.edit_note', note_id=n.id) }}" class="btn btn-small">Bearbeiten</a>
|
||||
<form method="post" action="{{ url_for('journal.delete_note', note_id=n.id) }}" class="inline"
|
||||
onsubmit="return confirm('Diese Notiz wirklich löschen?');">
|
||||
<button class="btn btn-small btn-danger">Löschen</button>
|
||||
</form>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
26
templates/edit_future.html
Normal file
26
templates/edit_future.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Future-Log-Eintrag bearbeiten – Bullet Journal{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<div>
|
||||
<h1>Future-Log-Eintrag bearbeiten</h1>
|
||||
</div>
|
||||
<a href="{{ url_for('journal.future') }}" class="btn btn-small">← Zurück zum Future Log</a>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<form method="post" action="{{ url_for('journal.edit_future', entry_id=entry.id) }}" class="stack">
|
||||
<label>
|
||||
Monat
|
||||
<input type="month" name="month" value="{{ entry.month_date.strftime('%Y-%m') }}" required>
|
||||
</label>
|
||||
<label>
|
||||
Notiz
|
||||
<textarea name="note_text" rows="3" required>{{ entry.note_text }}</textarea>
|
||||
</label>
|
||||
<div class="report-actions">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
54
templates/edit_note.html
Normal file
54
templates/edit_note.html
Normal file
@@ -0,0 +1,54 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Notiz bearbeiten – Bullet Journal{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<div>
|
||||
<h1>Notiz bearbeiten</h1>
|
||||
<p class="muted">{{ note.note_date.strftime('%d.%m.%Y') }}</p>
|
||||
</div>
|
||||
<a href="{{ url_for('journal.day', date_str=note.note_date.strftime('%Y-%m-%d')) }}" class="btn btn-small">← Zurück zum Tag</a>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<form method="post" action="{{ url_for('journal.edit_note', note_id=note.id) }}" class="stack">
|
||||
<label>
|
||||
Bullet
|
||||
<select name="bullet">
|
||||
<option value="." {{ 'selected' if note.bullet_type == '.' else '' }}>• Aufgabe</option>
|
||||
<option value="x" {{ 'selected' if note.bullet_type == 'x' else '' }}>✕ Termin</option>
|
||||
<option value="-" {{ 'selected' if note.bullet_type == '-' else '' }}>– Notiz</option>
|
||||
<option value="?" {{ 'selected' if note.bullet_type == '?' else '' }}>? Frage</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Notiz
|
||||
<textarea name="note_text" rows="3" required>{{ note.note_text }}</textarea>
|
||||
</label>
|
||||
<label>
|
||||
Priorität
|
||||
<select name="priority">
|
||||
<option value="0" {{ 'selected' if note.priority == 0 else '' }}>Niedrig</option>
|
||||
<option value="1" {{ 'selected' if note.priority == 1 else '' }}>Mittel</option>
|
||||
<option value="2" {{ 'selected' if note.priority == 2 else '' }}>Hoch</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Verweis-Typ
|
||||
<select name="ref_type">
|
||||
<option value="" {{ 'selected' if not current_ref else '' }}>– kein –</option>
|
||||
<option value="email" {{ 'selected' if current_ref.get('type') == 'email' else '' }}>📧 E-Mail</option>
|
||||
<option value="link" {{ 'selected' if current_ref.get('type') == 'link' else '' }}>🔗 Link/URL</option>
|
||||
<option value="phone" {{ 'selected' if current_ref.get('type') == 'phone' else '' }}>📞 Telefon</option>
|
||||
<option value="mention" {{ 'selected' if current_ref.get('type') == 'mention' else '' }}>@ Erwähnung</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Verweis
|
||||
<input type="text" name="ref_value" value="{{ current_ref.get('value', '') }}">
|
||||
</label>
|
||||
<div class="report-actions">
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -46,6 +46,13 @@
|
||||
{% endif %}
|
||||
<span class="note-date">{{ e.month_date.strftime('%m/%Y') }}</span>
|
||||
</div>
|
||||
<span class="mini-actions">
|
||||
<a href="{{ url_for('journal.edit_future', entry_id=e.id) }}" class="btn btn-small">Bearbeiten</a>
|
||||
<form method="post" action="{{ url_for('journal.delete_future', entry_id=e.id) }}" class="inline"
|
||||
onsubmit="return confirm('Eintrag wirklich löschen?');">
|
||||
<button class="btn btn-small btn-danger">Löschen</button>
|
||||
</form>
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
{{ 'Erledigt' if n.status != 'done' else 'Öffnen' }}
|
||||
</button>
|
||||
</form>
|
||||
<a href="{{ url_for('journal.edit_note', note_id=n.id) }}" class="btn btn-small">Bearbeiten</a>
|
||||
<form method="post" action="{{ url_for('journal.delete_note', note_id=n.id) }}" class="inline"
|
||||
onsubmit="return confirm('Diese Notiz wirklich löschen?');">
|
||||
<button class="btn btn-small btn-danger">Löschen</button>
|
||||
</form>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
117
templates/report.html
Normal file
117
templates/report.html
Normal 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 %}
|
||||
@@ -57,6 +57,11 @@
|
||||
<input type="date" name="target_date" class="move-date" title="Verschiebe-Button nutzt dieses Datum">
|
||||
<button type="submit" class="btn btn-small" name="target" value="date">Verschieben</button>
|
||||
</form>
|
||||
<a href="{{ url_for('journal.edit_note', note_id=n.id) }}" class="btn btn-small">Bearbeiten</a>
|
||||
<form method="post" action="{{ url_for('journal.delete_note', note_id=n.id) }}" class="inline"
|
||||
onsubmit="return confirm('Diese Notiz wirklich löschen?');">
|
||||
<button class="btn btn-small btn-danger">Löschen</button>
|
||||
</form>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user