aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/stop_areas/show.html.slim
blob: c10d22bfb5d46646456d2ced696a835ce7e5b83c (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
- breadcrumb :stop_area, @stop_area_referential, @stop_area
- page_header_content_for @stop_area

/ PageContent
.page_content
  .container-fluid
    .row
      .col-lg-6.col-md-6.col-sm-12.col-xs-12
        - attributes = { t('id_reflex') => @stop_area.get_objectid.short_id }

        - if has_feature?(:stop_area_localized_names)
          - @stop_area.localized_names.each do |k, v|
            - attributes.merge!({label_for_country(k, Chouette::StopArea.tmf('name')) => v }) if v.present?
        - attributes.merge!({ Chouette::StopArea.tmf('parent') => @stop_area.parent ? link_to(@stop_area.parent.name, stop_area_referential_stop_area_path(@stop_area_referential, @stop_area.parent)) : "-" }) if @stop_area.commercial?
        - attributes.merge!({ Chouette::StopArea.tmf('stop_area_type') => Chouette::AreaType.find(@stop_area.area_type).try(:label),
            Chouette::StopArea.tmf('registration_number') => @stop_area.registration_number,
            })
        - attributes.merge!(Chouette::StopArea.tmf('waiting_time') => @stop_area.waiting_time_text) if has_feature?(:stop_area_waiting_time)
        - attributes.merge!({ "Coordonnées" => geo_data(@stop_area, @stop_area_referential),
            Chouette::StopArea.tmf('zip_code') => @stop_area.zip_code,
            Chouette::StopArea.tmf('city_name') => @stop_area.city_name,
            Chouette::StopArea.tmf('country_code') => @stop_area.country_code.presence || '-',
            Chouette::StopArea.tmf('time_zone') => @stop_area.time_zone.presence || '-',
            Chouette::StopArea.tmf('status') => stop_area_status(@stop_area),
            Chouette::StopArea.tmf('comment') => @stop_area.try(:comment),
            })
        - @stop_area.custom_fields.each do |code, field|
          - attributes.merge!(field.name => field.display_value)
        = definition_list t('metadatas'), attributes