modified: app.py
modified: db.py modified: routes/journal_routes.py modified: static/css/style.css modified: static/js/main.js modified: templates/base.html modified: templates/day.html modified: templates/future.html modified: templates/index.html new file: templates/monat.html modified: templates/week.html
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
<nav class="nav">
|
||||
<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.future') }}">Future Log</a>
|
||||
<a href="{{ url_for('journal.day', date_str=today_str) }}" class="nav-today">Heute</a>
|
||||
{% if session.get('is_admin') %}
|
||||
|
||||
@@ -41,6 +41,23 @@
|
||||
</label>
|
||||
<button type="submit" class="btn btn-primary">Hinzufügen</button>
|
||||
</div>
|
||||
<div class="note-form-row ref-row">
|
||||
<label>
|
||||
Verweis-Typ
|
||||
<select name="ref_type">
|
||||
<option value="">– kein –</option>
|
||||
<option value="email">📧 E-Mail</option>
|
||||
<option value="link">🔗 Link/URL</option>
|
||||
<option value="phone">📞 Telefon</option>
|
||||
<option value="mention">@ Erwähnung</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="grow">
|
||||
Verweis
|
||||
<input type="text" name="ref_value" placeholder="z. B. name@firma.de oder https://... (optional)">
|
||||
</label>
|
||||
<span class="ref-hint muted">Optional – wird als klickbarer Verweis gespeichert.</span>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@@ -57,7 +74,21 @@
|
||||
{% for n in notes %}
|
||||
<div class="notes-row {{ 'is-done' if n.status == 'done' else '' }}">
|
||||
<span class="bullet bullet-{{ n.bullet_type }}" title="{{ bullet_labels.get(n.bullet_type, '') }}">{{ n.bullet_type }}</span>
|
||||
<span class="note-text">{{ n.note_text }}</span>
|
||||
<div class="note-cell">
|
||||
<div class="note-text">{{ n.note_text|linkify }}</div>
|
||||
{% if n.refs|refs %}
|
||||
<div class="refs">
|
||||
{% for r in n.refs|refs %}
|
||||
<a class="ref" href="{{ ref_href(r.type, r.value) }}" target="_blank" rel="noopener">
|
||||
{{ ref_type_label(r.type) }} {{ r.value }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if n.moved_from_date %}
|
||||
<div class="moved-hint">↩ verschoben von {{ n.moved_from_date.strftime('%d.%m.%Y') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<span class="priority-badge priority-{{ n.priority }}">{{ ['Niedrig','Mittel','Hoch'][n.priority] if n.priority <= 2 else n.priority }}</span>
|
||||
<span class="actions">
|
||||
<form method="post" action="{{ url_for('journal.mark_done', note_id=n.id) }}" class="inline">
|
||||
@@ -65,11 +96,16 @@
|
||||
{{ 'Erledigt' if n.status != 'done' else 'Wieder öffnen' }}
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="{{ url_for('journal.move_note', note_id=n.id) }}" class="inline move-form">
|
||||
<input type="date" name="target_date" class="move-date" title="In anderen Tag verschieben">
|
||||
<button type="submit" class="btn btn-small" name="target" value="date">Verschieben</button>
|
||||
<button type="submit" class="btn btn-small btn-future" name="target" value="future">→ Future Log</button>
|
||||
</form>
|
||||
<span class="move-ctrl">
|
||||
<input type="date" id="move-date-{{ n.id }}" class="move-date" title="Zieldatum wählen">
|
||||
<form method="post" action="{{ url_for('journal.move_note', note_id=n.id) }}" class="inline">
|
||||
<input type="hidden" name="target_date" id="move-target-{{ n.id }}">
|
||||
<button type="submit" class="btn btn-small" name="target" value="date" id="move-btn-{{ n.id }}" disabled>Verschieben</button>
|
||||
</form>
|
||||
<form method="post" action="{{ url_for('journal.move_note', note_id=n.id) }}" class="inline">
|
||||
<button type="submit" class="btn btn-small btn-future" name="target" value="future">→ Future Log</button>
|
||||
</form>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -33,10 +33,19 @@
|
||||
{% for e in entries %}
|
||||
<li class="note-item {{ 'is-done' if e.status == 'done' else '' }}">
|
||||
<span class="bullet">{{ '✓' if e.status == 'done' else '›' }}</span>
|
||||
<span class="note-text">{{ e.note_text }}</span>
|
||||
<form method="post" action="{{ url_for('journal.future') }}" class="inline">
|
||||
<input type="hidden" name="toggle_id" value="{{ e.id }}">
|
||||
</form>
|
||||
<div class="note-text">
|
||||
<div>{{ e.note_text|linkify }}</div>
|
||||
{% if e.refs|refs %}
|
||||
<div class="refs">
|
||||
{% for r in e.refs|refs %}
|
||||
<a class="ref" href="{{ ref_href(r.type, r.value) }}" target="_blank" rel="noopener">
|
||||
{{ ref_type_label(r.type) }} {{ r.value }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<span class="note-date">{{ e.month_date.strftime('%m/%Y') }}</span>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -35,8 +35,19 @@
|
||||
<ul class="note-list">
|
||||
{% for n in overdue %}
|
||||
<li class="note-item">
|
||||
<span class="bullet bullet-{{ n.bullet_type|urlencode }}">{{ n.bullet_type }}</span>
|
||||
<span class="note-text">{{ n.note_text }}</span>
|
||||
<span class="bullet bullet-{{ n.bullet_type }}">{{ n.bullet_type }}</span>
|
||||
<div class="note-text">
|
||||
<div>{{ n.note_text|linkify }}</div>
|
||||
{% if n.refs|refs %}
|
||||
<div class="refs">
|
||||
{% for r in n.refs|refs %}
|
||||
<a class="ref" href="{{ ref_href(r.type, r.value) }}" target="_blank" rel="noopener">
|
||||
{{ ref_type_label(r.type) }} {{ r.value }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<span class="note-date">{{ n.note_date.strftime('%d.%m.%Y') }}</span>
|
||||
<form method="post" action="{{ url_for('journal.mark_done', note_id=n.id) }}" class="inline">
|
||||
<button class="btn btn-small">Erledigt</button>
|
||||
|
||||
82
templates/monat.html
Normal file
82
templates/monat.html
Normal file
@@ -0,0 +1,82 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Monatsübersicht – Bullet Journal{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-head">
|
||||
<div>
|
||||
<h1>Monatsübersicht</h1>
|
||||
<p class="muted">
|
||||
<a href="{{ url_for('journal.month', month=prev_month.strftime('%Y-%m')) }}" class="btn btn-small">← Voriger</a>
|
||||
{{ first.strftime('%B %Y') }}
|
||||
<a href="{{ url_for('journal.month', month=next_month.strftime('%Y-%m')) }}" class="btn btn-small">Nächster →</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="page-actions">
|
||||
<a href="{{ url_for('journal.export_month', month=first.strftime('%Y-%m')) }}" class="btn btn-small">⬇ CSV</a>
|
||||
<button class="btn btn-small" onclick="window.print()">🖨 Drucken/PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<h2>{{ first.strftime('%B %Y') }}</h2>
|
||||
<div class="month-grid">
|
||||
<div class="month-grid-head">
|
||||
{% for wd in weekdays %}<span>{{ wd[:2] }}</span>{% endfor %}
|
||||
</div>
|
||||
{% for week in weeks %}
|
||||
<div class="month-grid-row">
|
||||
{% for cell in week %}
|
||||
<div class="month-cell {{ '' if cell.in_month else 'outside' }} {{ 'today' if cell.today else '' }}"
|
||||
{% if cell.in_month %}onclick="location.href='{{ url_for('journal.day', date_str=cell.date.strftime('%Y-%m-%d')) }}'"{% endif %}>
|
||||
<span class="month-daynum">{{ cell.date.day }}</span>
|
||||
{% for n in cell.notes[:4] %}
|
||||
<div class="month-note {{ 'is-done' if n.status == 'done' else '' }}" title="{{ n.note_text }}">
|
||||
<span class="bullet bullet-{{ n.bullet_type }}">{{ n.bullet_type }}</span>
|
||||
<span class="month-note-text">{{ n.note_text|truncate(22) }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if cell.notes|length > 4 %}
|
||||
<div class="month-more">+{{ cell.notes|length - 4 }} weitere</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Alle Einträge des Monats</h2>
|
||||
{% if all_notes %}
|
||||
<ul class="note-list">
|
||||
{% for n in all_notes %}
|
||||
{% if n.status != 'moved' %}
|
||||
<li class="note-item {{ 'is-done' if n.status == 'done' else '' }}">
|
||||
<span class="bullet bullet-{{ n.bullet_type }}">{{ n.bullet_type }}</span>
|
||||
<span class="note-text">{{ n.note_text|linkify }}</span>
|
||||
{% if n.refs|refs %}
|
||||
<span class="refs">
|
||||
{% for r in n.refs|refs %}
|
||||
<a class="ref" href="{{ ref_href(r.type, r.value) }}" target="_blank" rel="noopener">
|
||||
{{ ref_type_label(r.type) }} {{ r.value }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="note-date">{{ n.note_date.strftime('%d.%m.') }}</span>
|
||||
<span class="priority-badge priority-{{ n.priority }}">{{ ['Niedrig','Mittel','Hoch'][n.priority] if n.priority <= 2 else n.priority }}</span>
|
||||
<span class="mini-actions no-print">
|
||||
<form method="post" action="{{ url_for('journal.mark_done', note_id=n.id) }}" class="inline">
|
||||
<button class="btn btn-small {{ 'btn-success' if n.status != 'done' else '' }}">
|
||||
{{ 'Erledigt' if n.status != 'done' else 'Öffnen' }}
|
||||
</button>
|
||||
</form>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="muted">Keine Einträge in diesem Monat.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -10,52 +10,60 @@
|
||||
<a href="{{ url_for('journal.week', week=next_monday.strftime('%G-W%V')) }}" class="btn btn-small">Nächste →</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="page-actions">
|
||||
<a href="{{ url_for('journal.export_week', week=monday.strftime('%G-W%V')) }}" class="btn btn-small">⬇ CSV</a>
|
||||
<button class="btn btn-small" onclick="window.print()">🖨 Drucken/PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<th>Datum</th>
|
||||
<th>Offen</th>
|
||||
<th>Erledigt</th>
|
||||
<th>Gesamt</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for day in days_detail %}
|
||||
<tr>
|
||||
<td>{{ day.weekday }}</td>
|
||||
<td>{{ day.date.strftime('%d.%m.%Y') }}</td>
|
||||
<td class="num open">{{ day.open }}</td>
|
||||
<td class="num done">{{ day.done }}</td>
|
||||
<td class="num">{{ day.total }}</td>
|
||||
<td><a href="{{ url_for('journal.day', date_str=day.date.strftime('%Y-%m-%d')) }}" class="btn btn-small">Öffnen</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
{% for day in days_detail %}
|
||||
<section class="card day-section">
|
||||
<div class="day-head">
|
||||
<h2>{{ day.weekday }}, {{ day.date.strftime('%d.%m.%Y') }}</h2>
|
||||
<div class="day-head-stats">
|
||||
<span class="pill open">{{ day.open }} offen</span>
|
||||
<span class="pill done">{{ day.done }} erledigt</span>
|
||||
{% if day.moved %}<span class="pill moved">{{ day.moved }} verschoben</span>{% endif %}
|
||||
<a href="{{ url_for('journal.day', date_str=day.date.strftime('%Y-%m-%d')) }}" class="btn btn-small">Tag öffnen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<h2>Offene Aufgaben dieser Woche</h2>
|
||||
{% if open_notes %}
|
||||
<ul class="note-list">
|
||||
{% for n in open_notes %}
|
||||
<li class="note-item">
|
||||
<span class="bullet bullet-{{ n.bullet_type }}">{{ n.bullet_type }}</span>
|
||||
<span class="note-text">{{ n.note_text }}</span>
|
||||
<span class="note-date">{{ n.note_date.strftime('%d.%m.') }} {{ 'Aufgabe' if n.bullet_type == '.' else ('Termin' if n.bullet_type == 'x' else ('Notiz' if n.bullet_type == '-' else 'Frage')) }}</span>
|
||||
<form method="post" action="{{ url_for('journal.mark_done', note_id=n.id) }}" class="inline">
|
||||
<button class="btn btn-small">Erledigt</button>
|
||||
</form>
|
||||
</li>
|
||||
{% if day.notes %}
|
||||
<div class="mini-notes">
|
||||
{% for n in day.notes %}
|
||||
<div class="mini-note {{ 'is-done' if n.status == 'done' else '' }}">
|
||||
<span class="bullet bullet-{{ n.bullet_type }}" title="{{ bullet_labels.get(n.bullet_type, '') }}">{{ n.bullet_type }}</span>
|
||||
<span class="mini-note-text">{{ n.note_text|linkify }}</span>
|
||||
{% if n.refs|refs %}
|
||||
<span class="refs">
|
||||
{% for r in n.refs|refs %}
|
||||
<a class="ref" href="{{ ref_href(r.type, r.value) }}" target="_blank" rel="noopener">
|
||||
{{ ref_type_label(r.type) }} {{ r.value }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if n.moved_from_date %}
|
||||
<span class="moved-hint">↩ verschoben von {{ n.moved_from_date.strftime('%d.%m.%Y') }}</span>
|
||||
{% endif %}
|
||||
<span class="priority-badge priority-{{ n.priority }}">{{ ['Niedrig','Mittel','Hoch'][n.priority] if n.priority <= 2 else n.priority }}</span>
|
||||
<span class="mini-actions no-print">
|
||||
<form method="post" action="{{ url_for('journal.mark_done', note_id=n.id) }}" class="inline">
|
||||
<button class="btn btn-small {{ 'btn-success' if n.status != 'done' else '' }}">
|
||||
{{ 'Erledigt' if n.status != 'done' else 'Öffnen' }}
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="{{ url_for('journal.move_note', note_id=n.id) }}" class="inline move-form">
|
||||
<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>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="muted">Keine offenen Aufgaben in dieser Woche. 🎉</p>
|
||||
<p class="muted">Keine Einträge.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user