aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/stop_areas/index.html.slim
blob: 62b873c36aec353dc65dc92d2b037cafa517c427 (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
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
- breadcrumb :stop_areas, @stop_area_referential

.page_content
  .container-fluid
    - if params[:q].present? or @stop_areas.any?
      .row
        .col-lg-12
          = render 'filters'

    - if @stop_areas.any?
      .row
        .col-lg-12
          = table_builder_2 @stop_areas,
            [ \
              TableBuilderHelper::Column.new( \
                name: t('id_reflex'), \
                attribute: Proc.new { |n| n.get_objectid.try(:short_id) }, \
                sortable: false \
              ), \
              TableBuilderHelper::Column.new( \
                key: :name, \
                attribute: 'name', \
                link_to: lambda do |stop_area| \
                  stop_area_referential_stop_area_path( \
                    @stop_area_referential, \
                    stop_area \
                  ) \
                end \
              ), \
              TableBuilderHelper::Column.new( \
                key: :registration_number, \
                attribute: 'registration_number' \
              ), \
              TableBuilderHelper::Column.new( \
                key: :status, \
                attribute: Proc.new { |s| stop_area_status(s) } \
              ), \
              TableBuilderHelper::Column.new( \
                key: :zip_code, \
                attribute: 'zip_code' \
              ), \
              TableBuilderHelper::Column.new( \
                key: :city_name, \
                attribute: 'city_name' \
              ), \
              TableBuilderHelper::Column.new( \
                key: :area_type, \
                attribute: Proc.new { |s| Chouette::AreaType.find(s.area_type).try :label } \
              ), \
            ],
            cls: 'table has-filter has-search'

          = new_pagination @stop_areas, 'pull-right'

    - unless @stop_areas.any?
      .row.mt-xs
        .col-lg-12
          = replacement_msg t('stop_areas.search_no_results')