54 lines
1.6 KiB
HTML
54 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="categories-page">
|
|
<h1>Kategorien verwalten</h1>
|
|
|
|
<div class="form-container">
|
|
<h2>Neue Kategorie hinzufügen</h2>
|
|
{% if error %}
|
|
<div class="error-message">{{ error }}</div>
|
|
{% endif %}
|
|
<form action="{{ url_for('categories') }}" method="post">
|
|
<div class="form-group">
|
|
<label for="name">Name:</label>
|
|
<input type="text" id="name" name="name" required>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="description">Beschreibung:</label>
|
|
<input type="text" id="description" name="description">
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="button primary">Kategorie speichern</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="categories-list">
|
|
<h2>Alle Kategorien</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Beschreibung</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for category in categories %}
|
|
<tr>
|
|
<td>{{ category.name }}</td>
|
|
<td>{{ category.description }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="2" class="no-data">Keine Kategorien vorhanden</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|