From a8dd564d1979aee43000efc1f2aab4ba17f5f990 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 22 Aug 2025 19:00:51 +0200 Subject: journey: polylines can be downloaded if polylines or route data is available polylines _cannot_ be uploaded if proper route data is unavailable (i.e., route stops do not have ID / lat,lon data) --- templates/journey.html.ep | 66 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'templates/journey.html.ep') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 8a12ed5..95764eb 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -350,12 +350,12 @@ % } -

<%= L('journey.map-data') %> - % if ($journey->{edited} & 0x0040) { - ∗ - % } -

- % if ($journey->{polyline}) { + % if ($journey->{polyline} or $journey->{km_route} > 0.1) { +

<%= L('journey.map-data') %> + % if ($journey->{edited} & 0x0040) { + ∗ + % } +

- % } -
-
- % if ($journey->{polyline}) { - %= L('journey.map.info.download') - % } - %= L('journey.map.info.upload') -
-
- %= form_for '/polyline/set' => (method => 'post', enctype => 'multipart/form-data') => begin - %= csrf_field - %= hidden_field id => $journey->{id}
-
-
- file_upload GPX - -
-
- + %= L('journey.map.info.download') + %= L('journey.map.info.upload') +
+
+ %= form_for '/polyline/set' => (method => 'post', enctype => 'multipart/form-data') => begin + %= csrf_field + %= hidden_field id => $journey->{id} +
+
+
+
+ file_upload GPX + +
+
+ +
+ %= file_field 'file'
- %= file_field 'file' +
+
+ %= submit_button L('journey.map.upload-full'), class => 'waves-effect waves-light btn', name => 'upload-full' +
+
+ %= submit_button L('journey.map.upload-partial'), class => 'waves-effect waves-light btn', name => 'upload-partial'
-
- %= submit_button L('journey.map.upload-full'), class => 'waves-effect waves-light btn', name => 'upload-full' -
-
- %= submit_button L('journey.map.upload-partial'), class => 'waves-effect waves-light btn', name => 'upload-partial' -
-
- %= end + %= end + % }

<%= L('journey.danger') %>

-- cgit v1.2.3