Split return date nav into separate outbound/return rows; show earlier tube option on inbound
For return journeys, replace the single combined date navigation row with two separate rows so outbound and return dates can be adjusted independently. For inbound underground options, show one service before the earliest catchable (as an "aim for this" option) rather than the next service after it, which often arrived too late to connect with the GWR train. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1407cb8246
commit
a859b96a23
6 changed files with 82 additions and 22 deletions
30
app.py
30
app.py
|
|
@ -681,6 +681,32 @@ def _results(station_crs, slug, travel_date, journey_type, return_date):
|
|||
next_date,
|
||||
**{**common_url_args, "return_date": next_return_date},
|
||||
)
|
||||
prev_outbound_url = _results_url(
|
||||
station_crs, slug, prev_date, **common_url_args
|
||||
)
|
||||
next_outbound_url = _results_url(
|
||||
station_crs, slug, next_date, **common_url_args
|
||||
)
|
||||
prev_return_url = (
|
||||
_results_url(
|
||||
station_crs,
|
||||
slug,
|
||||
travel_date,
|
||||
**{**common_url_args, "return_date": prev_return_date},
|
||||
)
|
||||
if return_date
|
||||
else None
|
||||
)
|
||||
next_return_url = (
|
||||
_results_url(
|
||||
station_crs,
|
||||
slug,
|
||||
travel_date,
|
||||
**{**common_url_args, "return_date": next_return_date},
|
||||
)
|
||||
if return_date
|
||||
else None
|
||||
)
|
||||
destination_links = [
|
||||
(
|
||||
destination_slug,
|
||||
|
|
@ -775,6 +801,10 @@ def _results(station_crs, slug, travel_date, journey_type, return_date):
|
|||
next_date=next_date,
|
||||
prev_results_url=prev_results_url,
|
||||
next_results_url=next_results_url,
|
||||
prev_outbound_url=prev_outbound_url,
|
||||
next_outbound_url=next_outbound_url,
|
||||
prev_return_url=prev_return_url,
|
||||
next_return_url=next_return_url,
|
||||
destination_links=destination_links,
|
||||
results_base_url=results_base_url,
|
||||
travel_date_display=travel_date_display,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue