status.html.haml 3.25 KB
Newer Older
1 2
- page_title _("Google Code import")
- header_title _("Projects"), root_path
3 4
%h3.page-title
  %i.fa.fa-google
5
  = _('Import projects from Google Code')
6

7 8
- if @repos.any?
  %p.light
9
    = _('Select projects you want to import.')
10
  %p.light
11 12
    - link_to_customize = link_to(_("customize"), new_user_map_import_google_code_path)
    = _("Optionally, you can %{link_to_customize} how Google Code email addresses and usernames are imported into GitLab.").html_safe % { link_to_customize: link_to_customize }
13 14 15
  %hr
  %p
  - if @incompatible_repos.any?
16
    = button_tag class: "btn btn-import btn-success js-import-all" do
17
      = _("Import all compatible projects")
Phil Hughes's avatar
Phil Hughes committed
18
      = icon("spinner spin", class: "loading-icon")
19
  - else
20
    = button_tag class: "btn btn-import btn-success js-import-all" do
21
      = _("Import all projects")
Phil Hughes's avatar
Phil Hughes committed
22
      = icon("spinner spin", class: "loading-icon")
23

24
.table-responsive
Douwe Maan's avatar
Douwe Maan committed
25
  %table.table.import-jobs
26 27 28
    %colgroup.import-jobs-from-col
    %colgroup.import-jobs-to-col
    %colgroup.import-jobs-status-col
Douwe Maan's avatar
Douwe Maan committed
29 30
    %thead
      %tr
31 32 33
        %th= _("From Google Code")
        %th= _("To GitLab")
        %th= _("Status")
Douwe Maan's avatar
Douwe Maan committed
34 35
    %tbody
      - @already_added_projects.each do |project|
36
        %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" }
Douwe Maan's avatar
Douwe Maan committed
37
          %td
38
            = link_to project.import_source, "https://code.google.com/p/#{project.import_source}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan's avatar
Douwe Maan committed
39
          %td
40
            = link_to project.full_path, [project.namespace.becomes(Namespace), project]
Douwe Maan's avatar
Douwe Maan committed
41 42 43 44
          %td.job-status
            - if project.import_status == 'finished'
              %span
                %i.fa.fa-check
45
                = _("done")
Douwe Maan's avatar
Douwe Maan committed
46 47
            - elsif project.import_status == 'started'
              %i.fa.fa-spinner.fa-spin
48
              = _("started")
Douwe Maan's avatar
Douwe Maan committed
49 50
            - else
              = project.human_import_status_name
51

Douwe Maan's avatar
Douwe Maan committed
52
      - @repos.each do |repo|
53
        %tr{ id: "repo_#{repo.id}" }
Douwe Maan's avatar
Douwe Maan committed
54
          %td
55
            = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan's avatar
Douwe Maan committed
56
          %td.import-target
57
            #{current_user.username}/#{repo.name}
Douwe Maan's avatar
Douwe Maan committed
58
          %td.import-actions.job-status
59
            = button_tag class: "btn btn-import js-add-to-import" do
60
              = _("Import")
Phil Hughes's avatar
Phil Hughes committed
61
              = icon("spinner spin", class: "loading-icon")
Douwe Maan's avatar
Douwe Maan committed
62
      - @incompatible_repos.each do |repo|
63
        %tr{ id: "repo_#{repo.id}" }
Douwe Maan's avatar
Douwe Maan committed
64
          %td
65
            = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank", rel: 'noopener noreferrer'
Douwe Maan's avatar
Douwe Maan committed
66 67
          %td.import-target
          %td.import-actions-job-status
68
            = label_tag _("Incompatible Project"), nil, class: "label badge-danger"
69 70 71

- if @incompatible_repos.any?
  %p
72 73 74
    = _("One or more of your Google Code projects cannot be imported into GitLab directly because they use Subversion or Mercurial for version control, rather than Git.")
    - link_to_import_flow = link_to(_("import flow"), new_import_google_code_path)
    = _("Please convert them to Git on Google Code, and go through the %{link_to_import_flow} again.").html_safe % { link_to_import_flow: link_to_import_flow }
75

76
.js-importer-status{ data: { jobs_import_path: "#{jobs_import_google_code_path}", import_path: "#{import_google_code_path}" } }