<% if @total_tables == 1 %> <% if @errors.nil? %> <%- message = "

Your dataset #{@dataset_name} was successfully imported

" %> <% else %> <%- message = "

There was some error while importing your dataset #{@files.first}

" %> <% end %> <% else %> <% if @errors.nil? %> <%- message = "

#{@imported_tables} out of #{@total_tables} were successfully imported

" %> <% else %> <%- message = "

#{@imported_tables} out of #{@total_tables} were successfully imported

" %> <% end %> <% end %> <% if @errors.nil? %> <%= render partial: 'mailer_modules/positive_message', locals: { message: message } %> <% else %> <%= render partial: 'mailer_modules/warning_message', locals: { message: message } %> <% end %> <% if @errors.present? %>

<%= @errors['title'] %>

<%= @errors['what_about'].html_safe %>

Dataset files:

<% end %> <% if @imported_tables > 0 %> <%= render partial: 'mailer_modules/link_to_action', locals: { link: @link, link_text: "View your #{@imported_tables == 1 ? 'dataset' : 'datasets'}" } %> <% end %>