aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2016-08-04 11:27:20 +0200
committerjpl2016-08-04 11:27:20 +0200
commit9f80af81fede1c1dbbb0f4c31f14f8ce39240d1f (patch)
tree5b14d93cbc85cd3eb90c576e9418749b3f12781f
parentf3edc0caf3dfe803b62a5dee0699af999290f3fe (diff)
downloadchouette-core-9f80af81fede1c1dbbb0f4c31f14f8ce39240d1f.tar.bz2
Refs #1295: convert erb to slim (time_table_combinations)
-rw-r--r--app/views/time_table_combinations/_combine.html.erb12
-rw-r--r--app/views/time_table_combinations/_combine.html.slim12
-rw-r--r--app/views/time_table_combinations/_combine_form.html.erb14
-rw-r--r--app/views/time_table_combinations/_combine_form.html.slim11
-rw-r--r--app/views/time_table_combinations/create_failure.js.erb5
-rw-r--r--app/views/time_table_combinations/create_failure.js.slim3
-rw-r--r--app/views/time_table_combinations/create_success.js.erb8
-rw-r--r--app/views/time_table_combinations/create_success.js.slim6
-rw-r--r--app/views/time_table_combinations/new.js.erb4
-rw-r--r--app/views/time_table_combinations/new.js.slim2
10 files changed, 34 insertions, 43 deletions
diff --git a/app/views/time_table_combinations/_combine.html.erb b/app/views/time_table_combinations/_combine.html.erb
deleted file mode 100644
index 27b5f056f..000000000
--- a/app/views/time_table_combinations/_combine.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-<div id="modal_combine" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title" id="myModalLabel"><%= t('time_tables.show.combine_form') %></h4>
- </div>
- <%= render "time_table_combinations/combine_form" %>
- </div>
- </div>
-
-</div>
diff --git a/app/views/time_table_combinations/_combine.html.slim b/app/views/time_table_combinations/_combine.html.slim
new file mode 100644
index 000000000..a2e9a9c6e
--- /dev/null
+++ b/app/views/time_table_combinations/_combine.html.slim
@@ -0,0 +1,12 @@
+#modal_combine.modal.fade tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
+ .modal-dialog
+ .modal-content
+ .modal-header
+ button.close type="button" data-dismiss="modal"
+ span aria-hidden="true" &times;
+ span.sr-only Close
+
+ h4.modal-title id="myModalLabel"
+ = t('time_tables.show.combine_form')
+
+ == render "time_table_combinations/combine_form" \ No newline at end of file
diff --git a/app/views/time_table_combinations/_combine_form.html.erb b/app/views/time_table_combinations/_combine_form.html.erb
deleted file mode 100644
index dd9cd9b92..000000000
--- a/app/views/time_table_combinations/_combine_form.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-<%= semantic_form_for [@referential, @time_table, @time_table_combination], :remote => true do |form| %>
- <div class="modal-body">
- <%= render "shared/flash_messages" %>
- <%= form.inputs do %>
- <%= form.input :operation, :as => :radio, :collection => Hash[TimeTableCombination.operations.map {|b| [t( b, :scope => "time_table_combinations.operations"),b]}] %>
- <%= form.input :combined_id, :label => t('.time_tables'), :as => :search_time_table, :json => referential_autocomplete_time_tables_path(@referential, :format => :json), :hint_text => t('search_hint'), :no_result_text => t('no_result_text'), :searching_text => t('searching_term'), :tokenLimit => 1 %>
- <% end %>
- </div>
- <div class="modal-footer">
- <%= form.actions do %>
- <%= form.action :submit, :as => :button , :label => t('time_tables.show.combine') %>
- <% end %>
- </div>
-<% end %>
diff --git a/app/views/time_table_combinations/_combine_form.html.slim b/app/views/time_table_combinations/_combine_form.html.slim
new file mode 100644
index 000000000..2367cd4af
--- /dev/null
+++ b/app/views/time_table_combinations/_combine_form.html.slim
@@ -0,0 +1,11 @@
+= semantic_form_for [@referential, @time_table, @time_table_combination], :remote => true do |form|
+ .modal-body
+ == render "shared/flash_messages"
+
+ = form.inputs do
+ = form.input :operation, as: :radio, :collection => Hash[TimeTableCombination.operations.map {|b| [t( b, :scope => "time_table_combinations.operations"),b]}]
+ = form.input :combined_id, :label => t('.time_tables'), as: :search_time_table, :json => referential_autocomplete_time_tables_path(@referential, :format => :json), :hint_text => t('search_hint'), :no_result_text => t('no_result_text'), :searching_text => t('searching_term'), :tokenLimit => 1
+
+ .modal-footer
+ = form.actions do
+ = form.action :submit, as: :button , :label => t('time_tables.show.combine') \ No newline at end of file
diff --git a/app/views/time_table_combinations/create_failure.js.erb b/app/views/time_table_combinations/create_failure.js.erb
deleted file mode 100644
index 65cc241c5..000000000
--- a/app/views/time_table_combinations/create_failure.js.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-
-var combine_form_partial = '<%= j render "time_table_combinations/combine_form" %> ';
-
-$('#new_time_table_combination').replaceWith(combine_form_partial);
-
diff --git a/app/views/time_table_combinations/create_failure.js.slim b/app/views/time_table_combinations/create_failure.js.slim
new file mode 100644
index 000000000..8eee027a8
--- /dev/null
+++ b/app/views/time_table_combinations/create_failure.js.slim
@@ -0,0 +1,3 @@
+var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}";
+
+$('#new_time_table_combination').replaceWith(combine_form_partial); \ No newline at end of file
diff --git a/app/views/time_table_combinations/create_success.js.erb b/app/views/time_table_combinations/create_success.js.erb
deleted file mode 100644
index 79ab543d9..000000000
--- a/app/views/time_table_combinations/create_success.js.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-
-var combine_form_partial = '<%= j render "time_table_combinations/combine_form" %> ';
-
-$('#new_time_table_combination').replaceWith(combine_form_partial);
-
-var time_table_partial = '<%= j render "time_tables/show_time_table" %> ';
-$('#time_table_show').replaceWith(time_table_partial);
-
diff --git a/app/views/time_table_combinations/create_success.js.slim b/app/views/time_table_combinations/create_success.js.slim
new file mode 100644
index 000000000..54712142e
--- /dev/null
+++ b/app/views/time_table_combinations/create_success.js.slim
@@ -0,0 +1,6 @@
+var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}";
+
+$('#new_time_table_combination').replaceWith(combine_form_partial);
+
+var time_table_partial = "#{j render 'time_tables/show_time_table'}";
+$('#time_table_show').replaceWith(time_table_partial); \ No newline at end of file
diff --git a/app/views/time_table_combinations/new.js.erb b/app/views/time_table_combinations/new.js.erb
deleted file mode 100644
index ea98d9aaf..000000000
--- a/app/views/time_table_combinations/new.js.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-var combine_form_partial = '<%= j render "time_table_combinations/combine_form" %> ';
-$('#new_time_table_combination').replaceWith(combine_form_partial);
-
-
diff --git a/app/views/time_table_combinations/new.js.slim b/app/views/time_table_combinations/new.js.slim
new file mode 100644
index 000000000..3bc6c22f8
--- /dev/null
+++ b/app/views/time_table_combinations/new.js.slim
@@ -0,0 +1,2 @@
+var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}";
+$('#new_time_table_combination').replaceWith(combine_form_partial); \ No newline at end of file