73 lines
860 B
HTML
73 lines
860 B
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Kategorien</title>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>Kategorien</h1>
|
|
|
|
<a href="/">Zurück</a>
|
|
|
|
<hr>
|
|
|
|
<h2>Neue Kategorie</h2>
|
|
|
|
<form action="/categories/add" method="post">
|
|
|
|
```
|
|
<input
|
|
type="text"
|
|
name="category"
|
|
placeholder="Neue Kategorie"
|
|
required>
|
|
|
|
<button type="submit">
|
|
Anlegen
|
|
</button>
|
|
```
|
|
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<table border="1" cellpadding="5">
|
|
|
|
<tr>
|
|
<th>Kategorie</th>
|
|
<th>Schlüsselwörter</th>
|
|
<th>Aktion</th>
|
|
</tr>
|
|
|
|
{% for category, words in categories.items() %}
|
|
|
|
<tr>
|
|
|
|
```
|
|
<td>
|
|
{{ category }}
|
|
</td>
|
|
|
|
<td>
|
|
{{ words|join(", ") }}
|
|
</td>
|
|
|
|
<td>
|
|
<a
|
|
href="/categories/delete/{{ category }}"
|
|
onclick="return confirm('Kategorie wirklich löschen?')">
|
|
Löschen
|
|
</a>
|
|
</td>
|
|
```
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|