af83/chouette-core

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

Summary

Maintainability
Test Coverage
- breadcrumb :journey_patterns, @workbench, @referential, @route
- page_header_content_for @route
- content_for :page_header_resource_name, Chouette::JourneyPattern.ts.pluralize.capitalize, flush: true
- content_for :page_header_title, t('journey_patterns.index.title', route: @route.name), flush: true

- @journey_patterns.each do |jp|
  - jp.errors.each do |error_message|
    = error_message

/ PageContent
.page_content
  .container-fluid
    .row
      .col-xs-12
        #journey_patterns
    .row
      .col-xs-12

= javascript_tag do
  | window.stopPoints = #{(@stop_points_list.to_json).html_safe};
  | window.journeyPatternLength = #{@journey_patterns.total_entries()};
  | window.journeyPatternsPerPage = #{@ppage};
  | window.perms = #{raw @perms};
  | window.features = #{raw @features};
  | window.routeCostsUrl = "#{costs_workbench_referential_line_route_url(@workbench, @referential, @route.line, @route, format: :json).html_safe}";
  | window.custom_fields = #{(@custom_fields.to_json).html_safe};
  | window.route = "#{URI.escape(route_json_for_edit(@route, serialize: true))}";
  | window.lineColor = "#{@route.line.color_hex}";
  | window.shape_url = "#{workbench_shape_referential_shapes_path(@workbench)}";
  | window.shapes_url = "#{shapes_workgroup_autocomplete_index_path(@referential.workgroup)}";