Add task completion toggle, custom task templates, and umlaut UI updates
This commit is contained in:
@@ -12,18 +12,18 @@
|
||||
<nav class="tabs">
|
||||
<a href="/" class="{{if eq .ActivePath "/"}}active{{end}}">Dashboard</a>
|
||||
<a href="/planning" class="{{if eq .ActivePath "/planning"}}active{{end}}">Anbau planen</a>
|
||||
<a href="/crops" class="{{if eq .ActivePath "/crops"}}active{{end}}">Feldfruechte</a>
|
||||
<a href="/crops" class="{{if eq .ActivePath "/crops"}}active{{end}}">Feldfrüchte</a>
|
||||
<a href="/fields" class="{{if eq .ActivePath "/fields"}}active{{end}}">Felder & Gruppen</a>
|
||||
<a href="/general" class="{{if eq .ActivePath "/general"}}active{{end}}">Allgemein</a>
|
||||
</nav>
|
||||
|
||||
<main class="layout">
|
||||
<section class="card">
|
||||
<h2>Neuer Plan</h2>
|
||||
<h2>Neuer Anbau-Plan</h2>
|
||||
<form method="post" action="/plans/create" class="grid">
|
||||
<label>Planungsziel
|
||||
<select name="target_ref" required>
|
||||
<option value="">Bitte waehlen</option>
|
||||
<option value="">Bitte wählen</option>
|
||||
{{range .PlanningTargets}}
|
||||
<option value="{{.Ref}}">{{.Label}}</option>
|
||||
{{end}}
|
||||
@@ -31,7 +31,7 @@
|
||||
</label>
|
||||
<label>Feldfrucht
|
||||
<select name="crop_id" required>
|
||||
<option value="">Bitte waehlen</option>
|
||||
<option value="">Bitte wählen</option>
|
||||
{{range .Crops}}
|
||||
<option value="{{.ID}}">{{.Name}} (Monat {{.SowStartMonth}}-{{.SowEndMonth}})</option>
|
||||
{{end}}
|
||||
@@ -54,8 +54,55 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Aufgaben-Template speichern</h2>
|
||||
<form method="post" action="/task-templates/create" class="grid">
|
||||
<label class="full">Template-Titel
|
||||
<input type="text" name="title" maxlength="140" placeholder="z.B. Schweine füttern" required>
|
||||
</label>
|
||||
<button type="submit">Template speichern</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Eigene Aufgabe einplanen</h2>
|
||||
<form method="post" action="/custom-tasks/create" class="grid">
|
||||
<label>Template (optional)
|
||||
<select name="template_id">
|
||||
<option value="0">Kein Template</option>
|
||||
{{range .TaskTemplates}}
|
||||
<option value="{{.ID}}">{{.Title}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</label>
|
||||
<label>Alternativer Titel
|
||||
<input type="text" name="title" maxlength="140" placeholder="leer lassen wenn Template genutzt wird">
|
||||
</label>
|
||||
<label>Monat
|
||||
<select name="month">
|
||||
{{range .Months}}
|
||||
<option value="{{.Value}}" {{if eq $.Settings.CurrentMonth .Value}}selected{{end}}>{{.Label}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
</label>
|
||||
<label>Tag
|
||||
<input type="number" name="day" min="1" max="{{.Settings.DaysPerMonth}}" value="{{.Settings.CurrentDay}}">
|
||||
</label>
|
||||
<label>Jahr-Offset
|
||||
<input type="number" name="year_offset" min="0" max="4" value="0">
|
||||
</label>
|
||||
<label>Ziel (optional)
|
||||
<input type="text" name="target_name" maxlength="120" placeholder="z.B. Hof oder Feld 1+2">
|
||||
</label>
|
||||
<label class="full">Notiz (optional)
|
||||
<input type="text" name="notes" maxlength="255">
|
||||
</label>
|
||||
<button type="submit">Aufgabe einplanen</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="card full-width">
|
||||
<h2>Geplante Durchlaeufe</h2>
|
||||
<h2>Geplante Durchläufe</h2>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Ziel</th><th>Frucht</th><th>Aussaat</th><th>Ernte</th><th>Notiz</th><th>Aktion</th></tr></thead>
|
||||
@@ -71,7 +118,7 @@
|
||||
<td>
|
||||
<form method="post" action="/plans/delete">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Plan wirklich loeschen?')">Loeschen</button>
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Plan wirklich löschen?')">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -83,6 +130,35 @@
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card full-width">
|
||||
<h2>Eigene Aufgaben</h2>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Titel</th><th>Ziel</th><th>Datum</th><th>Notiz</th><th>Aktion</th></tr></thead>
|
||||
<tbody>
|
||||
{{if .CustomTasks}}
|
||||
{{range .CustomTasks}}
|
||||
<tr>
|
||||
<td>{{.Title}}</td>
|
||||
<td>{{if .TargetName}}{{.TargetName}}{{else}}Allgemein{{end}}</td>
|
||||
<td>Monat {{.Month}} Tag {{.Day}} (Jahr +{{.YearOffset}})</td>
|
||||
<td>{{.Notes}}</td>
|
||||
<td>
|
||||
<form method="post" action="/custom-tasks/delete">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Aufgabe wirklich löschen?')">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<tr><td colspan="5">Keine eigenen Aufgaben geplant.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{{if .Error}}<div class="toast error">{{.Error}}</div>{{end}}
|
||||
{{if .Info}}<div class="toast info">{{.Info}}</div>{{end}}
|
||||
|
||||
Reference in New Issue
Block a user