af83/chouette-core

View on GitHub
app/views/fare_providers/index.html.slim

Summary

Maintainability
Test Coverage
- breadcrumb :fare_providers, @workbench

.page_content
  .container-fluid
    .row
      .col-lg-12
    - if @fare_providers.any?
      .row
        .col-lg-12
          = table_builder_2 @fare_providers,
            [ \
              TableBuilderHelper::Column.new( \
                key: :name, \
                attribute: :name, \
                link_to: -> (fare_provider) { workbench_fare_provider_path(@workbench, fare_provider) } \
                            ), \
              TableBuilderHelper::Column.new( \
                key: :short_name, \
                attribute: :short_name, \
                link_to: -> (fare_provider) { workbench_fare_provider_path(@workbench, fare_provider) } \
                            ), \
              TableBuilderHelper::Column.new( \
                key: :workbench, \
                attribute: Proc.new { |fare_provider| fare_provider.workbench.name }, \
              ), \
            ].compact,
            cls: 'table has-filter has-search'

          / = new_pagination @fare_providers, 'pull-right'

    - unless @fare_providers.any?
      .row.mt-xs
        .col-lg-12
          = replacement_msg t('fare_providers.search_no_results')