af83/chouette-core

View on GitHub
app/views/stop_area_referentials/show.html.slim

Summary

Maintainability
Test Coverage
- breadcrumb :stop_area_referential, @workbench
- content_for :page_header_title, StopAreaReferential.ts.capitalize

.page_content.stop_area_referential_show
  .container-fluid
    .row
      .col-sm-4.col-xs-12
        .panel.panel-default
          .panel-heading
            h3.panel-title.with_actions
              div
                = link_to Chouette::StopArea.t, workbench_stop_area_referential_stop_areas_path(@workbench)
                span.badge.ml-xs =  @stop_area_referential.stop_areas.count
              div
                = link_to '', workbench_stop_area_referential_stop_areas_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('workbenches.index.offers.see')
          .list-group
            - @stop_area_referential.stop_areas.order("updated_at desc").limit(5).each do |stop_area|
              .list-group-item
                = link_to stop_area.name, workbench_stop_area_referential_stop_area_path(@workbench, stop_area)
                =< t('date.updated', distance_in_time: time_ago_in_words(stop_area.updated_at))
            - unless @stop_area_referential.stop_areas.any?
              = replacement_msg t('no_result_text')

      .col-sm-offset-1.col-sm-4.col-xs-12
        .panel.panel-default
          .panel-heading
            h3.panel-title.with_actions
              div
                = link_to StopAreaProvider.t, workbench_stop_area_referential_stop_area_providers_path(@workbench)
                span.badge.ml-xs =  @stop_area_referential.stop_area_providers.count
              div
                = link_to '', workbench_stop_area_referential_stop_area_providers_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('workbenches.index.offers.see')
          .list-group
            - @stop_area_referential.stop_area_providers.order("updated_at desc").limit(5).each do |stop_area_provider|
              .list-group-item
                = link_to stop_area_provider.name, workbench_stop_area_referential_stop_area_provider_path(@workbench, stop_area_provider)
                =< t('date.updated', distance_in_time: time_ago_in_words(stop_area_provider.updated_at))
            - unless @stop_area_referential.stop_area_providers.any?
              = replacement_msg t('no_result_text')

    .row
      .col-sm-4.col-xs-12
        .panel.panel-default
          .panel-heading
            h3.panel-title.with_actions
              div
                = link_to Chouette::ConnectionLink.t, workbench_stop_area_referential_connection_links_path(@workbench)
                span.badge.ml-xs =  @stop_area_referential.connection_links.count
              div
                = link_to '', workbench_stop_area_referential_connection_links_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('workbenches.index.offers.see')
          .list-group
            - @connection_links.each do |connection_link|
              .list-group-item
                = link_to connection_link.name, workbench_stop_area_referential_connection_link_path(@workbench, connection_link)
                =< t('date.updated', distance_in_time: time_ago_in_words(connection_link.updated_at))
            - unless @stop_area_referential.connection_links.any?
              = replacement_msg t('no_result_text')

      .col-sm-offset-1.col-sm-4.col-xs-12
        .panel.panel-default
          .panel-heading
            h3.panel-title.with_actions
              div
                = link_to StopAreaRoutingConstraint.t, workbench_stop_area_referential_stop_area_routing_constraints_path(@workbench)
                span.badge.ml-xs =  @stop_area_referential.stop_area_routing_constraints.count
              div
                = link_to '', workbench_stop_area_referential_stop_area_routing_constraints_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('workbenches.index.offers.see')
          .list-group
            - @stop_area_referential.stop_area_routing_constraints.order("updated_at desc").limit(5).each do |constraint|
              .list-group-item
                = link_to constraint.name, workbench_stop_area_referential_stop_area_routing_constraint_path(@workbench, constraint)
                =< t('date.updated', distance_in_time: time_ago_in_words(constraint.updated_at))
            - unless @stop_area_referential.stop_area_routing_constraints.any?
              = replacement_msg t('no_result_text')
    .row
      .col-sm-4.col-xs-12
        .panel.panel-default
          .panel-heading
            h3.panel-title.with_actions
              div
                = link_to Entrance.t, workbench_stop_area_referential_entrances_path(@workbench)
                span.badge.ml-xs =  @stop_area_referential.entrances.count
              div
                = link_to '', workbench_stop_area_referential_entrances_path(@workbench), class: ' fa fa-chevron-right pull-right', title: t('workbenches.index.offers.see')
          .list-group
            - @stop_area_referential.entrances.order("updated_at desc").limit(5).each do |entrance|
              .list-group-item
                = link_to entrance.name, workbench_stop_area_referential_entrance_path(@workbench, entrance)
                =< t('date.updated', distance_in_time: time_ago_in_words(entrance.updated_at))
            - unless @stop_area_referential.entrances.any?
              = replacement_msg t('no_result_text')