Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-03 16:29:27 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-03 16:29:27 +0300
commit7b5bc32cadbf2c0a3ac1e80643e46786fd8b1b56 (patch)
tree0dfa9add1156d8ce9ff8709e36da577b7c94ad1c /app/views
parent9157985cfce1391973673ea278dc7506a90f8f53 (diff)
Allow projects to be imported from Google Code.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/import/google_code/new.html.haml17
-rw-r--r--app/views/import/google_code/status.html.haml45
-rw-r--r--app/views/projects/new.html.haml4
3 files changed, 66 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}")
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 69909a8554e..a06c85b4251 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -62,6 +62,10 @@
%i.icon-gitorious.icon-gitorious-small
Gitorious.org
+ = link_to new_import_google_code_path, class: 'btn' do
+ %i.fa.fa-google
+ Google Code
+
= link_to "#", class: 'btn js-toggle-button' do
%i.fa.fa-git
%span Any repo by URL