- if @project.persisted?
  :plain
    job = $("tr#repo_#{@repo_id}")
    job.attr("id", "project_#{@project.id}")
    target_field = job.find(".import-target")
    target_field.empty()
    target_field.append('#{link_to @project.path_with_namespace, project_path(@project)}')
    $("table.import-jobs tbody").prepend(job)
    job.addClass("active").find(".import-actions").html("<i class='fa fa-spinner fa-spin'></i> started")
- else
  :plain
    job = $("tr#repo_#{@repo_id}")
    job.find(".import-actions").html("<i class='fa fa-exclamation-circle'></i> Error saving project: #{escape_javascript(h(@project.errors.full_messages.join(',')))}")