aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/stop_points/_stop_point.html.slim
blob: e54158cefc8cac9a7a93a976a0c1bf0bf9b1d3f3 (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
#index_item.panel.panel-default.stop_point
  .panel-heading
    .panel-title.clearfix
      h5
        = link_to [@referential, stop_point.stop_area], class: "preview", title: "#{Chouette::StopArea.model_name.human.capitalize} #{stop_point.stop_area.name}" do
          span.name
            span.label.label-primary = stop_point.position + 1
            = image_tag "map/" + stop_point.stop_area.area_type + ".png"
            = truncate(stop_point.stop_area.name, length: 20)

  .panel-body
    p
      - unless stop_point.stop_area.geometry
        span.warning = t('.no_position')

    p
      = "#{stop_point.stop_area.human_attribute_name('registration_number')} : "
      = stop_point.stop_area.registration_number.present? ? stop_point.stop_area.registration_number : t(".no_object")

    p
      = "#{t('.address')} : "
      = (stop_point.stop_area.zip_code.present? || stop_point.stop_area.city_name.present?) ? "#{stop_point.stop_area.zip_code} #{stop_point.stop_area.city_name}"  : t(".no_object")

    p
      = t('.lines')
      - if stop_point.stop_area.lines.blank?
        = t(".no_object")
      - else
        - stop_point.stop_area.lines.each do |line|
          span.label.label-default.line = line.number || truncate( line.name, length: 4 )