- if @already_been_taken :plain tr = $("tr#repo_#{@repo_id}") target_field = tr.find(".import-target") import_button = tr.find(".btn-import") origin_target = target_field.text() project_name = "#{@project_name}" origin_namespace = "#{@target_namespace}" target_field.empty() target_field.append("
This namespace already been taken! Please choose another one
") target_field.append("") target_field.append("/" + project_name) target_field.data("project_name", project_name) target_field.find('input').prop("value", origin_namespace) import_button.enable().removeClass('is-loading') - elsif @access_denied :plain job = $("tr#repo_#{@repo_id}") job.find(".import-actions").html("Access denied! Please verify you can add deploy keys to this repository.
") - elsif @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, namespace_project_path(@project.namespace, @project)}') $("table.import-jobs tbody").prepend(job) job.addClass("active").find(".import-actions").html(" started") - else :plain job = $("tr#repo_#{@repo_id}") job.find(".import-actions").html(" Error saving project: #{escape_javascript(@project.errors.full_messages.join(','))}")