diff options
| author | cedricnjanga | 2017-10-04 23:20:41 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-10-04 23:23:00 +0200 |
| commit | 9a642d186ec8ca9016dba59d925c1bdb079eb23f (patch) | |
| tree | 180007030010d0fdea1b52a7149d53b9ecd27410 /app/views | |
| parent | 458b841fbeed0fee9a1f6db981c3b18f47a84905 (diff) | |
| download | chouette-core-9a642d186ec8ca9016dba59d925c1bdb079eb23f.tar.bz2 | |
Refs 4517 Add some modification to the two modules to add methods to list the sorted transport modes and submodes
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/compliance_control_blocks/_form.html.slim | 4 | ||||
| -rw-r--r-- | app/views/lines/_filters.html.slim | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/compliance_control_blocks/_form.html.slim b/app/views/compliance_control_blocks/_form.html.slim index 88fa7e98b..2e87a877e 100644 --- a/app/views/compliance_control_blocks/_form.html.slim +++ b/app/views/compliance_control_blocks/_form.html.slim @@ -2,8 +2,8 @@ .row .col-lg-12 .form-group - = f.input :transport_mode, as: :select, collection: ComplianceControlBlock.transport_modes, label: t('activerecord.attributes.compliance_control_blocks.transport_mode') - = f.input :transport_submode, as: :select, collection: ComplianceControlBlock.transport_submodes, label: t('activerecord.attributes.compliance_control_blocks.transport_submode') + = f.input :transport_mode, as: :select, collection: ComplianceControlBlock.sorted_transport_modes, label: t('activerecord.attributes.compliance_control_blocks.transport_mode'), label_method: lambda {|t| ("<span>" + t("enumerize.transport_mode.#{t}") + "</span>").html_safe } + = f.input :transport_submode, as: :select, collection: ComplianceControlBlock.sorted_transport_submodes, label: t('activerecord.attributes.compliance_control_blocks.transport_submode'), label_method: lambda {|t| ("<span>" + t("enumerize.transport_submode.#{t}") + "</span>").html_safe } .separator diff --git a/app/views/lines/_filters.html.slim b/app/views/lines/_filters.html.slim index 01c2da58f..7662c41b5 100644 --- a/app/views/lines/_filters.html.slim +++ b/app/views/lines/_filters.html.slim @@ -17,11 +17,11 @@ .form-group.togglable = f.label Chouette::Line.human_attribute_name(:transport_mode), required: false, class: 'control-label' - = f.input :transport_mode_eq_any, collection: sorted_transport_mode, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + t("enumerize.transport_mode.#{l}") + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} + = f.input :transport_mode_eq_any, collection: Chouette::Line.sorted_transport_modes, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + t("enumerize.transport_mode.#{l}") + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} .form-group.togglable = f.label Chouette::Line.human_attribute_name(:transport_submode), required: false, class: 'control-label' - = f.input :transport_submode_eq_any, collection: sorted_transport_submode, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + t("enumerize.transport_submode.#{l}") + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} + = f.input :transport_submode_eq_any, collection: Chouette::Line.sorted_transport_submodes, as: :check_boxes, label: false, label_method: lambda{|l| ("<span>" + t("enumerize.transport_submode.#{l}") + "</span>").html_safe}, required: false, wrapper_html: { class: 'checkbox_list'} .actions = link_to 'Effacer', @workbench, class: 'btn btn-link' |
