aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2018-02-22 11:17:20 +0100
committerGitHub2018-02-22 11:17:20 +0100
commit3c4f295c8b02c154bbe68268a25fd41edb055548 (patch)
tree994e45a29fa726c5925c89a619b12ae2bf541b65
parent1e137b3347660e8cea9d5c154111ef368fc60609 (diff)
parentb65ccdfd2375097fd969b1c7d7bad9401d55644f (diff)
downloadchouette-core-3c4f295c8b02c154bbe68268a25fd41edb055548.tar.bz2
Merge pull request #329 from af83/5995-update-display-on-vjs-index
Change ReferentialVJs#index when filtered by stops. Refs #5995. Refs #5996. Refs #5852
-rw-r--r--app/views/referential_vehicle_journeys/index.html.slim17
1 files changed, 11 insertions, 6 deletions
diff --git a/app/views/referential_vehicle_journeys/index.html.slim b/app/views/referential_vehicle_journeys/index.html.slim
index 04c01cc12..00f63cb65 100644
--- a/app/views/referential_vehicle_journeys/index.html.slim
+++ b/app/views/referential_vehicle_journeys/index.html.slim
@@ -39,15 +39,20 @@
), \
TableBuilderHelper::Column.new( \
key: :departure_time, \
- attribute: Proc.new {|v| v.vehicle_journey_at_stops.first&.departure }, \
- sortable: false, \
- name: @starting_stop&.name, \
+ attribute: Proc.new {|v| v.vehicle_journey_at_stops.first&.departure_local }, \
+ sortable: true \
), \
+ [@starting_stop, @ending_stop].compact.map{|stop| \
+ TableBuilderHelper::Column.new( \
+ attribute: Proc.new {|v| v.vehicle_journey_at_stops.where("stop_points.stop_area_id" => stop.id).last&.arrival_local }, \
+ sortable: false, \
+ name: stop.name \
+ )\
+ }, \
TableBuilderHelper::Column.new( \
key: :arrival_time, \
- attribute: Proc.new {|v| v.vehicle_journey_at_stops.last&.arrival }, \
- sortable: false, \
- name: @ending_stop&.name, \
+ attribute: Proc.new {|v| v.vehicle_journey_at_stops.last&.arrival_local }, \
+ sortable: true, \
), \
].flatten.compact,
cls: 'table has-filter has-search'