diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-21 15:46:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-21 15:46:19 +0200 |
commit | 78b2d995ef32b60cfbde086953c5069e327e08a5 (patch) | |
tree | 35aec7e711a9876642652bc820a3c4883700482e /templates/journey.html.ep | |
parent | 24d0943cdc3f50ac1063b6fb8308ce21d940c67d (diff) |
Ignore stations without coordinates in distance calculation
Reported by @marudor
Diffstat (limited to 'templates/journey.html.ep')
-rw-r--r-- | templates/journey.html.ep | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 07c53c1..47c85f0 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -89,19 +89,35 @@ <tr> <th scope="row">Entfernung</th> <td> + % if ($journey->{skip_route}) { + <i class="material-icons right">gps_off</i> + <%= numify_skipped_stations($journey->{skip_route}) %><br/> + % } % if ($journey->{km_route} > 0.1) { ca. <%= sprintf('%.f', $journey->{km_route}) %> km + (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) + % } + % else { + ? % } - (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) </td> </tr> <tr> <th scope="row">Geschwindigkeit</th> <td> - ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h - (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) - % if ($journey->{edited} & 0x0303) { - ∗ + % if ($journey->{skip_route}) { + <i class="material-icons right">gps_off</i> + <%= numify_skipped_stations($journey->{skip_route}) %><br/> + % } + % if ($journey->{km_route} > 0.1 and $journey->{kmh_route} > 0.01) { + ∅ <%= sprintf('%.f', $journey->{kmh_route}) %> km/h + (<%= sprintf('%.f', $journey->{kmh_beeline}) %> km/h) + % if ($journey->{edited} & 0x0303) { + ∗ + % } + % } + % else { + ? % } </td> </tr> |