diff --git a/back-office/app/controllers/items_controller.rb b/back-office/app/controllers/items_controller.rb index 23394a9..132550c 100644 --- a/back-office/app/controllers/items_controller.rb +++ b/back-office/app/controllers/items_controller.rb @@ -33,6 +33,8 @@ class ItemsController < ApplicationController end def export_import - + @tasks = [ ["Validate items", "validate_items"], + ["Import items", "import_items"], + ["Update prices", "update_prices"] ] end end diff --git a/back-office/app/views/items/export_import.html.erb b/back-office/app/views/items/export_import.html.erb index 8b13789..0b2ed4c 100644 --- a/back-office/app/views/items/export_import.html.erb +++ b/back-office/app/views/items/export_import.html.erb @@ -1 +1,19 @@ +<%= form_tag('./export_import') do %> +
+ <%= text_area_tag "csv_content", @csv_content, rows: 20, cols: 70 %>
+ <%= select_tag "task", options_for_select(@tasks) %>
+ +<%= submit_tag "Run task" %>
+ + <% if !@error_message.nil? && @error_message != "" %> ++
+<% end %>