aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/routing_constraint_zones/show.html.slim
blob: 2d444fe90366c1a3701ef97576b5ecd237ae475f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- breadcrumb :routing_constraint_zone, @referential, @line, @routing_constraint_zone
- page_header_content_for @routing_constraint_zone

.page_content
  .container-fluid
    .row
      .col-lg-6.col-md-6.col-sm-12.col-xs-12
        = definition_list t('metadatas'),
          { @routing_constraint_zone.human_attribute_name(:name) => @routing_constraint_zone.try(:name),
            @routing_constraint_zone.human_attribute_name(:route) => link_to(@routing_constraint_zone.try(:route_name), [@referential, @line, @routing_constraint_zone.route]),
            @routing_constraint_zone.human_attribute_name(:line) => link_to(@line.name, [@referential, @line]),
            @routing_constraint_zone.human_attribute_name(:checksum) => @routing_constraint_zone.checksum}

    .row
      .col-lg-12
        = table_builder_2 @routing_constraint_zone.route.stop_points,
          [ \
            TableBuilderHelper::Column.new( \
              name: t('.route_stop_points'), \
              attribute: 'name', \
              link_to: lambda do |stop_point| \
                stop_area_referential_stop_area_path(stop_point.stop_area.stop_area_referential, stop_point.stop_area) \
              end \
            ),
            TableBuilderHelper::Column.new( \
              name: t('.stop_points'), \
              attribute: Proc.new{ |rsp| (@routing_constraint_zone.stop_point_ids.include? rsp.id) ? t('yes') : t('no') } \
            ) \
          ],
          sortable: false,
          cls: 'table has-stoppoints'