diff options
| author | Teddy Wing | 2017-07-10 12:33:15 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-07-12 11:11:14 +0200 | 
| commit | 09aef0d99cd86a75afe6aa81297cc7d3e7d8cae4 (patch) | |
| tree | d2f1cdad211b7836b8815745b51dfb4b87b48a1f /app/views/routing_constraint_zones | |
| parent | 2215e9696dc435940a8a40ffb45c1a11d95e3ee9 (diff) | |
| download | chouette-core-09aef0d99cd86a75afe6aa81297cc7d3e7d8cae4.tar.bz2 | |
RoutingConstraintZones#index: Use new table builder helper
Render table of `RoutingConstraintZones` using the new table builder.
Refs #3479
Diffstat (limited to 'app/views/routing_constraint_zones')
| -rw-r--r-- | app/views/routing_constraint_zones/index.html.slim | 29 | 
1 files changed, 22 insertions, 7 deletions
diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim index 596ea9e91..6b3e73096 100644 --- a/app/views/routing_constraint_zones/index.html.slim +++ b/app/views/routing_constraint_zones/index.html.slim @@ -16,13 +16,28 @@      - if @routing_constraint_zones.any?        .row          .col-lg-12 -          = table_builder @routing_constraint_zones, -            { 'ID' => Proc.new { |n| n.try(:objectid).try(:local_id) }, -              :name => 'name', :stop_points_count => 'stop_points_count', -              :route => 'route_name' }, -            [:show, :edit, :delete], -            [], -            'table has-filter has-search' +          = table_builder_2 @routing_constraint_zones, +            [ \ +              TableBuilderHelper::Column.new( \ +                name: 'ID', \ +                attribute: Proc.new { |n| n.try(:objectid).try(:local_id) }, \ +                sortable: false \ +              ), \ +              TableBuilderHelper::Column.new( \ +                key: :name, \ +                attribute: 'name' \ +              ), \ +              TableBuilderHelper::Column.new( \ +                key: :stop_points_count, \ +                attribute: 'stop_points_count' \ +              ), \ +              TableBuilderHelper::Column.new( \ +                key: :route, \ +                attribute: 'route_name' \ +              ), \ +            ], +            links: [:show], +            cls: 'table has-filter has-search'      - unless @routing_constraint_zones.any?        .row.mt-xs  | 
