BigW Consortium Gitlab

status.html.haml 1.86 KB
Newer Older
Jared Szechy committed
1
- page_title "FogBugz import"
2
- header_title "Projects", root_path
Jared Szechy committed
3 4 5 6 7 8 9 10 11 12 13 14 15
%h3.page-title
  %i.fa.fa-bug
  Import projects from FogBugz

- if @repos.any?
  %p.light
    Select projects you want to import.
  %p.light
    Optionally, you can
    = link_to 'customize', new_user_map_import_fogbugz_path
    how FogBugz email addresses and usernames are imported into GitLab.
  %hr
  %p
16 17
  = button_tag class: 'btn btn-import btn-success js-import-all' do
    Import all projects
18
    = icon("spinner spin", class: "loading-icon")
Jared Szechy committed
19

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

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

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