diff options
| author | Zog | 2018-02-22 09:57:27 +0100 |
|---|---|---|
| committer | Zog | 2018-02-22 09:57:27 +0100 |
| commit | 3221693f6f4a7b99db0f68beb46bb5d3626af86c (patch) | |
| tree | edd834875c030de75401eb980bb68a0241410ace /app | |
| parent | 91d683f6ad7a818312e9dc37b88eccd916e3b4d0 (diff) | |
| download | chouette-core-3221693f6f4a7b99db0f68beb46bb5d3626af86c.tar.bz2 | |
Refs #5995; Add extra columns on ReferentialVJs#index when filtered by stops
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/referential_vehicle_journeys/index.html.slim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/views/referential_vehicle_journeys/index.html.slim b/app/views/referential_vehicle_journeys/index.html.slim index 04c01cc12..1adcfae36 100644 --- a/app/views/referential_vehicle_journeys/index.html.slim +++ b/app/views/referential_vehicle_journeys/index.html.slim @@ -40,14 +40,19 @@ TableBuilderHelper::Column.new( \ key: :departure_time, \ attribute: Proc.new {|v| v.vehicle_journey_at_stops.first&.departure }, \ - sortable: false, \ - name: @starting_stop&.name, \ + sortable: false \ ), \ + [@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 }, \ + 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, \ ), \ ].flatten.compact, cls: 'table has-filter has-search' |
