debian-mirror-gitlab/app/views/import/_githubish_status.html.haml

57 lines
2.7 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- provider = local_assigns.fetch(:provider)
- provider_title = Gitlab::ImportSources.title(provider)
%p.light
2018-03-27 19:54:05 +05:30
= import_githubish_choose_repository_message
2017-08-17 22:00:37 +05:30
%hr
%p
= button_tag class: "btn btn-import btn-success js-import-all" do
2018-03-27 19:54:05 +05:30
= import_all_githubish_repositories_button_label
2017-08-17 22:00:37 +05:30
= icon("spinner spin", class: "loading-icon")
.table-responsive
%table.table.import-jobs
%colgroup.import-jobs-from-col
%colgroup.import-jobs-to-col
%colgroup.import-jobs-status-col
%thead
%tr
2018-03-27 19:54:05 +05:30
%th= _('From %{provider_title}') % { provider_title: provider_title }
%th= _('To GitLab')
%th= _('Status')
2017-08-17 22:00:37 +05:30
%tbody
- @already_added_projects.each do |project|
2018-11-18 11:00:15 +05:30
%tr{ id: "project_#{project.id}", class: project_status_css_class(project.import_status) }
2017-08-17 22:00:37 +05:30
%td
= provider_project_link(provider, project.import_source)
%td
2017-09-10 17:25:29 +05:30
= link_to project.full_path, [project.namespace.becomes(Namespace), project]
2017-08-17 22:00:37 +05:30
%td.job-status
2018-11-18 11:00:15 +05:30
= render 'import/project_status', project: project
2017-08-17 22:00:37 +05:30
- @repos.each do |repo|
2018-11-08 19:23:39 +05:30
%tr{ id: "repo_#{repo.id}", data: { qa: { repo_path: repo.full_name } } }
2017-08-17 22:00:37 +05:30
%td
= provider_project_link(provider, repo.full_name)
%td.import-target
%fieldset.row
.input-group
2018-11-08 19:23:39 +05:30
.project-path.input-group-prepend
2017-08-17 22:00:37 +05:30
- if current_user.can_select_namespace?
- selected = params[:namespace_id] || :current_user
- opts = current_user.can_create_group? ? { extra_group: Group.new(name: repo.owner.login, path: repo.owner.login) } : {}
2018-11-08 19:23:39 +05:30
= select_tag :namespace_id, namespaces_options(selected, opts.merge({ display_path: true })), { class: 'input-group-text select2 js-select-namespace qa-project-namespace-select', tabindex: 1 }
2017-08-17 22:00:37 +05:30
- else
2018-11-08 19:23:39 +05:30
= text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true
%span.input-group-prepend
.input-group-text /
2018-11-20 20:47:30 +05:30
= text_field_tag :path, sanitize_project_name(repo.name), class: "input-mini form-control", tabindex: 2, autofocus: true, required: true
2017-08-17 22:00:37 +05:30
%td.import-actions.job-status
= button_tag class: "btn btn-import js-add-to-import" do
2018-03-27 19:54:05 +05:30
= has_ci_cd_only_params? ? _('Connect') : _('Import')
2017-08-17 22:00:37 +05:30
= icon("spinner spin", class: "loading-icon")
2018-11-18 11:00:15 +05:30
.js-importer-status{ data: { jobs_import_path: url_for([:jobs, :import, provider]),
import_path: url_for([:import, provider]),
ci_cd_only: has_ci_cd_only_params?.to_s } }