af83/chouette-core

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

Summary

Maintainability
Test Coverage
- breadcrumb :networks, @workbench

.page_content
  .container-fluid
    .row
      .col-lg-12
        = render 'filters'
    - if @networks.any?
      .row
        .col-lg-12
          = table_builder_2 @networks,
            [ \
              TableBuilderHelper::Column.new( \
                name: 'ID', \
                attribute: Proc.new { |n| n.try(:get_objectid).try(:short_id) }, \
                sortable: false \
              ),
              TableBuilderHelper::Column.new( \
                key: :name, \
                attribute: 'name', \
                link_to: lambda do |network| \
                  workbench_line_referential_network_path(@workbench, network) \
                end \
              ), \
            ],
            links: [:show],
            cls: 'table has-search'

          = new_pagination @networks, 'pull-right'

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