BigW Consortium Gitlab

create.js.haml 673 Bytes
Newer Older
1
- if @project.persisted?
Valery Sizov committed
2
  :plain
3 4
    job = $("tr#repo_#{@repo_id}")
    job.attr("id", "project_#{@project.id}")
Douwe Maan committed
5 6
    target_field = job.find(".import-target")
    target_field.empty()
7
    target_field.append('#{link_to @project.path_with_namespace, namespace_project_path(@project.namespace, @project)}')
8 9
    $("table.import-jobs tbody").prepend(job)
    job.addClass("active").find(".import-actions").html("<i class='fa fa-spinner fa-spin'></i> started")
10 11 12
- else
  :plain
    job = $("tr#repo_#{@repo_id}")
13
    job.find(".import-actions").html("<i class='fa fa-exclamation-circle'></i> Error saving project: #{escape_javascript(@project.errors.full_messages.join(','))}")