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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
- breadcrumb :route, @referential, @route
- page_header_content_for @route
.page_content
.container-fluid
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
{ t('objectid') => @route.get_objectid.short_id,
t('activerecord.attributes.route.published_name') => (@route.published_name ? @route.published_name : '-'),
@route.human_attribute_name(:wayback) => (@route.wayback ? @route.wayback_text : '-' ),
@route.human_attribute_name(:opposite_route) => (@route.opposite_route ? @route.opposite_route.name : '-'),
@route.human_attribute_name(:checksum) => @route.checksum }
- if @route_sp.any?
.col-lg-6.col-md-6.col-sm-12.col-xs-12
#route_map.map.mb-lg
.row
.col-lg-12
.h3 = t('routes.show.stop_areas.title')
- if @route_sp.any?
= table_builder_2 @route_sp,
[ \
TableBuilderHelper::Column.new( \
name: t('id_reflex'), \
attribute: Proc.new { |s| s.try(:stop_area).try(:user_objectid) } \
), \
TableBuilderHelper::Column.new( \
key: :name, \
attribute: Proc.new { |s| content_tag :span, s.stop_area&.name, class: s.stop_area&.area_type }, \
link_to: lambda do |stop_point| \
stop_area_referential_stop_area_path(stop_point.stop_area.referential, stop_point.stop_area) \
end \
), \
TableBuilderHelper::Column.new( \
key: :status, \
name: Chouette::StopArea.tmf('status'), \
attribute: Proc.new { |s| stop_area_status(s.try(:stop_area).try(:status) ) } \
), \
TableBuilderHelper::Column.new( \
key: :zip_code, \
attribute: Proc.new { |s| s.try(:stop_area).try(:zip_code) } \
), \
TableBuilderHelper::Column.new( \
key: :city_name, \
attribute: Proc.new { |s| s.try(:stop_area).try(:city_name) } \
), \
TableBuilderHelper::Column.new( \
key: :for_boarding, \
attribute: Proc.new { |s| t("stop_points.stop_point.for_boarding.#{s.for_boarding}") } \
), \
TableBuilderHelper::Column.new( \
key: :for_alighting, \
attribute: Proc.new { |s| t("stop_points.stop_point.for_alighting.#{s.for_alighting}") } \
) \
],
sortable: false,
cls: 'table has-stoppoints',
action: :index
- else
= replacement_msg t('stop_areas.filters.search_no_results')
= javascript_tag do
| window.route = "#{URI.escape(route_json_for_edit(@route))}"
= javascript_pack_tag 'routes/show.js'
|