history: add map link for monthly history
This commit is contained in:
parent
581963a87e
commit
6659d76101
2 changed files with 15 additions and 7 deletions
|
@ -1644,13 +1644,15 @@ sub monthly_history {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
any => {
|
any => {
|
||||||
template => 'history_by_month',
|
template => 'history_by_month',
|
||||||
title => "travelynx: $month_name $year",
|
title => "travelynx: $month_name $year",
|
||||||
journeys => [@journeys],
|
journeys => [@journeys],
|
||||||
year => $year,
|
year => $year,
|
||||||
month => $month,
|
month => $month,
|
||||||
month_name => $month_name,
|
month_name => $month_name,
|
||||||
statistics => $stats
|
filter_from => $interval_start,
|
||||||
|
filter_to => $interval_end->clone->subtract( days => 1 ),
|
||||||
|
statistics => $stats
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
%= include '_history_stats', stats => stash('statistics');
|
%= include '_history_stats', stats => stash('statistics');
|
||||||
% }
|
% }
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m12 l12 center-align">
|
||||||
|
<a href="/history/map?filter_from=<%= $filter_from->strftime('%d.%m.%Y') %>&filter_to=<%= $filter_to->strftime('%d.%m.%Y') %>" class="waves-effect waves-light btn"><i class="material-icons left" aria-hidden="true">map</i> Karte</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
% if (stash('journeys')) {
|
% if (stash('journeys')) {
|
||||||
%= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys');
|
%= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys');
|
||||||
% }
|
% }
|
||||||
|
|
Loading…
Reference in a new issue