status.html.haml 2.02 KB
Newer Older
1 2
- page_title _("FogBugz import")
- header_title _("Projects"), root_path
Jared Szechy's avatar
Jared Szechy committed
3 4
%h3.page-title
  %i.fa.fa-bug
5
  = _('Import projects from FogBugz')
Jared Szechy's avatar
Jared Szechy committed
6 7 8

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

19
.table-responsive
Douwe Maan's avatar
Douwe Maan committed
20
  %table.table.import-jobs
21 22 23
    %colgroup.import-jobs-from-col
    %colgroup.import-jobs-to-col
    %colgroup.import-jobs-status-col
Douwe Maan's avatar
Douwe Maan committed
24 25
    %thead
      %tr
26 27 28
        %th= _("From FogBugz")
        %th= _("To GitLab")
        %th= _("Status")
Douwe Maan's avatar
Douwe Maan committed
29 30
    %tbody
      - @already_added_projects.each do |project|
31
        %tr{ id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}" }
Douwe Maan's avatar
Douwe Maan committed
32 33 34
          %td
            = project.import_source
          %td
35
            = link_to project.full_path, [project.namespace.becomes(Namespace), project]
Douwe Maan's avatar
Douwe Maan committed
36 37 38 39
          %td.job-status
            - if project.import_status == 'finished'
              %span
                %i.fa.fa-check
40
                = _("done")
Douwe Maan's avatar
Douwe Maan committed
41 42
            - elsif project.import_status == 'started'
              %i.fa.fa-spinner.fa-spin
43
              = _("started")
Douwe Maan's avatar
Douwe Maan committed
44 45
            - else
              = project.human_import_status_name
Jared Szechy's avatar
Jared Szechy committed
46

Douwe Maan's avatar
Douwe Maan committed
47
      - @repos.each do |repo|
48
        %tr{ id: "repo_#{repo.id}" }
Douwe Maan's avatar
Douwe Maan committed
49 50 51
          %td
            = repo.name
          %td.import-target
52
            #{current_user.username}/#{repo.name}
Douwe Maan's avatar
Douwe Maan committed
53
          %td.import-actions.job-status
54
            = button_tag class: "btn btn-import js-add-to-import" do
55
              = _("Import")
Phil Hughes's avatar
Phil Hughes committed
56
              = icon("spinner spin", class: "loading-icon")
Jared Szechy's avatar
Jared Szechy committed
57

58
.js-importer-status{ data: { jobs_import_path: "#{jobs_import_fogbugz_path}", import_path: "#{import_fogbugz_path}" } }