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
|
/ PageHeader
= pageheader 'map-marker',
@route.name,
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@route.updated_at, format: :short)),
(policy(@route).edit? ? link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), class: 'btn btn-default') : '') do
/ Below is secundary actions & optional contents (filters, ...)
.row.mb-sm
.col-lg-12.text-right
- @route.action_links.each do |link|
= link_to link.href,
method: link.method,
data: link.data,
class: 'btn btn-primary' do
= link.content
/ PageContent
.page_content
.container-fluid
.row
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= definition_list t('metadatas'),
{ 'OiD' => @route.try(:objectid).try(:local_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 : '-') }
- 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
- if @route_sp.any?
= table_builder @route_sp,
{ 'ID Reflex' => Proc.new {|s| s.try(:stop_area).try(:user_objectid)},
:name => Proc.new {|s| s.try(:stop_area).try(:name)},
:deleted_at => Proc.new{|s| s.try(:stop_area).deleted_at ? t('false') : t('true')},
:zip_code => Proc.new {|s| s.try(:stop_area).try(:zip_code)},
:city_name => Proc.new {|s| s.try(:stop_area).try(:city_name)},
:for_boarding => Proc.new {|s| t("stop_points.stop_point.for_boarding.#{s.for_boarding}")},
:for_alighting => Proc.new {|s| t("stop_points.stop_point.for_alighting.#{s.for_alighting}")},
:position => 'position' },
[:show],
[],
'table'
- else
= replacement_msg t('stop_areas.search_no_results')
= javascript_tag do
| window.route = "#{URI.escape(route_json_for_edit(@route))}"
= javascript_include_tag 'es6_browserified/itineraries/show.js'
|