travelynx/templates/history.html.ep
Daniel Friesel e07063c52c Add manual journey entry
Closes #3
2019-04-26 19:53:01 +02:00

52 lines
1.4 KiB
Text

<h1>Fahrten</h1>
<div class="row">
<div class="col s12">
Hier finden sich alle bisherigen Zugfahrten und Statistiken für jedes
Jahr und jeden Monat.
</div>
</div>
<div class="row">
<div class="col s12 m12 l3 center-align">
<a href="/cancelled" class="waves-effect waves-light btn"><i class="material-icons left">cancel</i> Zugausfälle</a>
</div>
<div class="col s12 m12 l1">&nbsp;</div>
<div class="col s12 m12 l4 center-align">
<a href="/journey/add" class="waves-effect waves-light btn"><i class="material-icons left">add</i> Neue Fahrt</a>
</div>
<div class="col s12 m12 l1">&nbsp;</div>
<div class="col s12 m12 l3 center-align">
<a href="/history.json" class="waves-effect waves-light btn"><i class="material-icons left">cloud</i> JSON-Export</a>
</div>
</div>
<h2>Nach Jahr</h2>
% my $since = get_oldest_journey_ts();
% my $now = DateTime->now(time_zone => 'Europe/Berlin');
% if ($since) {
%= include '_history_years', current => '', since => $since->clone, now => $now;
% }
% else {
<div class="row">
<div class="col s12">
Noch keine Fahrten.
</div>
</div>
% }
<h2>Nach Monat</h2>
% if ($since) {
%= include '_history_months', current => '', since => $since->clone, now => $now;
% }
% else {
<div class="row">
<div class="col s12">
Noch keine Fahrten.
</div>
</div>
% }
% if (stash('statistics')) {
%= include '_history_stats', stats => stash('statistics');
% }