.row
.col-md-8.col-sm-12
.panel.panel-default
.panel-heading= t(".panel_header.import")
.panel-body
= simple_form_for(@mynumber_csv_import,wrapper: :inline_form,html: {class: "form-inline"}) do |f|
.row
.col-sm-5
= link_to t(".file_download"),new_mynumber_csv_import_path,class: ["btn","btn-default"]
.col-sm-7
= f.input :csv_file,wrapper: :vertical_file_input,wrapper_html: {class: ["text-left"]}
= f.button :submit,t(".helper.submit"),class: ["btn","btn-primary"]
.col-md-4.col-sm-12
.panel.panel-default
.panel-heading= t(".panel_header.job")
- if @jobs.present?
%table.table.table-striped#csv_import_jobs
%thead
%tr
%th= MynumberCsvImport.human_attribute_name(:created_at)
%th= MynumberCsvImport.human_attribute_name(:status)
%tbody
- @jobs.each do |job|
%tr
%td= l job.created_at
%td= job.status_i18n
- else
.panel-body
%p= t(".messages.no_job_now")
.col-sm-12
.panel.panel-default
.panel-heading
= t(".panel_header.histories")
.panel-body
= t(".messages.info_message")
%table.table.table-striped#csv_import_results
%thead
%tr
%th= MynumberCsvImport.human_attribute_name(:updated_at)
%th= MynumberCsvImport.human_attribute_name(:status)
%th= MynumberCsvImport.human_attribute_name(:failure_count)
%th
%tbody
- @histories.each do |history|
%tr
%td= l history.updated_at
%td= link_to_if history.failed?,history.status_i18n,history
%td= history.failure_count
%td