travelynx/templates/history.html.ep

53 lines
1.4 KiB
Text
Raw Normal View History

<h1>Fahrten</h1>
2019-03-19 20:23:06 +00:00
<div class="row">
<div class="col s12">
Hier finden sich alle bisherigen Zugfahrten und Statistiken für jedes
Jahr und jeden Monat.
2019-03-19 20:23:06 +00:00
</div>
</div>
2018-10-13 12:40:19 +00:00
<div class="row">
2019-04-26 17:53:01 +00:00
<div class="col s12 m12 l3 center-align">
2019-04-24 13:15:53 +00:00
<a href="/cancelled" class="waves-effect waves-light btn"><i class="material-icons left">cancel</i> Zugausfälle</a>
</div>
2019-04-26 17:53:01 +00:00
<div class="col s12 m12 l1">&nbsp;</div>
2019-04-24 13:15:53 +00:00
<div class="col s12 m12 l4 center-align">
2019-04-26 17:53:01 +00:00
<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">
2019-04-24 13:15:53 +00:00
<a href="/history.json" class="waves-effect waves-light btn"><i class="material-icons left">cloud</i> JSON-Export</a>
2019-03-09 13:35:23 +00:00
</div>
</div>
<h2>Nach Jahr</h2>
2019-04-26 17:53:01 +00:00
% my $since = get_oldest_journey_ts();
% my $now = DateTime->now(time_zone => 'Europe/Berlin');
2019-04-26 17:53:01 +00:00
% 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>
2019-04-26 17:53:01 +00:00
% 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');
2019-03-19 20:23:06 +00:00
% }