From e07063c52c51569b5f252a202f5d71b5f70a73e7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 26 Apr 2019 19:53:01 +0200 Subject: Add manual journey entry Closes #3 --- templates/history.html.ep | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'templates/history.html.ep') diff --git a/templates/history.html.ep b/templates/history.html.ep index 05f4777..246d6af 100644 --- a/templates/history.html.ep +++ b/templates/history.html.ep @@ -8,24 +8,44 @@
-

Nach Jahr

-% my $since = get_user_data()->{registered_at}; +% my $since = get_oldest_journey_ts(); % my $now = DateTime->now(time_zone => 'Europe/Berlin'); -%= include '_history_years', current => '', since => $since->clone, now => $now; +% if ($since) { + %= include '_history_years', current => '', since => $since->clone, now => $now; +% } +% else { +
+
+ Noch keine Fahrten. +
+
+% }

Nach Monat

-%= include '_history_months', current => '', since => $since->clone, now => $now; +% if ($since) { + %= include '_history_months', current => '', since => $since->clone, now => $now; +% } +% else { +
+
+ Noch keine Fahrten. +
+
+% } % if (stash('statistics')) { %= include '_history_stats', stats => stash('statistics'); -- cgit v1.2.3