2018-06-13 01:02:41 -04:00
- page_title _("GitLab Import")
- header_title _("Projects"), root_path
2017-08-07 06:09:50 -04:00
2016-04-26 04:59:00 -04:00
%h3.page-title
2016-06-13 14:35:57 -04:00
= icon('gitlab')
2018-06-13 01:02:41 -04:00
= _('Import an exported GitLab project')
2016-04-26 04:59:00 -04:00
%hr
2017-08-07 13:51:30 -04:00
= form_tag import_gitlab_project_path, class: 'new_project', multipart: true do
2017-08-01 12:00:55 -04:00
.row
2018-09-08 02:03:00 -04:00
.form-group.project-name.col-sm-12
= label_tag :name, _('Project name'), class: 'label-bold'
2018-09-17 07:46:51 -04:00
= text_field_tag :name, @name, placeholder: "My awesome project", class: "js-project-name form-control input-lg", autofocus: true
2018-04-09 12:45:38 -04:00
.form-group.col-12.col-sm-6
2018-09-08 02:03:00 -04:00
= label_tag :namespace_id, _('Project URL'), class: 'label-bold'
2017-08-01 12:00:55 -04:00
.form-group
.input-group
- if current_user.can_select_namespace?
2018-04-12 16:32:55 -04:00
.input-group-prepend.has-tooltip{ title: root_url }
.input-group-text
= root_url
2017-08-07 13:24:40 -04:00
= select_tag :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), class: 'select2 js-select-namespace', tabindex: 1
2016-06-13 14:35:57 -04:00
2017-08-01 12:00:55 -04:00
- else
2018-04-12 16:32:55 -04:00
.input-group-prepend.static-namespace.has-tooltip{ title: user_url(current_user.username) + '/' }
2018-06-15 11:33:30 -04:00
.input-group-text.border-0
2018-04-12 16:32:55 -04:00
#{user_url(current_user.username)}/
2017-08-07 13:24:40 -04:00
= hidden_field_tag :namespace_id, value: current_user.namespace_id
2018-04-09 12:45:38 -04:00
.form-group.col-12.col-sm-6.project-path
2018-09-08 02:03:00 -04:00
= label_tag :path, _('Project slug'), class: 'label-bold'
= text_field_tag :path, @path, placeholder: "my-awesome-project", class: "js-path-name form-control", tabindex: 2, required: true
2017-08-01 12:00:55 -04:00
.row
.form-group.col-md-12
2018-06-13 01:02:41 -04:00
= _("To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here.")
2017-08-01 12:00:55 -04:00
.row
.form-group.col-sm-12
= hidden_field_tag :namespace_id, @namespace.id
2018-07-19 18:11:31 -04:00
= label_tag :file, _('GitLab project export'), class: 'label-bold'
2017-08-01 12:00:55 -04:00
.form-group
= file_field_tag :file, class: ''
.row
2018-06-11 12:48:26 -04:00
.form-actions.col-sm-12
2018-09-18 05:58:22 -04:00
= submit_tag _('Import project'), class: 'btn btn-success'
2018-06-13 01:02:41 -04:00
= link_to _('Cancel'), new_project_path, class: 'btn btn-cancel'