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