aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2017-06-07 15:34:44 +0200
committerjpl2017-06-07 15:34:50 +0200
commit9961a541408b5668f82e03821134c1ac8d0b85eb (patch)
tree0aeca80a536f05d36cbf85c55d6e76a3789e3b46
parent0ec861ba0adb8c7408dc6a39481fa05b3e13b470 (diff)
downloadchouette-core-9961a541408b5668f82e03821134c1ac8d0b85eb.tar.bz2
Refs #3487: starting update for ITL form
-rw-r--r--app/views/routing_constraint_zones/_form.html.slim25
-rw-r--r--app/views/routing_constraint_zones/edit.html.slim15
-rw-r--r--app/views/routing_constraint_zones/new.html.slim13
3 files changed, 30 insertions, 23 deletions
diff --git a/app/views/routing_constraint_zones/_form.html.slim b/app/views/routing_constraint_zones/_form.html.slim
index b1c77a44b..082e8f7f8 100644
--- a/app/views/routing_constraint_zones/_form.html.slim
+++ b/app/views/routing_constraint_zones/_form.html.slim
@@ -1,19 +1,14 @@
-= simple_form_for [@referential, @line, @routing_constraint_zone] do |f|
- .row
- .col-lg-6.col-sm-12
- = f.input :name
- .row
- .col-lg-6.col-sm-12
- = f.input :route_id, collection: @line.routes.select { |route| route.stop_points.count > 2 }, include_blank: false
- .row
- .col-lg-6.col-sm-12
- - stop_points_collection = @routing_constraint_zone.persisted? ? @routing_constraint_zone.route.stop_points : []
- = f.input :stop_point_ids, as: :select, collection: stop_points_collection, selected: @routing_constraint_zone.stop_point_ids, label: Chouette::StopPoint.model_name.human.pluralize.capitalize, label_method: :name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Sélection des arrêts sur séquence d\'arrêts', 'multiple': 'multiple', style: 'width: 100%' }
+= simple_form_for [@referential, @line, @routing_constraint_zone], html: {class: 'form-horizontal', id: 'itl_form'}, wrapper: :horizontal_form do |form|
.row
- .col-lg-12.text-right
- = link_to 'Annuler', :back, class: 'btn btn-link'
- = f.button :submit, class: 'btn btn-danger'
+ .col-lg-12
+ = form.input :name
+
+ = form.input :route_id, collection: @line.routes.select { |route| route.stop_points.count > 2 }, include_blank: false
+
+ - stop_points_collection = @routing_constraint_zone.persisted? ? @routing_constraint_zone.route.stop_points : []
+ = form.input :stop_point_ids, as: :select, collection: stop_points_collection, selected: @routing_constraint_zone.stop_point_ids, label: Chouette::StopPoint.model_name.human.pluralize.capitalize, label_method: :name, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Sélection des arrêts sur séquence d\'arrêts', 'multiple': 'multiple', style: 'width: 100%' }
+ = form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'itl_form'
-= hidden_field_tag 'stop_point_ids', @routing_constraint_zone.stop_point_ids.to_s, id: 'stop_point_ids'
+ = hidden_field_tag 'stop_point_ids', @routing_constraint_zone.stop_point_ids.to_s, id: 'stop_point_ids'
diff --git a/app/views/routing_constraint_zones/edit.html.slim b/app/views/routing_constraint_zones/edit.html.slim
index fcb0d08a8..d81a347e0 100644
--- a/app/views/routing_constraint_zones/edit.html.slim
+++ b/app/views/routing_constraint_zones/edit.html.slim
@@ -1,5 +1,12 @@
-= title_tag t('.title', routing_constraint_zone: @routing_constraint_zone.name)
+/ PageHeader
+= pageheader 'map-marker',
+ t('.title'),
+ '',
+ t('last_update', time: l(@routing_constraint_zone.updated_at, format: :short))
-.row
- .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-8.col-sm-offset-2
- == render 'form'
+/ PageContent
+.page_content
+ .container-fluid
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1
+ == render 'form'
diff --git a/app/views/routing_constraint_zones/new.html.slim b/app/views/routing_constraint_zones/new.html.slim
index fcb0d08a8..f6ae62825 100644
--- a/app/views/routing_constraint_zones/new.html.slim
+++ b/app/views/routing_constraint_zones/new.html.slim
@@ -1,5 +1,10 @@
-= title_tag t('.title', routing_constraint_zone: @routing_constraint_zone.name)
+/ PageHeader
+= pageheader 'map-marker',
+ t('.title')
-.row
- .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-8.col-sm-offset-2
- == render 'form'
+/ PageContent
+.page_content
+ .container-fluid
+ .row
+ .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1
+ == render 'form'