diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-03 16:29:27 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-03 16:29:27 +0300 |
commit | 7b5bc32cadbf2c0a3ac1e80643e46786fd8b1b56 (patch) | |
tree | 0dfa9add1156d8ce9ff8709e36da577b7c94ad1c /app/views/import | |
parent | 9157985cfce1391973673ea278dc7506a90f8f53 (diff) |
Allow projects to be imported from Google Code.
Diffstat (limited to 'app/views/import')
-rw-r--r-- | app/views/import/google_code/new.html.haml | 17 | ||||
-rw-r--r-- | app/views/import/google_code/status.html.haml | 45 |
2 files changed, 62 insertions, 0 deletions
diff --git a/app/views/import/google_code/new.html.haml b/app/views/import/google_code/new.html.haml new file mode 100644 index 00000000000..8df5b5d31f4 --- /dev/null +++ b/app/views/import/google_code/new.html.haml @@ -0,0 +1,17 @@ +%h3.page-title + %i.fa.fa-google + Import projects from Google Code +%hr + += form_tag callback_import_google_code_path, class: 'form-horizontal', multipart: true do + %ul + %li + Use Google Takeout etc + + .form-group + = label_tag :dump_file, "Google Takeout JSON file", class: 'control-label' + .col-sm-10 + %input{type: "file", name: "dump_file", id: "dump_file"} + + .form-actions + = submit_tag 'Select projects to import', class: "btn btn-create" diff --git a/app/views/import/google_code/status.html.haml b/app/views/import/google_code/status.html.haml new file mode 100644 index 00000000000..eba9c5296bc --- /dev/null +++ b/app/views/import/google_code/status.html.haml @@ -0,0 +1,45 @@ +%h3.page-title + %i.fa.fa-google + Import projects from Google Code + +%p.light + Select projects you want to import. +%hr +%p + = button_tag 'Import all projects', class: "btn btn-success js-import-all" + +%table.table.import-jobs + %thead + %tr + %th From Google Code + %th To GitLab + %th Status + %tbody + - @already_added_projects.each do |project| + %tr{id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}"} + %td + = link_to project.import_source, "https://code.google.com/p/#{project.import_source}", target: "_blank" + %td + %strong= link_to project.path_with_namespace, [project.namespace.becomes(Namespace), project] + %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 + + - @repos.each do |repo| + %tr{id: "repo_#{repo.id}"} + %td + = link_to repo.name, "https://code.google.com/p/#{repo.name}", target: "_blank" + %td.import-target + = "#{current_user.username}/#{repo.name}" + %td.import-actions.job-status + = button_tag "Import", class: "btn js-add-to-import" + +:coffeescript + new ImporterStatus("#{jobs_import_google_code_path}", "#{import_google_code_path}") |