2017-03-12 15:22:00 +00:00
|
|
|
- content_for :page_specific_javascripts do
|
|
|
|
= page_specific_javascript_bundle_tag('group')
|
2017-08-09 10:58:00 +00:00
|
|
|
- parent = @group.parent
|
2017-03-18 12:01:00 +00:00
|
|
|
- group_path = root_url
|
|
|
|
- group_path << parent.full_path + '/' if parent
|
2014-12-22 11:50:58 +00:00
|
|
|
|
2014-10-20 22:25:44 +00:00
|
|
|
.form-group
|
2014-12-22 11:50:58 +00:00
|
|
|
= f.label :path, class: 'control-label' do
|
|
|
|
Group path
|
2014-10-20 22:25:44 +00:00
|
|
|
.col-sm-10
|
2016-10-21 11:54:24 +00:00
|
|
|
.input-group.gl-field-error-anchor
|
2017-03-18 12:01:00 +00:00
|
|
|
.group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
|
2017-01-24 15:32:34 +00:00
|
|
|
%span>= root_url
|
|
|
|
- if parent
|
|
|
|
%strong= parent.full_path + '/'
|
2017-08-09 10:58:00 +00:00
|
|
|
= f.hidden_field :parent_id
|
2014-12-22 11:50:58 +00:00
|
|
|
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
|
2016-11-25 16:35:25 +00:00
|
|
|
autofocus: local_assigns[:autofocus] || false, required: true,
|
2017-05-24 20:59:26 +00:00
|
|
|
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
|
2017-03-12 15:22:00 +00:00
|
|
|
title: 'Please choose a group path with no special characters.',
|
2017-02-20 13:51:47 +00:00
|
|
|
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
|
2016-10-21 11:54:24 +00:00
|
|
|
|
2014-12-22 13:02:47 +00:00
|
|
|
- if @group.persisted?
|
2015-03-19 03:16:36 +00:00
|
|
|
.alert.alert-warning.prepend-top-10
|
2017-08-29 22:16:01 +00:00
|
|
|
Changing group path can have unintended side effects.
|
|
|
|
= succeed '.' do
|
|
|
|
= link_to 'Learn more', help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank'
|
2014-10-20 22:25:44 +00:00
|
|
|
|
2017-03-12 15:22:00 +00:00
|
|
|
.form-group.group-name-holder
|
|
|
|
= f.label :name, class: 'control-label' do
|
|
|
|
Group name
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :name, class: 'form-control',
|
|
|
|
required: true,
|
|
|
|
title: 'You can choose a descriptive name different from the path.'
|
|
|
|
|
2014-10-20 22:25:44 +00:00
|
|
|
.form-group.group-description-holder
|
2015-12-02 13:30:12 +00:00
|
|
|
= f.label :description, class: 'control-label'
|
2014-10-20 22:25:44 +00:00
|
|
|
.col-sm-10
|
|
|
|
= f.text_area :description, maxlength: 250,
|
|
|
|
class: 'form-control js-gfm-input', rows: 4
|