feat: add per-trip use_gpx and autoconnect toggles
Adds two configurable toggles to the trip blueprint (Admin2 Trip tab): - use_gpx: show/hide GPX tracks on all maps (default: enabled) - autoconnect: draw connector lines between markers (default: enabled) When use_gpx is off, GPX files are not fetched or rendered on any map (home, map, trip, dailies). The stats panel in trip.html.twig still reads GPX_URLS directly and is unaffected. When autoconnect is off, buildJourneySegments suppresses all auto-connectors; only entries with force_connect:true still draw a line — making force_connect behaviour independent of both settings. Also refactors the inline Promise.all in trip.html.twig to use the shared renderGpxJourney utility (reducing duplication). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
This commit is contained in:
@@ -55,6 +55,30 @@ form:
|
||||
placeholder: '6 weeks from Venice to Sicily by train'
|
||||
help: 'Short description shown on homepage highlight cards'
|
||||
|
||||
header.use_gpx:
|
||||
type: toggle
|
||||
label: Show GPX tracks
|
||||
help: 'Display GPX route files on the map'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: 'Yes'
|
||||
0: 'No'
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
header.autoconnect:
|
||||
type: toggle
|
||||
label: Connect markers
|
||||
help: 'Draw connector lines between location markers (suppressed where GPX covers the route)'
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: 'Yes'
|
||||
0: 'No'
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
publishing:
|
||||
type: tab
|
||||
title: Publishing
|
||||
|
||||
Reference in New Issue
Block a user