af83/chouette-core

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

Summary

Maintainability
Test Coverage
- breadcrumb :line_providers, @workbench

.page_content
  .container-fluid
    - if @line_providers.any?
      .row
        .col-lg-12
          = table_builder_2 @line_providers,
            [ \
              TableBuilderHelper::Column.new( \
                key: :name, \
                attribute: :name, \
                link_to: lambda do |line_provider| \
                  workbench_line_referential_line_provider_path( \
                    @workbench, \
                    line_provider \
                  ) \
                end \
              ), \
              TableBuilderHelper::Column.new( \
                key: :short_name, \
                attribute: :short_name, \
                link_to: lambda do |line_provider| \
                  workbench_line_referential_line_provider_path( \
                    @workbench, \
                    line_provider \
                  ) \
                end \
              ), \
              TableBuilderHelper::Column.new( \
                key: :workbench, \
                attribute: Proc.new { |provider| provider.workbench.name }, \
              ), \
            ],\
            cls: 'table has-filter has-search'

          = new_pagination @line_providers, 'pull-right'

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