diff options
Diffstat (limited to 'app/views/import')
-rw-r--r-- | app/views/import/bitbucket_server/status.html.haml | 11 | ||||
-rw-r--r-- | app/views/import/github/new.html.haml | 34 |
2 files changed, 26 insertions, 19 deletions
diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index 40609fddbde..aac09801d91 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -17,8 +17,13 @@ = button_tag class: 'btn btn-import btn-success js-import-all' do = _('Import all projects') = icon('spinner spin', class: 'loading-icon') - .btn-group - = link_to('Reconfigure', configure_import_bitbucket_server_path, class: 'btn btn-primary', method: :post) + +.btn-group + = link_to('Reconfigure', configure_import_bitbucket_server_path, class: 'btn btn-primary', method: :post) + +.input-btn-group.float-right + = form_tag status_import_bitbucket_server_path, :method => 'get' do + = text_field_tag :filter, sanitize(params[:filter]), class: 'form-control append-bottom-10', placeholder: _('Filter your projects by name'), size: 40, autoFocus: true .table-responsive.prepend-top-10 %table.table.import-jobs @@ -62,7 +67,7 @@ = text_field_tag :path, current_user.namespace_path, class: "input-group-text input-large form-control", tabindex: 1, disabled: true %span.input-group-prepend .input-group-text / - = text_field_tag :path, sanitize_project_name(repo.slug), class: "input-mini form-control", tabindex: 2, autofocus: true, required: true + = text_field_tag :path, sanitize_project_name(repo.slug), class: "input-mini form-control", tabindex: 2, required: true %td.import-actions.job-status = button_tag class: 'btn btn-import js-add-to-import' do Import diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index 72e5934574a..518c44cc687 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -1,30 +1,32 @@ -- title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') +- title = _('Authenticate with GitHub') - page_title title - breadcrumb_title title - header_title _("Projects"), root_path -%h3.page-title - = icon 'github', text: _('Import repositories from GitHub') +%h2.page-title + = title -- if github_import_configured? - %p - = import_github_authorize_message +%p + = import_github_authorize_message - = link_to _('List your GitHub repositories'), status_import_github_path(ci_cd_only: params[:ci_cd_only]), class: 'btn btn-success' +- if github_import_configured? && !has_ci_cd_only_params? + = link_to icon('github', text: title), status_import_github_path, class: 'btn btn-success' %hr -%p - = import_github_personal_access_token_message +- unless github_import_configured? || has_ci_cd_only_params? + .bs-callout.bs-callout-info + = import_configure_github_admin_message -= form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do += form_tag personal_access_token_import_github_path, method: :post do .form-group - = text_field_tag :personal_access_token, '', class: 'form-control append-right-8', placeholder: _('Personal Access Token'), size: 40 - = submit_tag _('List your GitHub repositories'), class: 'btn btn-success' + %label.label-bold= _('Personal Access Token') + = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' } + %span.form-text.text-muted + = import_github_personal_access_token_message = render_if_exists 'import/github/ci_cd_only' -- unless github_import_configured? - %hr - %p - = import_configure_github_admin_message + .form-actions.d-flex.justify-content-end + = link_to _('Cancel'), new_project_path, class: 'btn' + = submit_tag _('Authenticate'), class: 'btn btn-success ml-2' |