aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/routes/_form.html.slim6
-rw-r--r--app/views/routes/_stop_point_fields.html.slim5
-rw-r--r--app/views/routes/_test.html.slim27
-rw-r--r--app/views/routes/edit.html.slim2
-rw-r--r--app/views/routes/show.html.slim2
5 files changed, 36 insertions, 6 deletions
diff --git a/app/views/routes/_form.html.slim b/app/views/routes/_form.html.slim
index 329862955..3c24f1062 100644
--- a/app/views/routes/_form.html.slim
+++ b/app/views/routes/_form.html.slim
@@ -11,7 +11,9 @@
#stop_points
= form.semantic_fields_for :stop_points, :include_id => false do |p|
- == render "stop_point_fields", f: p
+ / == render "stop_point_fields", f: p
+ // TEST ES6
+ = render 'test', f: p
.links
= link_to_add_association t("routes.actions.add_stop_point"), form, :stop_points, class: 'add_stop_point add'
@@ -88,4 +90,4 @@ javascript:
write_stop_point_ids();
order_position();
});
- }); \ No newline at end of file
+ });
diff --git a/app/views/routes/_stop_point_fields.html.slim b/app/views/routes/_stop_point_fields.html.slim
index 814e882c2..f80e24796 100644
--- a/app/views/routes/_stop_point_fields.html.slim
+++ b/app/views/routes/_stop_point_fields.html.slim
@@ -2,7 +2,8 @@
= f.inputs do
.col-md-1.resize
= link_to_remove_association "<i class='fa fa-trash-o'></i>".html_safe, f
- span.handle alt="#{t('stop_points.index.move')}" title="#{t('stop_points.index.move')}" >
+
+ span.handle alt="#{t('stop_points.index.move')}" title="#{t('stop_points.index.move')}"
i.fa.fa-arrows
.col-md-11
@@ -13,4 +14,4 @@
- else
= f.input :id, as: :hidden, :input_html => { class: 'stop_point_id' }
= f.input :position, as: :hidden, :input_html => { class: 'position' }
- = f.input :stop_area_id, label: false, as: :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=physical", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :tokenLimit => 1, :input_html => { :class => "stop_area_id", :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/index', [f.object.stop_area].compact, :view_path => 'app/views', :format => :json, :scope => self ).render } \ No newline at end of file
+ = f.input :stop_area_id, label: false, as: :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=physical", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :tokenLimit => 1, :input_html => { :class => "stop_area_id", :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/index', [f.object.stop_area].compact, :view_path => 'app/views', :format => :json, :scope => self ).render }
diff --git a/app/views/routes/_test.html.slim b/app/views/routes/_test.html.slim
new file mode 100644
index 000000000..c4b085873
--- /dev/null
+++ b/app/views/routes/_test.html.slim
@@ -0,0 +1,27 @@
+.nested-fields.stop_point
+ .list-group
+ = f.inputs do
+ .list-group-item
+ div style="display:table-cell;vertical-align:middle;width:75%;"
+ - if f.object.stop_area.nil? || f.object.new_record?
+ = f.input :id, as: :hidden, input_html: { class: "stop_point_id added_stop_point", value: "" }
+ = f.input :position, as: :hidden, input_html: { class: "position" }
+
+ = f.input :stop_area_id, label: false, as: :search_stop_area, json: referential_autocomplete_stop_areas_path(@referential, format: :json)+"?filter=physical", hint_text: t('search_hint'), no_result_text: t('no_result_text'), searching_text: t('searching_term'), tokenLimit: 1, input_html: { class: "new_stop_point stop_area_id", "data-pre": Rabl::Renderer.new('autocomplete_stop_areas/index', [f.object.stop_area].compact, view_path: 'app/views', format: :json, scope: self ).render }
+
+ - else
+ = f.input :id, as: :hidden, input_html: { class: 'stop_point_id' }
+ = f.input :position, as: :hidden, input_html: { class: 'position' }
+
+ = f.input :stop_area_id, label: false, as: :search_stop_area, json: referential_autocomplete_stop_areas_path(@referential, format: :json)+"?filter=physical", hint_text: t('search_hint'), no_result_text: t('no_result_text'), searching_text: t('searching_term'), tokenLimit: 1, input_html: { class: "stop_area_id", "data-pre": Rabl::Renderer.new('autocomplete_stop_areas/index', [f.object.stop_area].compact, view_path: 'app/views', format: :json, scope: self ).render }
+
+ div.text-right style="display:table-cell;vertical-align:middle;width:25%;"
+ .btn-group.btn-group-sm
+ = link_to_remove_association f, class: 'btn btn-danger' do
+ span.fa.fa-trash
+
+ .btn.btn-primary data-event='handle' title="#{t('stop_points.index.move')}"
+ span.fa.fa-arrows
+
+// TEST ES6
+= javascript_include_tag 'es6_browserified/test.js'
diff --git a/app/views/routes/edit.html.slim b/app/views/routes/edit.html.slim
index 7e2c1f982..300a2f86b 100644
--- a/app/views/routes/edit.html.slim
+++ b/app/views/routes/edit.html.slim
@@ -1,3 +1,3 @@
= title_tag t('routes.edit.title', route: @route.name )
-== render 'form' \ No newline at end of file
+== render 'form'
diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim
index a4e1aa90f..ca2e0398f 100644
--- a/app/views/routes/show.html.slim
+++ b/app/views/routes/show.html.slim
@@ -87,4 +87,4 @@ p.after_map
li = link_to t('vehicle_journey_imports.new.title'), new_referential_line_route_vehicle_journey_import_path( @referential, @line, @route ), class: 'import'
li = link_to t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, format: :zip), class: 'export'
- = creation_tag(@route) \ No newline at end of file
+ = creation_tag(@route)