Initial commit: Notes Manager App (notes.braetter-int.de)

- Python/Flask Backend
- SQLAlchemy Models (notes, tasks, templates, users)
- Gunicorn + Nginx Deploy-Konfiguration
- Static Assets (CSS/JS)
- Jinja2 Templates
This commit is contained in:
2026-04-15 09:28:33 +02:00
commit 5c7ce5d0ca
24 changed files with 1666 additions and 0 deletions

77
app/templates/entry_form.html Executable file
View File

@@ -0,0 +1,77 @@
{% extends 'base.html' %}
{% block title %}Eintrag {% if entry %}bearbeiten{% else %}anlegen{% endif %} - NotesManager{% endblock %}
{% block content %}
<h1 class="h2 mb-4">{% if entry %}Eintrag bearbeiten{% else %}Neuen Eintrag anlegen{% endif %}</h1>
<div class="row g-4">
<div class="col-lg-8">
<form method="post" class="card shadow-sm">
<div class="card-body">
<div class="row g-3">
<div class="col-md-8">
<label class="form-label">Titel</label>
<input name="title" class="form-control" required value="{{ entry.title if entry else '' }}">
</div>
<div class="col-md-4">
<label class="form-label">Datum</label>
<input type="date" name="work_date" class="form-control" value="{{ entry.work_date.isoformat() if entry else '' }}">
</div>
<div class="col-md-4">
<label class="form-label">Kategorie</label>
<input name="category" class="form-control" value="{{ entry.category if entry else '' }}" placeholder="z. B. Betrieb">
</div>
<div class="col-md-4">
<label class="form-label">System / Bereich</label>
<input name="system_name" class="form-control" value="{{ entry.system_name if entry else '' }}" placeholder="Server, Kunde, Projekt ...">
</div>
<div class="col-md-2">
<label class="form-label">Priorität</label>
<select name="priority" class="form-select">
{% for p in ['niedrig', 'mittel', 'hoch'] %}
<option value="{{ p }}" {% if (entry and entry.priority == p) or (not entry and p == 'mittel') %}selected{% endif %}>{{ p }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-2">
<label class="form-label">Status</label>
<select name="status" class="form-select">
{% for s in ['offen', 'in_bearbeitung', 'erledigt'] %}
<option value="{{ s }}" {% if (entry and entry.status == s) or (not entry and s == 'offen') %}selected{% endif %}>{{ s }}</option>
{% endfor %}
</select>
</div>
<div class="col-12">
<label class="form-label">Tags</label>
<input name="tags" class="form-control" value="{{ entry.tags if entry else '' }}" placeholder="z. B. backup, kunde-a, patchday">
</div>
<div class="col-12">
<label class="form-label">Inhalt</label>
<textarea id="content" name="content" rows="16" class="form-control" required>{{ entry.content if entry else '' }}</textarea>
</div>
</div>
</div>
<div class="card-footer d-flex gap-2 justify-content-end">
<a href="{{ url_for('main.entries') }}" class="btn btn-outline-secondary">Abbrechen</a>
<button class="btn btn-primary">Speichern</button>
</div>
</form>
</div>
<div class="col-lg-4">
<div class="card shadow-sm">
<div class="card-body">
<h2 class="h5">Vorlagen</h2>
<p class="text-muted small">Klicke auf eine Vorlage, um den Inhalt in das Formular zu übernehmen.</p>
<div class="list-group">
{% for t in templates %}
<button type="button" class="list-group-item list-group-item-action template-btn" data-template="{{ t.content | e }}">
<strong>{{ t.name }}</strong>
<div class="small text-muted">{{ t.description }}</div>
</button>
{% else %}
<div class="text-muted">Keine Vorlagen vorhanden.</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}