debian-mirror-gitlab/app/views/shared/_group_form.html.haml

45 lines
1.8 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('group')
- parent = GroupFinder.new(current_user).execute(id: params[:parent_id] || @group.parent_id)
- group_path = root_url
- group_path << parent.full_path + '/' if parent
2015-04-26 12:48:37 +05:30
.form-group
= f.label :path, class: 'control-label' do
Group path
.col-sm-10
2017-08-17 22:00:37 +05:30
.input-group.gl-field-error-anchor
.group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
%span>= root_url
- if parent
%strong= parent.full_path + '/'
2015-04-26 12:48:37 +05:30
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
2017-08-17 22:00:37 +05:30
autofocus: local_assigns[:autofocus] || false, required: true,
2017-09-10 17:25:29 +05:30
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
2017-08-17 22:00:37 +05:30
title: 'Please choose a group path with no special characters.',
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
- if parent
= f.hidden_field :parent_id, value: parent.id
2015-04-26 12:48:37 +05:30
- if @group.persisted?
.alert.alert-warning.prepend-top-10
%ul
%li Changing group path can have unintended side effects.
%li Renaming group path will rename directory for all related projects
%li It will change web url for access group and group projects.
%li It will change the git path to repositories under this group.
2017-08-17 22:00:37 +05:30
.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.'
2015-04-26 12:48:37 +05:30
.form-group.group-description-holder
2015-12-23 02:04:40 +05:30
= f.label :description, class: 'control-label'
2015-04-26 12:48:37 +05:30
.col-sm-10
= f.text_area :description, maxlength: 250,
class: 'form-control js-gfm-input', rows: 4