summaryrefslogtreecommitdiff
path: root/app/views/groups/new.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/groups/new.html.haml')
-rw-r--r--app/views/groups/new.html.haml73
1 files changed, 37 insertions, 36 deletions
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index 376624f4786..ed016206310 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -2,43 +2,44 @@
- @hide_top_links = true
- page_title _('New Group')
- header_title _("Groups"), dashboard_groups_path
+- active_tab = local_assigns.fetch(:active_tab, 'create')
-.page-title-holder.d-flex.align-items-center
- %h1.page-title= _('New group')
-.row.prepend-top-default
- .col-lg-3.profile-settings-sidebar
- %p
- - group_docs_path = help_page_path('user/group/index')
- - group_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_docs_path }
- = s_('%{group_docs_link_start}Groups%{group_docs_link_end} allow you to manage and collaborate across multiple projects. Members of a group have access to all of its projects.').html_safe % { group_docs_link_start: group_docs_link_start, group_docs_link_end: '</a>'.html_safe }
- %p
- - subgroup_docs_path = help_page_path('user/group/subgroups/index')
- - subgroup_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: subgroup_docs_path }
- = s_('Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}.').html_safe % { subgroup_docs_link_start: subgroup_docs_link_start, subgroup_docs_link_end: '</a>'.html_safe }
- %p
- = _('Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group.')
+.group-edit-container.prepend-top-default
+ .row
+ .col-lg-3.group-settings-sidebar
+ %h4.prepend-top-0
+ = _('New group')
+ %p
+ - group_docs_path = help_page_path('user/group/index')
+ - group_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_docs_path }
+ = s_('%{group_docs_link_start}Groups%{group_docs_link_end} allow you to manage and collaborate across multiple projects. Members of a group have access to all of its projects.').html_safe % { group_docs_link_start: group_docs_link_start, group_docs_link_end: '</a>'.html_safe }
+ %p
+ - subgroup_docs_path = help_page_path('user/group/subgroups/index')
+ - subgroup_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: subgroup_docs_path }
+ = s_('Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}.').html_safe % { subgroup_docs_link_start: subgroup_docs_link_start, subgroup_docs_link_end: '</a>'.html_safe }
+ %p
+ = _('Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group.')
- .col-lg-9
- = form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f|
- = form_errors(@group)
- = render 'shared/group_form', f: f, autofocus: true
+ .col-lg-9.js-toggle-container
+ %ul.nav.nav-tabs.nav-links.gitlab-tabs{ role: 'tablist' }
+ %li.nav-item{ role: 'presentation' }
+ %a.nav-link.active{ href: '#create-group-pane', id: 'create-group-tab', role: 'tab', data: { toggle: 'tab', track_label: 'create_group', track_event: 'click_tab', track_value: '' } }
+ %span.d-none.d-sm-block= s_('GroupsNew|Create group')
+ %span.d-block.d-sm-none= s_('GroupsNew|Create')
+ %li.nav-item{ role: 'presentation' }
+ %a.nav-link{ href: '#import-group-pane', id: 'import-group-tab', role: 'tab', data: { toggle: 'tab', track_label: 'import_group', track_event: 'click_tab', track_value: '' } }
+ %span.d-none.d-sm-block= s_('GroupsNew|Import group')
+ %span.d-block.d-sm-none= s_('GroupsNew|Import')
- .row
- .form-group.group-description-holder.col-sm-12
- = f.label :avatar, _("Group avatar"), class: 'label-bold'
- %div
- = render 'shared/choose_avatar_button', f: f
+ .tab-content.gitlab-tab-content
+ .tab-pane.js-toggle-container{ id: 'create-group-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' }
+ = form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f|
+ = render 'new_group_fields', f: f, group_name_id: 'create-group-name'
- .form-group.col-sm-12
- %label.label-bold
- = _('Visibility level')
- %p
- = _('Who will be able to see this group?')
- = link_to _('View the documentation'), help_page_path("public_access/public_access"), target: '_blank'
- = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group, with_label: false
-
- = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled
-
- .form-actions
- = f.submit _('Create group'), class: "btn btn-success"
- = link_to _('Cancel'), dashboard_groups_path, class: 'btn btn-cancel'
+ .tab-pane.js-toggle-container{ id: 'import-group-pane', class: active_when(active_tab) == 'import', role: 'tabpanel' }
+ - if import_sources_enabled?
+ = render 'import_group_pane', active_tab: active_tab, autofocus: true
+ - else
+ .nothing-here-block
+ %h4= s_('GroupsNew|No import options available')
+ %p= s_('GroupsNew|Contact an administrator to enable options for importing your group.')