<h2><%= l(:label_crm_csv_import) %></h2>

<div id="import-details">
  <div id="import-progress"><div id="progress-label">0 / <%= @import.total_items.to_i %></div></div>
</div>

<%= javascript_tag do %>
$(document).ready(function() {
  $('#import-details').addClass('ajax-loading');
  $('#import-progress').progressbar({value: 0, max: <%= @import.total_items.to_i %>});
  $.ajax({
    url: '<%= importer_run_link(@import, @project) %>',
    type: 'post'
  });
});
<% end %>
