aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume2017-10-11 11:49:13 +0200
committerGuillaume2017-10-11 11:49:13 +0200
commit7793ca688104ee7676d88a5f8cfe793b8cd9ec24 (patch)
treea9d5ad103e2f449698bb76982d753058e6006600
parent98861e13d56403e75aa000d62880dcbc34987a37 (diff)
downloadchouette-core-7793ca688104ee7676d88a5f8cfe793b8cd9ec24.tar.bz2
update list of transport_modes and sub_modes, fix translate for transport_modes helper Refs #47064706-mofify_sub/transport_modes
-rw-r--r--app/helpers/compliance_control_blocks_helper.rb2
-rw-r--r--app/models/concerns/stif_transport_mode_enumerations.rb5
-rw-r--r--app/models/concerns/stif_transport_submode_enumerations.rb11
3 files changed, 15 insertions, 3 deletions
diff --git a/app/helpers/compliance_control_blocks_helper.rb b/app/helpers/compliance_control_blocks_helper.rb
index ccfbf4e25..09e22d6e9 100644
--- a/app/helpers/compliance_control_blocks_helper.rb
+++ b/app/helpers/compliance_control_blocks_helper.rb
@@ -1,7 +1,7 @@
module ComplianceControlBlocksHelper
def transport_mode(transport_mode, transport_submode)
if (transport_mode) && (transport_submode) != ""
- transportMode = "[" + transport_mode + "]" + "[" + transport_submode + "]"
+ transportMode = "[" + t("enumerize.transport_mode.#{transport_mode}") + "]" + "[" + t("enumerize.transport_submode.#{transport_submode}") + "]"
else
transportMode = "[Tous les modes de transport]"
end
diff --git a/app/models/concerns/stif_transport_mode_enumerations.rb b/app/models/concerns/stif_transport_mode_enumerations.rb
index 676154f73..68d481735 100644
--- a/app/models/concerns/stif_transport_mode_enumerations.rb
+++ b/app/models/concerns/stif_transport_mode_enumerations.rb
@@ -3,7 +3,10 @@ module StifTransportModeEnumerations
extend Enumerize
extend self
- enumerize :transport_mode, in: %w(air bus coach ferry metro rail trolleyBus tram water cableway funicular other)
+ enumerize :transport_mode, in: %w(bus
+ metro
+ rail
+ tram)
def transport_modes
StifTransportModeEnumerations.transport_mode.values
diff --git a/app/models/concerns/stif_transport_submode_enumerations.rb b/app/models/concerns/stif_transport_submode_enumerations.rb
index 6322b2dae..cf314badd 100644
--- a/app/models/concerns/stif_transport_submode_enumerations.rb
+++ b/app/models/concerns/stif_transport_submode_enumerations.rb
@@ -3,7 +3,16 @@ module StifTransportSubmodeEnumerations
extend Enumerize
extend self
- enumerize :transport_submode, in: %w(unknown undefined internationalFlight domesticFlight intercontinentalFlight domesticScheduledFlight shuttleFlight intercontinentalCharterFlight internationalCharterFlight roundTripCharterFlight sightseeingFlight helicopterService domesticCharterFlight SchengenAreaFlight airshipService shortHaulInternationalFlight canalBarge localBus regionalBus expressBus nightBus postBus specialNeedsBus mobilityBus mobilityBusForRegisteredDisabled sightseeingBus shuttleBus highFrequencyBus dedicatedLaneBus schoolBus schoolAndPublicServiceBus railReplacementBus demandAndResponseBus airportLinkBus internationalCoach nationalCoach shuttleCoach regionalCoach specialCoach schoolCoach sightseeingCoach touristCoach commuterCoach metro tube urbanRailway local highSpeedRail suburbanRailway regionalRail interregionalRail longDistance intermational sleeperRailService nightRail carTransportRailService touristRailway railShuttle replacementRailService specialTrain crossCountryRail rackAndPinionRailway cityTram localTram regionalTram sightseeingTram shuttleTram trainTram internationalCarFerry nationalCarFerry regionalCarFerry localCarFerry internationalPassengerFerry nationalPassengerFerry regionalPassengerFerry localPassengerFerry postBoat trainFerry roadFerryLink airportBoatLink highSpeedVehicleService highSpeedPassengerService sightseeingService schoolBoat cableFerry riverBus scheduledFerry shuttleFerryService telecabin cableCar lift chairLift dragLift telecabinLink funicular streetCableCar allFunicularServices undefinedFunicular)
+ enumerize :transport_submode, in: %w(demandAndResponseBus
+ nightBus
+ airportLinkBus
+ highFrequencyBus
+ expressBus
+ railShuttle
+ suburbanRailway
+ regionalRail
+ interregionalRail
+)
def transport_submodes
StifTransportSubmodeEnumerations.transport_submode.values