debian-mirror-gitlab/app/views/projects/new.html.haml

123 lines
6.6 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- @breadcrumb_link = dashboard_projects_path
- breadcrumb_title "Projects"
- @hide_top_links = true
2015-09-11 14:41:01 +05:30
- page_title 'New Project'
- header_title "Projects", dashboard_projects_path
2017-08-17 22:00:37 +05:30
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
2018-03-27 19:54:05 +05:30
- active_tab = local_assigns.fetch(:active_tab, 'blank')
2015-12-23 02:04:40 +05:30
2014-09-02 18:07:02 +05:30
.project-edit-container
.project-edit-errors
= render 'projects/errors'
2016-08-24 12:49:21 +05:30
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
%h4.prepend-top-0
2018-03-27 19:54:05 +05:30
= _('New project')
2018-03-17 18:26:18 +05:30
%p
2018-03-27 19:54:05 +05:30
- among_other_things_link = link_to _('among other things'), help_page_path("user/project/index.md", anchor: "projects-features"), target: '_blank'
= _('A project is where you house your files (repository), plan your work (issues), and publish your documentation (wiki), %{among_other_things_link}.').html_safe % { among_other_things_link: among_other_things_link }
2018-03-17 18:26:18 +05:30
%p
2018-03-27 19:54:05 +05:30
= _('All features are enabled for blank projects, from templates, or when importing, but you can disable them afterward in the project settings.')
-# EE-specific start
-# EE-specific end
2018-03-17 18:26:18 +05:30
.md
= brand_new_project_guidelines
2018-03-27 19:54:05 +05:30
%p
%strong= _("Tip:")
= _("You can also create a project from the command line.")
%a.push-new-project-tip{ data: { title: _("Push to create a project") }, href: help_page_path('gitlab-basics/create-project', anchor: 'push-to-create-a-new-project'), target: "_blank", rel: "noopener noreferrer" }
= _("Show command")
%template.push-new-project-tip-template= render partial: "new_project_push_tip"
2017-09-10 17:25:29 +05:30
.col-lg-9.js-toggle-container
2018-03-17 18:26:18 +05:30
%ul.nav-links.gitlab-tabs{ role: 'tablist' }
2018-03-27 19:54:05 +05:30
%li{ class: active_when(active_tab == 'blank'), role: 'presentation' }
2018-03-17 18:26:18 +05:30
%a{ href: '#blank-project-pane', id: 'blank-project-tab', data: { toggle: 'tab' }, role: 'tab' }
%span.hidden-xs Blank project
%span.visible-xs Blank
2018-03-27 19:54:05 +05:30
%li{ class: active_when(active_tab == 'template'), role: 'presentation' }
2018-03-17 18:26:18 +05:30
%a{ href: '#create-from-template-pane', id: 'create-from-template-tab', data: { toggle: 'tab' }, role: 'tab' }
%span.hidden-xs Create from template
%span.visible-xs Template
2018-03-27 19:54:05 +05:30
%li{ class: active_when(active_tab == 'import'), role: 'presentation' }
2018-03-17 18:26:18 +05:30
%a{ href: '#import-project-pane', id: 'import-project-tab', data: { toggle: 'tab' }, role: 'tab' }
%span.hidden-xs Import project
%span.visible-xs Import
2018-03-27 19:54:05 +05:30
-# EE-specific start
-# EE-specific end
2018-03-17 18:26:18 +05:30
.tab-content.gitlab-tab-content
2018-03-27 19:54:05 +05:30
.tab-pane{ id: 'blank-project-pane', class: active_when(active_tab == 'blank'), role: 'tabpanel' }
2018-03-17 18:26:18 +05:30
= form_for @project, html: { class: 'new_project' } do |f|
= render 'new_project_fields', f: f, project_name_id: "blank-project-name"
2018-03-27 19:54:05 +05:30
.tab-pane.no-padding{ id: 'create-from-template-pane', class: active_when(active_tab == 'template'), role: 'tabpanel' }
2018-03-17 18:26:18 +05:30
= form_for @project, html: { class: 'new_project' } do |f|
2017-09-10 17:25:29 +05:30
.project-template
.form-group
%div
= render 'project_templates', f: f
2015-04-26 12:48:37 +05:30
2018-03-27 19:54:05 +05:30
.tab-pane.import-project-pane.js-toggle-container{ id: 'import-project-pane', class: active_when(active_tab == 'import'), role: 'tabpanel' }
2018-03-17 18:26:18 +05:30
= form_for @project, html: { class: 'new_project' } do |f|
- if import_sources_enabled?
.project-import.row
2018-03-27 19:54:05 +05:30
.col-lg-12
2018-03-17 18:26:18 +05:30
.form-group.import-btn-container.clearfix
= f.label :visibility_level, class: 'label-light' do #the label here seems wrong
Import project from
.import-buttons
- if gitlab_project_import_enabled?
.import_gitlab_project.has-tooltip{ data: { container: 'body' } }
= link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
= icon('gitlab', text: 'GitLab export')
%div
- if github_import_enabled?
2018-03-27 19:54:05 +05:30
= link_to new_import_github_path, class: 'btn js-import-github' do
2018-03-17 18:26:18 +05:30
= icon('github', text: 'GitHub')
%div
- if bitbucket_import_enabled?
= link_to status_import_bitbucket_path, class: "btn import_bitbucket #{'how_to_import_link' unless bitbucket_import_configured?}" do
= icon('bitbucket', text: 'Bitbucket')
- unless bitbucket_import_configured?
= render 'bitbucket_import_modal'
%div
- if gitlab_import_enabled?
= link_to status_import_gitlab_path, class: "btn import_gitlab #{'how_to_import_link' unless gitlab_import_configured?}" do
= icon('gitlab', text: 'GitLab.com')
- unless gitlab_import_configured?
= render 'gitlab_import_modal'
%div
- if google_code_import_enabled?
= link_to new_import_google_code_path, class: 'btn import_google_code' do
= icon('google', text: 'Google Code')
%div
- if fogbugz_import_enabled?
= link_to new_import_fogbugz_path, class: 'btn import_fogbugz' do
= icon('bug', text: 'Fogbugz')
%div
- if gitea_import_enabled?
= link_to new_import_gitea_path, class: 'btn import_gitea' do
= custom_icon('go_logo')
Gitea
%div
- if git_import_enabled?
2018-03-27 19:54:05 +05:30
%button.btn.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active' } }
2018-03-17 18:26:18 +05:30
= icon('git', text: 'Repo by URL')
.col-lg-12
2018-03-27 19:54:05 +05:30
.js-toggle-content.toggle-import-form{ class: ('hide' if active_tab != 'import') }
2018-03-17 18:26:18 +05:30
%hr
= render "shared/import_form", f: f
= render 'new_project_fields', f: f, project_name_id: "import-url-name"
2014-09-02 18:07:02 +05:30
2018-03-27 19:54:05 +05:30
-# EE-specific start
-# EE-specific end
2014-09-02 18:07:02 +05:30
.save-project-loader.hide
.center
%h2
2015-04-26 12:48:37 +05:30
%i.fa.fa-spinner.fa-spin
2014-09-02 18:07:02 +05:30
Creating project & repository.
%p Please wait a moment, this page will automatically refresh when ready.