aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2016-08-03 16:48:58 +0200
committerjpl2016-08-03 16:48:58 +0200
commit6f41fdf0b686a125468ed68fcb09f3f1c699eea3 (patch)
tree19864e4b81fe78f2e4eeb3552c05b45936a3a76d
parent420c571c4798fe41376a7a7b758a0d4d0efca8c0 (diff)
downloadchouette-core-6f41fdf0b686a125468ed68fcb09f3f1c699eea3.tar.bz2
Refs #1295: convert erb to slim (stop_area_copies)
-rw-r--r--app/views/stop_area_copies/new.html.erb22
-rw-r--r--app/views/stop_area_copies/new.html.slim20
2 files changed, 20 insertions, 22 deletions
diff --git a/app/views/stop_area_copies/new.html.erb b/app/views/stop_area_copies/new.html.erb
deleted file mode 100644
index 5edc005cc..000000000
--- a/app/views/stop_area_copies/new.html.erb
+++ /dev/null
@@ -1,22 +0,0 @@
-<%= title_tag t("stop_area_copies.new.title."+@stop_area_copy.hierarchy) %>
-
-<%= semantic_form_for [@referential, @stop_area, @stop_area_copy] do |form| %>
- <br>
- <%= form.inputs do %>
- <%= form.input :source_id, :as => :hidden %>
- <%= form.input :hierarchy, :as => :hidden %>
- <% if @stop_area_copy.hierarchy == "child"%>
- <% if @stop_area.area_type.underscore == "stop_place"%>
- <%= form.input :area_type, :as => :select, :collection => ["stop_place","commercial_stop_point"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
- <% else%>
- <%= form.input :area_type, :as => :select, :collection => ["boarding_position","quay"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
- <% end %>
- <% else %>
- <%= form.input :area_type, :as => :select, :collection => [@stop_area_copy.area_type], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
- <% end %>
- <% end %>
- <%= form.actions do %>
- <%= form.action :submit, :as => :button , :label => t( 'formtastic.duplicate' ) %>
- <%= form.action :cancel, :as => :link %>
- <% end %>
-<% end %>
diff --git a/app/views/stop_area_copies/new.html.slim b/app/views/stop_area_copies/new.html.slim
new file mode 100644
index 000000000..a4c0c8bde
--- /dev/null
+++ b/app/views/stop_area_copies/new.html.slim
@@ -0,0 +1,20 @@
+= title_tag t("stop_area_copies.new.title."+@stop_area_copy.hierarchy)
+
+= semantic_form_for [@referential, @stop_area, @stop_area_copy] do |form|
+ br
+ = form.inputs do
+ = form.input :source_id, as: :hidden
+ = form.input :hierarchy, as: :hidden
+
+ - if @stop_area_copy.hierarchy == "child"
+ - if @stop_area.area_type.underscore == "stop_place"
+ = form.input :area_type, as: :select, :collection => ["stop_place","commercial_stop_point"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") }
+ - else
+ = form.input :area_type, as: :select, :collection => ["boarding_position","quay"], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") }
+
+ - else
+ = form.input :area_type, as: :select, :collection => [@stop_area_copy.area_type], :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") }
+
+ = form.actions do
+ = form.action :submit, as: :button , label: t('formtastic.duplicate')
+ = form.action :cancel, as: :link \ No newline at end of file