Merge branch 'develop'
paypal, pikpay and gift support
This commit is contained in:
@@ -2,33 +2,48 @@
|
||||
<p><label for="supplier_id">Supplier: </label>
|
||||
<%= select_tag "supplier_id", options_from_collection_for_select(@suppliers, "id", "name", @selected_supplier.try(:id)) %></p>
|
||||
|
||||
<p><label for="codes">
|
||||
<p><label for="codes">
|
||||
Codes to check:
|
||||
</label><br />
|
||||
<%= text_area_tag "codes", @codes_to_check, rows: 20, columns: 50 %></p>
|
||||
|
||||
<p><%= submit_tag "Check" %></p>
|
||||
<p><%= submit_tag "Delete Items" %></p>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<h2> In database: <%= @items.length %>, in file: <%= @codes_to_check_array.length %> </h2>
|
||||
</div>
|
||||
<% if controller.action_name == 'delete_items' %>
|
||||
|
||||
<h2> Delete successful </h2>
|
||||
|
||||
<% if @not_deleted_items.length > 0 %>
|
||||
<p>Not deleted items</p>
|
||||
<% @not_deleted_items.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<div>
|
||||
<h2> In database: <%= @items.length %>, in file: <%= @codes_to_check_array.length %> </h2>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in database (<%= @missing_from_database.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_database.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in file (<%= @missing_from_codes.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_codes.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in database (<%= @missing_from_database.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_database.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Not in file (<%= @missing_from_codes.length %>): </h2>
|
||||
<br />
|
||||
<% @missing_from_codes.each do |code| %>
|
||||
<%= code %><br />
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
21
back-office/app/views/items/export_import.html.erb
Normal file
21
back-office/app/views/items/export_import.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<%= form_tag('./export_import') do %>
|
||||
<p><label for="codes">
|
||||
CSV content goes here:
|
||||
</label><br />
|
||||
<textarea id="csv_content" name="csv_content" rows=20 style="width: 100%"><%= @csv_content %></textarea></p>
|
||||
|
||||
<p><label for="task">Task: </label>
|
||||
<%= select_tag "task", options_for_select(@tasks, @task) %></p>
|
||||
|
||||
<p><%= submit_tag "Run task" %></p>
|
||||
|
||||
<% if !@error_message.nil? && @error_message != "" %>
|
||||
<div>Error message: <span style="color: red"><%= @error_message %></span></div>
|
||||
<% end %>
|
||||
|
||||
<br />
|
||||
<p><label for="output_area">Output area: </label>
|
||||
<div id="output_area" style="width: 100%;height: 14em;outline: 1px solid #A9A9A9; overflow: scroll"><%= unless @output.nil?
|
||||
@output.html_safe end %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user