From dba63d667d536c939400979a22967ed9b25980b2 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 14 Apr 2015 14:50:56 +0200 Subject: Allow user map to be specified. --- app/views/import/google_code/new.html.haml | 13 +++++++++++-- app/views/import/google_code/new_user_map.html.haml | 20 ++++++++++++++++++++ app/views/import/google_code/status.html.haml | 1 + 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 app/views/import/google_code/new_user_map.html.haml (limited to 'app/views/import') 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. "johnsmith@gmail.com": "John Smith" or "johnsmith@gmail.com": "@johnsmith". 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 -- cgit v1.2.1