Auflisten der Elemente beim Eintragen

fixes: #5
This commit is contained in:
2020-08-07 20:19:40 +02:00
parent 7b0dd543b1
commit 34eed9680b
4 changed files with 91 additions and 34 deletions
+43 -28
View File
@@ -1,29 +1,44 @@
{{#* inline "page"}}
<h1>Klasse hinzu fügen</h1>
<form action="/admin/add/klasse" method="post" accept-charset="utf-8">
<table>
<tr>
<th>Stufe:</th>
<td><input type="number" name="stufe"></td>
</tr>
<tr>
<th>Teil:</th>
<td><input type="text" name="gruppe"></td>
</tr>
<tr>
<th>Titel:</th>
<td><input type="text" name="titel"></td>
</tr>
<tr>
<th>Ordnung:</th>
<td><input type="number" name="ordnung"></td>
</tr>
<tr>
<th></th>
<td><input type="submit" value="Klasse Erstellen"></td>
</tr>
</table>
</form>
{{/inline}}
{{! remove whitespaces with ~ }}
{{~> (parent)~}}
<h1>Klassen</h1>
<table>
<tr>
<th>Klasse</th>
<th>Titel</th>
<th>Priorität</th>
</tr>
{{#each klassen}}
<tr>
<td>{{ this.stufe }}{{this.gruppe}}</td>
<td>{{this.titel}}</td>
<td>{{this.ordnung}}</td>
</tr>
{{/each}}
</table>
<h1>Klasse hinzu fügen</h1>
<form action="/admin/add/klasse" method="post" accept-charset="utf-8">
<table>
<tr>
<th>Stufe:</th>
<td><input type="number" name="stufe"></td>
</tr>
<tr>
<th>Teil:</th>
<td><input type="text" name="gruppe"></td>
</tr>
<tr>
<th>Titel:</th>
<td><input type="text" name="titel"></td>
</tr>
<tr>
<th>Ordnung:</th>
<td><input type="number" name="ordnung"></td>
</tr>
<tr>
<th></th>
<td><input type="submit" value="Klasse Erstellen"></td>
</tr>
</table>
</form>
{{/inline}}
{{! remove whitespaces with ~ }}
{{~> (parent)~}}
+17 -2
View File
@@ -1,9 +1,24 @@
{{#* inline "page"}}
<h1>Stunden</h1>
<table>
<tr>
<th>Name</th>
<th>Abkürzung</th>
<th>Priorität</th>
</tr>
{{#each stunden}}
<tr>
<td>{{ this.title }}</td>
<td>{{this.short}}</td>
<td>{{this.ordinal}}</td>
</tr>
{{/each}}
</table>
<h1>Stunde hinzu fügen</h1>
<form action="/admin/add/stunde" method="post" accept-charset="utf-8">
<table>
<tr>
<th>Titel:</th>
<th>Name:</th>
<td><input type="text" name="title"></td>
</tr>
<tr>
@@ -11,7 +26,7 @@
<td><input type="text" name="short"></td>
</tr>
<tr>
<th>Ordnung:</th>
<th>Priorität:</th>
<td><input type="number" name="ordinal"></td>
</tr>
<tr>