Add task completion toggle, custom task templates, and umlaut UI updates
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>FarmCal - Feldfruechte</title>
|
||||
<title>FarmCal - Feldfrüchte</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/static/farmcal-icon.svg">
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="top"><h1><img src="/static/farmcal-icon.svg" alt="" class="brand-icon">FarmCal</h1><p>Feldfruechte verwalten</p></header>
|
||||
<header class="top"><h1><img src="/static/farmcal-icon.svg" alt="" class="brand-icon">FarmCal</h1><p>Feldfrüchte verwalten</p></header>
|
||||
<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>
|
||||
@@ -25,7 +25,7 @@
|
||||
<label>Aussaat von Monat<input type="number" name="sow_start_month" min="1" max="12" required></label>
|
||||
<label>Aussaat bis Monat<input type="number" name="sow_end_month" min="1" max="12" required></label>
|
||||
<label>Wachstum (Monate)<input type="number" name="grow_months" min="1" max="24" required></label>
|
||||
<label class="check"><input type="checkbox" name="regrow_enabled"> Waechst nach Ernte erneut</label>
|
||||
<label class="check"><input type="checkbox" name="regrow_enabled"> Wächst nach Ernte erneut</label>
|
||||
<label>Zusatz-Ernten (0 = unendlich)
|
||||
<input type="number" name="regrow_cycles" min="0" max="120" value="0">
|
||||
</label>
|
||||
@@ -34,7 +34,7 @@
|
||||
</section>
|
||||
|
||||
<section class="card full-width">
|
||||
<h2>Bestehende Feldfruechte</h2>
|
||||
<h2>Bestehende Feldfrüchte</h2>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead><tr><th>Name</th><th>Aussaat</th><th>Wachstum</th><th>Aktionen</th></tr></thead>
|
||||
@@ -56,13 +56,13 @@
|
||||
</td>
|
||||
<td class="actions">
|
||||
<button type="submit" class="btn-small">Speichern</button>
|
||||
<button type="submit" formaction="/crops/delete" formnovalidate class="btn-small danger" onclick="return confirm('Feldfrucht wirklich loeschen?')">Loeschen</button>
|
||||
<button type="submit" formaction="/crops/delete" formnovalidate class="btn-small danger" onclick="return confirm('Feldfrucht wirklich löschen?')">Löschen</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<tr><td colspan="4">Keine Feldfruechte vorhanden.</td></tr>
|
||||
<tr><td colspan="4">Keine Feldfrüchte vorhanden.</td></tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -74,7 +74,7 @@
|
||||
<form method="post" action="/crop-steps/create" class="grid">
|
||||
<label>Feldfrucht
|
||||
<select name="crop_id" required>
|
||||
<option value="">Bitte waehlen</option>
|
||||
<option value="">Bitte wählen</option>
|
||||
{{range .Crops}}
|
||||
<option value="{{.ID}}">{{.Name}}</option>
|
||||
{{end}}
|
||||
@@ -109,7 +109,7 @@
|
||||
<td>
|
||||
<form method="post" action="/crop-steps/delete">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Schritt loeschen?')">Loeschen</button>
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Schritt löschen?')">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<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>
|
||||
@@ -25,13 +25,13 @@
|
||||
<section class="card">
|
||||
<h2>Aktuelle Ingame-Zeit</h2>
|
||||
<p><strong>{{.CurrentMonth}} Tag {{.Settings.CurrentDay}}</strong> bei {{.Settings.DaysPerMonth}} Tagen pro Monat.</p>
|
||||
<p>{{.PlanningCount}} Plan-Eintraege insgesamt.</p>
|
||||
<p>{{.PlanningCount}} Plan-Einträge insgesamt.</p>
|
||||
<form method="post" action="/settings/time" class="grid">
|
||||
<label>Monat
|
||||
<select name="current_month">
|
||||
<option value="1" {{if eq .Settings.CurrentMonth 1}}selected{{end}}>Januar</option>
|
||||
<option value="2" {{if eq .Settings.CurrentMonth 2}}selected{{end}}>Februar</option>
|
||||
<option value="3" {{if eq .Settings.CurrentMonth 3}}selected{{end}}>Maerz</option>
|
||||
<option value="3" {{if eq .Settings.CurrentMonth 3}}selected{{end}}>März</option>
|
||||
<option value="4" {{if eq .Settings.CurrentMonth 4}}selected{{end}}>April</option>
|
||||
<option value="5" {{if eq .Settings.CurrentMonth 5}}selected{{end}}>Mai</option>
|
||||
<option value="6" {{if eq .Settings.CurrentMonth 6}}selected{{end}}>Juni</option>
|
||||
@@ -55,11 +55,21 @@
|
||||
{{if .TodayTasks}}
|
||||
<ul class="tasks">
|
||||
{{range .TodayTasks}}
|
||||
<li><strong>{{.Type}}:</strong> {{.Message}}</li>
|
||||
<li class="{{if .Completed}}done-task{{end}}">
|
||||
<span><strong>{{.Type}}:</strong> {{.Message}}</span>
|
||||
<form method="post" action="/tasks/toggle" class="inline-form">
|
||||
<input type="hidden" name="uid" value="{{.UID}}">
|
||||
<input type="hidden" name="month" value="{{.Month}}">
|
||||
<input type="hidden" name="day" value="{{.Day}}">
|
||||
<input type="hidden" name="year_offset" value="{{.YearOffset}}">
|
||||
<input type="hidden" name="completed" value="{{if .Completed}}1{{else}}0{{end}}">
|
||||
<button type="submit" class="btn-small {{if .Completed}}secondary{{end}}">{{if .Completed}}Offen{{else}}Erledigt{{end}}</button>
|
||||
</form>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<p>Keine Aufgaben fuer den aktuellen Ingame-Tag.</p>
|
||||
<p>Keine Aufgaben für den aktuellen Ingame-Tag.</p>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
@@ -76,11 +86,21 @@
|
||||
{{if .Tasks}}
|
||||
<ul class="task-sublist">
|
||||
{{range .Tasks}}
|
||||
<li>{{.Field}}: {{.Message}}</li>
|
||||
<li class="{{if .Completed}}done-task{{end}}">
|
||||
<span>{{.Field}}: {{.Message}}</span>
|
||||
<form method="post" action="/tasks/toggle" class="inline-form">
|
||||
<input type="hidden" name="uid" value="{{.UID}}">
|
||||
<input type="hidden" name="month" value="{{.Month}}">
|
||||
<input type="hidden" name="day" value="{{.Day}}">
|
||||
<input type="hidden" name="year_offset" value="{{.YearOffset}}">
|
||||
<input type="hidden" name="completed" value="{{if .Completed}}1{{else}}0{{end}}">
|
||||
<button type="submit" class="btn-small {{if .Completed}}secondary{{end}}">{{if .Completed}}Offen{{else}}Erledigt{{end}}</button>
|
||||
</form>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<span class="muted">Keine Eintraege</span>
|
||||
<span class="muted">Keine Einträge</span>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<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>
|
||||
@@ -44,7 +44,7 @@
|
||||
<td>{{if .GroupName}}{{.GroupName}}{{else}}-{{end}}</td>
|
||||
<td class="actions">
|
||||
<button type="submit" class="btn-small">Speichern</button>
|
||||
<button type="submit" formaction="/fields/delete" formnovalidate class="btn-small danger" onclick="return confirm('Feld wirklich loeschen?')">Loeschen</button>
|
||||
<button type="submit" formaction="/fields/delete" formnovalidate class="btn-small danger" onclick="return confirm('Feld wirklich löschen?')">Löschen</button>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
@@ -84,7 +84,7 @@
|
||||
<td>
|
||||
<form method="post" action="/field-groups/delete">
|
||||
<input type="hidden" name="group_key" value="{{.Key}}">
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Gruppe aufloesen?')">Aufloesen</button>
|
||||
<button type="submit" class="btn-small danger" onclick="return confirm('Gruppe auflösen?')">Auflösen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<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>
|
||||
|
||||
@@ -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