summaryrefslogtreecommitdiff
path: root/app/views/import
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-14 14:50:56 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 14:50:56 +0200
commitdba63d667d536c939400979a22967ed9b25980b2 (patch)
tree224155b5cdd0bc9db91df26436a2387f4a3116af /app/views/import
parentf6cb42f3d197b7920207088f5fa5f5161be90905 (diff)
downloadgitlab-ce-dba63d667d536c939400979a22967ed9b25980b2.tar.gz
Allow user map to be specified.
Diffstat (limited to 'app/views/import')
-rw-r--r--app/views/import/google_code/new.html.haml13
-rw-r--r--app/views/import/google_code/new_user_map.html.haml20
-rw-r--r--app/views/import/google_code/status.html.haml1
3 files changed, 32 insertions, 2 deletions
diff --git a/app/views/import/google_code/new.html.haml b/app/views/import/google_code/new.html.haml
index 0b4edc68428..ce78fec205f 100644
--- a/app/views/import/google_code/new.html.haml
+++ b/app/views/import/google_code/new.html.haml
@@ -46,6 +46,15 @@
%input{type: "file", name: "dump_file", id: "dump_file"}
%li
%p
- Continue to the next step:
+ Do you want to customize how Google Code email addresses and usernames are imported into GitLab?
%p
- = submit_tag 'Select projects to import', class: "btn btn-create"
+ = label_tag :create_user_map_0 do
+ = radio_button_tag :create_user_map, 0, true
+ No, directly import the existing email addresses and usernames.
+ %p
+ = label_tag :create_user_map_1 do
+ = radio_button_tag :create_user_map, 1, false
+ Yes, let me map Google Code users to full names or GitLab users.
+ %li
+ %p
+ = submit_tag 'Continue to the next step', class: "btn btn-create"
diff --git a/app/views/import/google_code/new_user_map.html.haml b/app/views/import/google_code/new_user_map.html.haml
new file mode 100644
index 00000000000..2996d3b659b
--- /dev/null
+++ b/app/views/import/google_code/new_user_map.html.haml
@@ -0,0 +1,20 @@
+%h3.page-title
+ %i.fa.fa-google
+ Import projects from Google Code
+%hr
+
+= form_tag create_user_map_import_google_code_path, class: 'form-horizontal' do
+ %p
+ Customize how Google Code email addresses and usernames are imported into GitLab.
+ In the next step, you'll be able to select the projects you want to import.
+ %p
+ The user map is a JSON document mapping Google Code users (as keys) to the way they will be imported into GitLab (as values). By default the username is masked to ensure users' privacy.
+ %p
+ To map a Google Code user to a full name or GitLab user, simply replace the value, e.g. <code>"johnsmith@gmail.com": "John Smith"</code> or <code>"johnsmith@gmail.com": "@johnsmith"</code>. Be sure to preserve the surrounding double quotes and other interpunction.
+
+ .form-group
+ .col-sm-12
+ = text_area_tag :user_map, JSON.pretty_generate(@user_map), class: 'form-control', rows: 15
+
+ .form-actions
+ = submit_tag 'Continue to the next step', class: "btn btn-create"
diff --git a/app/views/import/google_code/status.html.haml b/app/views/import/google_code/status.html.haml
index eba9c5296bc..8f24a1ce85d 100644
--- a/app/views/import/google_code/status.html.haml
+++ b/app/views/import/google_code/status.html.haml
@@ -7,6 +7,7 @@
%hr
%p
= button_tag 'Import all projects', class: "btn btn-success js-import-all"
+ = link_to "Specify user map", new_user_map_import_google_code_path, class: "btn prepend-left-10"
%table.table.import-jobs
%thead