Merge branch 'refs/heads/komoot-import' into sattelgeschichten

This commit is contained in:
Marcus Fihlon 2026-04-29 14:15:33 +02:00
commit 67391038d6
Signed by: McPringle
GPG key ID: C6B7F469EE363E1F
2 changed files with 7 additions and 2 deletions

View file

@ -4,6 +4,8 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import java.time.LocalDate;
/** /**
* Serves the Komoot import preview page. * Serves the Komoot import preview page.
*/ */
@ -12,7 +14,10 @@ public class KomootImportViewController {
@GetMapping("/komoot-import") @GetMapping("/komoot-import")
public String komootImportPage(Model model) { public String komootImportPage(Model model) {
LocalDate today = LocalDate.now();
model.addAttribute("pageTitle", "Komoot Import"); model.addAttribute("pageTitle", "Komoot Import");
model.addAttribute("defaultStartDate", today.withDayOfYear(1));
model.addAttribute("defaultEndDate", today);
return "activities/komoot"; return "activities/komoot";
} }
} }

View file

@ -56,11 +56,11 @@
<div class="row g-3"> <div class="row g-3">
<div class="col-md-6"> <div class="col-md-6">
<label for="startDate" class="form-label">Start Date</label> <label for="startDate" class="form-label">Start Date</label>
<input type="date" class="form-control" id="startDate" name="startDate"> <input type="date" class="form-control" id="startDate" name="startDate" th:value="${defaultStartDate}">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="endDate" class="form-label">End Date</label> <label for="endDate" class="form-label">End Date</label>
<input type="date" class="form-control" id="endDate" name="endDate"> <input type="date" class="form-control" id="endDate" name="endDate" th:value="${defaultEndDate}">
</div> </div>
</div> </div>
<div class="form-text">Both dates must be set together. Inclusive, day-based filter.</div> <div class="form-text">Both dates must be set together. Inclusive, day-based filter.</div>