diff options
| author | vlatka pavisic | 2016-12-12 15:49:52 +0100 | 
|---|---|---|
| committer | vlatka pavisic | 2016-12-12 15:49:58 +0100 | 
| commit | 2d4e6b45b0295e8c01deaebb04f8be009a7f9d87 (patch) | |
| tree | efb5139d08a29e9e0c9017b35d34ca8aa611f34d /app/views/routing_constraint_zones | |
| parent | 73ab4dfc33dcf6b32198ae902fea3f8504821dea (diff) | |
| download | chouette-core-2d4e6b45b0295e8c01deaebb04f8be009a7f9d87.tar.bz2 | |
Refs #1955 : RoutingConstraintZone
Diffstat (limited to 'app/views/routing_constraint_zones')
| -rw-r--r-- | app/views/routing_constraint_zones/_form.html.slim | 13 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/edit.html.slim | 5 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/index.html.slim | 10 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/new.html.slim | 5 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/show.html.slim | 18 | 
5 files changed, 51 insertions, 0 deletions
diff --git a/app/views/routing_constraint_zones/_form.html.slim b/app/views/routing_constraint_zones/_form.html.slim new file mode 100644 index 000000000..d9e243746 --- /dev/null +++ b/app/views/routing_constraint_zones/_form.html.slim @@ -0,0 +1,13 @@ += simple_form_for [@referential, @line, @routing_constraint_zone] do |f| +  .row +    .col-lg-6.col-sm-12 +      = f.input :name, label: t('activerecord.models.attributes.routing_constraint_zone.name') +  .row +    .col-lg-6.col-sm-12 +      = f.input :stop_area_ids, as: :select, collection: Chouette::StopArea.all, selected: @routing_constraint_zone.stop_area_ids, label: Chouette::StopArea.model_name.human.pluralize.capitalize, label_method: :name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'SĂ©lection de arrĂȘts', 'multiple': 'multiple', style: 'width: 100%' } + +  .row +    .col-lg-12.text-right +      = link_to 'Annuler', :back, class: 'btn btn-link' +      = f.button :submit, class: 'btn btn-danger' + diff --git a/app/views/routing_constraint_zones/edit.html.slim b/app/views/routing_constraint_zones/edit.html.slim new file mode 100644 index 000000000..fcb0d08a8 --- /dev/null +++ b/app/views/routing_constraint_zones/edit.html.slim @@ -0,0 +1,5 @@ += title_tag t('.title', routing_constraint_zone: @routing_constraint_zone.name) + +.row +  .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-8.col-sm-offset-2 +    == render 'form' diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim new file mode 100644 index 000000000..b12fbd3dd --- /dev/null +++ b/app/views/routing_constraint_zones/index.html.slim @@ -0,0 +1,10 @@ += title_tag Chouette::RoutingConstraintZone.model_name.human.pluralize(:fr) + += link_to t('routing_constraint_zones.actions.new'), new_referential_line_routing_constraint_zone_path + +- if @routing_constraint_zones.any? +  = table_builder @routing_constraint_zones, +    { @routing_constraint_zones.human_attribute_name(:name) => 'name' }, +    [:show, :edit, :delete], +    'table table-bordered' + diff --git a/app/views/routing_constraint_zones/new.html.slim b/app/views/routing_constraint_zones/new.html.slim new file mode 100644 index 000000000..fcb0d08a8 --- /dev/null +++ b/app/views/routing_constraint_zones/new.html.slim @@ -0,0 +1,5 @@ += title_tag t('.title', routing_constraint_zone: @routing_constraint_zone.name) + +.row +  .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-8.col-sm-offset-2 +    == render 'form' diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim new file mode 100644 index 000000000..0f88f5b3f --- /dev/null +++ b/app/views/routing_constraint_zones/show.html.slim @@ -0,0 +1,18 @@ += title_tag @routing_constraint_zone.name + +p +  label => "#{@routing_constraint_zone.human_attribute_name(:name)} : " +  = @routing_constraint_zone.name + +p +  label => "#{Chouette::Line.model_name.human.capitalize} : " +  = link_to @routing_constraint_zone.line.name, referential_line_path(@referential, @line) + +p +  label => "#{Chouette::StopArea.model_name.human.pluralize.capitalize} : " +  br +  - @routing_constraint_zone.stop_areas.each do |stop_area| +    = link_to stop_area.name, referential_stop_area_path(@referential, stop_area) +    br + +  | 
