diff options
| author | cedricnjanga | 2017-11-23 17:23:54 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-11-23 17:23:54 +0100 |
| commit | 5b9351272ec0f02c2c76fd8b3168cbbc6acdedff (patch) | |
| tree | a8939409f2bc7af9fcc6a71189a35e5297e00144 | |
| parent | 0a9b5cd19dc52e00c9516e2a4cf204580d889862 (diff) | |
| parent | 84ec338abe9fe09caed3edc62784235963463311 (diff) | |
| download | chouette-core-5b9351272ec0f02c2c76fd8b3168cbbc6acdedff.tar.bz2 | |
Stay up to date with master branch
| -rw-r--r-- | app/models/chouette/vehicle_journey.rb | 2 | ||||
| -rw-r--r-- | app/models/concerns/stif_transport_mode_enumerations.rb | 15 | ||||
| -rw-r--r-- | app/models/concerns/stif_transport_submode_enumerations.rb | 15 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/show.html.slim | 13 |
4 files changed, 22 insertions, 23 deletions
diff --git a/app/models/chouette/vehicle_journey.rb b/app/models/chouette/vehicle_journey.rb index c8754e958..329b37a6c 100644 --- a/app/models/chouette/vehicle_journey.rb +++ b/app/models/chouette/vehicle_journey.rb @@ -3,7 +3,7 @@ module Chouette include ChecksumSupport include VehicleJourneyRestrictions include ObjectidSupport - extend StifTransportModeEnumerations + include StifTransportModeEnumerations # FIXME http://jira.codehaus.org/browse/JRUBY-6358 self.primary_key = "id" diff --git a/app/models/concerns/stif_transport_mode_enumerations.rb b/app/models/concerns/stif_transport_mode_enumerations.rb index 74621dfc5..7c72d5468 100644 --- a/app/models/concerns/stif_transport_mode_enumerations.rb +++ b/app/models/concerns/stif_transport_mode_enumerations.rb @@ -1,5 +1,15 @@ module StifTransportModeEnumerations extend ActiveSupport::Concern + + included do + extend Enumerize + enumerize :transport_mode, in: StifTransportModeEnumerations.transport_modes + end + + module ClassMethods + def transport_modes; StifTransportModeEnumerations.transport_modes end + def sorted_transport_modes; StifTransportModeEnumerations.sorted_transport_modes end + end class << self def transport_modes @@ -9,10 +19,5 @@ module StifTransportModeEnumerations transport_modes.sort_by{|m| I18n.t("enumerize.transport_mode.#{m}").parameterize } end end - - included do - extend Enumerize - enumerize :transport_mode, in: StifTransportModeEnumerations.transport_modes - end end diff --git a/app/models/concerns/stif_transport_submode_enumerations.rb b/app/models/concerns/stif_transport_submode_enumerations.rb index eb3e56eac..363faadf0 100644 --- a/app/models/concerns/stif_transport_submode_enumerations.rb +++ b/app/models/concerns/stif_transport_submode_enumerations.rb @@ -1,6 +1,16 @@ module StifTransportSubmodeEnumerations extend ActiveSupport::Concern + included do + extend Enumerize + enumerize :transport_submode, in: StifTransportSubmodeEnumerations.transport_submodes + end + + module ClassMethods + def transport_submodes; StifTransportSubmodeEnumerations.transport_submodes end + def sorted_transport_submodes; StifTransportSubmodeEnumerations.sorted_transport_submodes end + end + class << self def transport_submodes %w( @@ -19,10 +29,5 @@ module StifTransportSubmodeEnumerations transport_submodes.sort_by{|m| I18n.t("enumerize.transport_submode.#{m}").parameterize } end end - - included do - extend Enumerize - enumerize :transport_submode, in: StifTransportSubmodeEnumerations.transport_submodes - end end diff --git a/app/views/compliance_control_sets/show.html.slim b/app/views/compliance_control_sets/show.html.slim index 71b71f842..a6e2c192a 100644 --- a/app/views/compliance_control_sets/show.html.slim +++ b/app/views/compliance_control_sets/show.html.slim @@ -108,15 +108,4 @@ cls: 'table has-filter has-search', model: ComplianceControl - .select_toolbox - ul - li.st_action.with_text - = link_to select_type_compliance_control_set_compliance_controls_path(@compliance_control_set.id) - span.fa.fa-plus - span - = t('compliance_control_sets.actions.add_compliance_control') - li.st_action.with_text - = link_to new_compliance_control_set_compliance_control_block_path(@compliance_control_set.id) - span.fa.fa-plus - span - = t('compliance_control_sets.actions.add_compliance_control_block') + = flotted_links @compliance_control_set.id |
