aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume2017-10-11 16:21:53 +0200
committerGuillaume2017-10-11 16:21:53 +0200
commitfdee4467f9e727d9a0c3c13672ebb85c6e31225f (patch)
tree9cf6c4e6e0cd1dfa0ac284a3779fac509899273e
parentd5233b96fb66546b9f43fc2b2a1678db5c890822 (diff)
parent7978e995081c8302351629a2a1e489670708a131 (diff)
downloadchouette-core-fdee4467f9e727d9a0c3c13672ebb85c6e31225f.tar.bz2
Merge branch 'master' of https://github.com/af83/stif-boiv
-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