af83/chouette-core

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

Summary

Maintainability
Test Coverage
- breadcrumb :stop_area_providers, @workbench

.page_content
  .container-fluid
    .row
      .col-lg-12
        = render 'filters'
    - if @stop_area_providers.any?
      .row
        .col-lg-12
          = table_builder_2 @stop_area_providers,
            [ \
              TableBuilderHelper::Column.new( \
                name: t('id_reflex'), \
                attribute: Proc.new { |n| n.get_objectid.try(:short_id) }, \
                sortable: false \
              ), \
              TableBuilderHelper::Column.new( \
                key: :name, \
                attribute: 'name', \
                link_to: lambda do |stop_area_provider| \
                  workbench_stop_area_referential_stop_area_provider_path( \
                    @workbench, \
                    stop_area_provider \
                  ) \
                end \
              ), \
              TableBuilderHelper::Column.new( \
                key: :workbench, \
                attribute: Proc.new { |provider| provider.workbench.name }, \
              ), \
            ],\
            cls: 'table has-filter has-search'

          = new_pagination @stop_area_providers, 'pull-right'

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