diff options
| author | Robert | 2017-11-09 18:16:41 +0100 | 
|---|---|---|
| committer | Robert | 2017-11-17 14:56:29 +0100 | 
| commit | 3fba11d14fb032802ea70240e4b204e93fe5a277 (patch) | |
| tree | 49e1dfe5993a7bf9c8c863b79399e4e887eab753 /app/views | |
| parent | 76d11c7f973867e305d6841f69c62c5fd37d65a7 (diff) | |
| download | chouette-core-3fba11d14fb032802ea70240e4b204e93fe5a277.tar.bz2 | |
Refs: #4823@4h; Fixed Transport(Sub)mode validation bug
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/compliance_check_sets/show.html.slim | 49 | ||||
| -rw-r--r-- | app/views/lines/_filters.html.slim | 4 | 
2 files changed, 41 insertions, 12 deletions
| diff --git a/app/views/compliance_check_sets/show.html.slim b/app/views/compliance_check_sets/show.html.slim index 4052707da..d02adc6b8 100644 --- a/app/views/compliance_check_sets/show.html.slim +++ b/app/views/compliance_check_sets/show.html.slim @@ -17,15 +17,51 @@          h2            = render '/compliance_checks/filters' -      - if @direct_compliance_checks.try(:any?) +        - if @direct_compliance_checks.try(:any?) +          .row +            .col-lg-12 +              h2 +                = transport_mode_text() +          .row +            .col-lg-12 +              .select_table +                = table_builder_2 @direct_compliance_checks, +                        [ \ +                    TableBuilderHelper::Column.new( \ +                      key: :code, \ +                      attribute: 'code' \ +                    ), \ +                    TableBuilderHelper::Column.new( \ +                      key: :name, \ +                      attribute: 'name', \ +                      link_to: lambda do |compliance_check| \ +                          compliance_check_path(compliance_check) \ +                        end \ +                    ), \ +                    TableBuilderHelper::Column.new( \ +                      key: :criticity, \ +                      attribute: 'criticity' \ +                    ), \ +                    TableBuilderHelper::Column.new( \ +                      key: :comment, \ +                      attribute: 'comment' \ +                    ), \ +                  ], +                  sortable: true, +                  cls: 'table has-filter has-search', +                  model: ComplianceCheck +                 +    - @compliance_checks.each do |block, compliance_checks| + +      - if compliance_checks.try(:any?)          .row            .col-lg-12              h2 -              = transport_mode_text() +              = transport_mode_text(block)          .row            .col-lg-12              .select_table -              = table_builder_2 @direct_compliance_checks, +              = table_builder_2 compliance_checks,                        [ \                    TableBuilderHelper::Column.new( \                      key: :code, \ @@ -50,11 +86,4 @@                  sortable: true,                  cls: 'table has-filter has-search',                  model: ComplianceCheck -                 -    - @compliance_checks.each do |block, compliance_checks| -      - if compliance_checks.try(:any?) -        .row -          .col-lg-12 -            h2 -              = transport_mode_text(block) diff --git a/app/views/lines/_filters.html.slim b/app/views/lines/_filters.html.slim index 7662c41b5..58f8f2431 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: 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'} +      = f.input :transport_mode_eq_any, collection: StifTransportModeEnumerations.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: 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'} +      = f.input :transport_submode_eq_any, collection: StifTransportSubmodeEnumerations.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' | 
