2016-08-30 17:34:37 +00:00
|
|
|
- if @project.persisted?
|
2014-12-31 13:07:48 +00:00
|
|
|
:plain
|
2015-01-20 19:52:55 +00:00
|
|
|
job = $("tr#repo_#{@repo_id}")
|
|
|
|
job.attr("id", "project_#{@project.id}")
|
2015-02-17 15:59:50 +00:00
|
|
|
target_field = job.find(".import-target")
|
|
|
|
target_field.empty()
|
2016-04-12 08:48:39 +00:00
|
|
|
target_field.append('#{link_to @project.path_with_namespace, namespace_project_path(@project.namespace, @project)}')
|
2015-01-20 19:52:55 +00:00
|
|
|
$("table.import-jobs tbody").prepend(job)
|
|
|
|
job.addClass("active").find(".import-actions").html("<i class='fa fa-spinner fa-spin'></i> started")
|
2015-08-11 06:56:01 +00:00
|
|
|
- else
|
|
|
|
:plain
|
|
|
|
job = $("tr#repo_#{@repo_id}")
|
2016-04-14 08:32:02 +00:00
|
|
|
job.find(".import-actions").html("<i class='fa fa-exclamation-circle'></i> Error saving project: #{escape_javascript(@project.errors.full_messages.join(','))}")
|