add custom template and new URL for revamped "go to" page (#25765)

This commit is contained in:
Frédéric Péters 2018-09-09 17:03:03 +02:00
parent 6213d03c40
commit 1eef8d23d2
1 changed files with 6 additions and 1 deletions

7
debian/50gnm.py vendored
View File

@ -55,6 +55,10 @@ COMBO_PUBLIC_TEMPLATES.update({
"name": u"Lieu",
"template": "combo/page_template_place.html",
},
"goto": {
"name": u"M'y rendre",
"template": "combo/page_template_goto.html",
},
})
JSON_CELL_TYPES = {
@ -269,10 +273,11 @@ JSON_CELL_TYPES = {
]
},
"goto": {
"url": "http://preprod.tsvc.optimod2.cityway.fr:80/api/journeyplanner/opt/PlanTrips/json?DepartureType=COORDINATES&DepartureLatitude=[lat1]&DepartureLongitude=[lng1]&ArrivalType=COORDINATES&ArrivalLatitude=[lat2]&ArrivalLongitude=[lng2]&Date=[date]&DateType=DEPARTURE&TripModes=[tripmode]&Algorithm=FASTEST&BikeSecurityLevel=None&BikeSpeed=12&WalkSpeed=4&MaxCarDistance=100&MaxBikeDistance=100&MaxWalkDistance=3000&AvoidDisruptions=1&StopToPlaceCar=1&user_key=1fd5db9effbb01c36424ef76463cdda0",
"url": "{% if lat1 %}http://preprod.tsvc.optimod2.cityway.fr:80/api/journeyplanner/opt/PlanTrips/json?DepartureType=COORDINATES&DepartureLatitude={{lat1}}&DepartureLongitude={{lng1}}&ArrivalType=COORDINATES&ArrivalLatitude={{lat2}}&ArrivalLongitude={{lng2}}&Date={{date}}&DateType=DEPARTURE&TripModes={{tripmode}}&Algorithm=FASTEST&BikeSecurityLevel=None&BikeSpeed=12&WalkSpeed=4&MaxCarDistance=100&MaxBikeDistance=100&MaxWalkDistance=3000&AvoidDisruptions=1&StopToPlaceCar=1&user_key=1fd5db9effbb01c36424ef76463cdda0{% endif %}",
"cache_duration": 60,
"force_async": False,
"name": u"M'y rendre",
"loading-message": u'Calcul…',
"varnames": ["lat1", "lng1", "lat2", "lng2", "date", "to"],
"form": [
{